Comment typo fixes.
[external/binutils.git] / bfd / ChangeLog
1 2002-12-12  Alan Modra  <amodra@bigpond.net.au>
2
3         * dwarf2.c (comp_unit_contains_address): Comment typo fix.
4         * elf.c (get_program_header_size): Likewise.
5         * elf32-m32r.c (m32r_elf_lo16_reloc): Likewise.
6         (m32r_elf_generic_reloc): Likewise.
7         * elf32-ppc.c (ppc_elf_howto_init): Likewise.
8         * elflink.h (elf_bfd_discard_info): Likewise.
9
10 2002-12-12  Alan Modra  <amodra@bigpond.net.au>
11
12         * elf32-i386.c (elf_i386_finish_dynamic_sections): Add output_offset
13         to DT_JMPREL.  Use srelplt input section size for DT_PLTRELSZ and
14         DT_RELSZ adjustment, not output section.  Avoid writing tags when
15         unchanged.  Don't assume linker script is sane, adjust DT_REL too.
16         * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Just use raw
17         size of srelplt for DT_PLTRELSZ.  Use srelplt input section size for
18         DT_RELASZ adjustment, not output section.  Avoid writing tags when
19         unchanged.  Adjust DT_RELA.
20         * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Tweaks for better
21         formatting.  Avoid writing tags when unchanged.  Adjust DT_RELA.
22
23 2002-12-12  Alexandre Oliva  <aoliva@redhat.com>
24
25         * elfxx-mips.c (mips_elf_calculate_relocation): Don't divide
26         addend by 4.
27
28 2002-12-12  Alexandre Oliva  <aoliva@redhat.com>
29
30         * elfxx-mips.c (struct mips_got_entry): New.
31         (struct mips_got_info): Added got_entries field.
32         (mips_elf_got_entry_hash, mips_elf_got_entry_eq): New functions.
33         (mips_elf_local_got_index, mips_elf_got_page,
34         mips_elf_got16_entry): Re-implement in terms of new...
35         (mips_elf_create_local_got_entry): Rewrite to use got_entries.
36         Change return type.
37         (mips_elf_highest): Warning clean-up.
38         (mips_elf_create_got_section): Initialize got_entries.
39         (_bfd_mips_elf_check_relocs): Use got_entries to estimate
40         local got size.
41         (_bfd_mips_elf_size_dynamic_sections): Do not account for
42         GOT_PAGE entries, since we now reuse GOT16 entries.
43
44 2002-12-10  Jason Thorpe  <thorpej@wasabisystems.com>
45
46         * aoutx.h (set_section_contents): Allow an otherwise unrepresentable
47         read-only section that lies after .text and before .data to be
48         written into the output file and included in a_text.
49         (translate_to_native_sym_flags): If an otherwise unrepresentable
50         section was merged with .text, convert its symbols to N_TEXT
51         symbols.
52         * libaout.h (aout_section_merge_with_text_p): New macro.
53
54 2002-12-08  Alan Modra  <amodra@bigpond.net.au>
55
56         * bfd-in.h: Comment typo fix.  Formatting.
57         * bfd-in2.h: Regenerate.
58         * coff64-rs6000.c (xcoff64_openr_next_archived_file): Warning fix.
59         * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): Prototype.
60         * elf64-mmix.c (mmix_dump_bpo_gregs): Warning fix.
61
62 2002-12-05  Richard Henderson  <rth@redhat.com>
63
64         * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21BI.
65         Only send PCREL21B though the plt.  Fix installed reloc type.
66         (elfNN_ia64_relocate_section): Give error for dynamic reloc
67         against PCREL22 or PCREL64I; clean up error messages for
68         branch relocs.
69
70 2002-12-04  Kevin Buettner  <kevinb@redhat.com>
71
72         * elf64-mips.c (elf64_mips_grok_prstatus, elf64_mips_grok_psinfo):
73         New functions.
74         (elf_backend_grok_prstatus, elf_backend_grok_psinfo): Define.
75
76 2002-12-04  David Mosberger  <davidm@hpl.hp.com>
77
78         * cpu-ia64-opc.c: Add operand constant "ar.csd".
79
80 2002-12-04  H.J. Lu <hjl@gnu.org>
81
82         * elfxx-ia64.c (get_local_sym_hash): Use section ID instead of
83         BFD address when constructing local name.
84
85 2002-12-04  Andreas Schwab  <schwab@suse.de>
86
87         * elf32-m68k.c (struct elf_m68k_link_hash_table): Add sym_sec
88         member.
89         (elf_m68k_link_hash_table_create): Initialize it.
90         (elf_m68k_check_relocs): Handle symbols that are forced to be
91         local due to visibility changes.
92         (elf_m68k_adjust_dynamic_symbol): Likewise.
93         (elf_m68k_size_dynamic_sections): Likewise.
94         (elf_m68k_discard_copies): Likewise.
95         (elf_m68k_relocate_section): Likewise.
96
97 2002-12-04  Alan Modra  <amodra@bigpond.net.au>
98
99         * elf64-ppc.c (ppc64_elf_edit_opd): Correct typo.
100
101 2002-12-04  Alan Modra  <amodra@bigpond.net.au>
102
103         * srec.c (srec_write_symbols): Restore '$' prefix to address
104         accidentally removed in 2002-04-04 change.
105         (srec_get_symtab): Use 0 instead of `(long) FALSE'.
106
107 2002-12-03  Nick Clifton  <nickc@redhat.com>
108
109         * elf32-ppc.c (apuinfo_list_init): New function.
110         (apuinfo_list_add): New function: Add a value to the list.
111         (apuinfo_list_length): New function: Return the number of
112         values on the list.
113         (apuinfo_list_element): New function: Return a value on the
114         list.
115         (apuinfo_list_finish): New function: Free the resources used
116         by the list.
117         (ppc_elf_begin_write_processing): New function.  Scan the
118         input bfds for apuinfo sections.
119         (ppc_elf_write_section): New function: Delay the creation of
120         the contents of an apuinfo section in an output bfd.
121         (ppc_elf_final_write_processing): New function.  Create the
122         contents of an apuinfo section in an output bfd.
123         (elf_backend_begin_write_processing): Define.
124         (elf_backend_final_write_processing): Define.
125         (elf_backend_write_section): Define.
126
127 2002-12-03  Richard Henderson  <rth@redhat.com>
128
129         * cpu-ia64-opc.c (elf64_ia64_operands): Add ldxmov entry.
130
131 2002-12-01  Stephane Carrez  <stcarrez@nerim.fr>
132
133         Fix PR savannah/1417:
134         * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Don't adjust
135         branch if it goes to the start of the deleted region.
136
137 2002-12-01  Stephane Carrez  <stcarrez@nerim.fr>
138
139         * bfd-in2.h (bfd_mach_m6812): Rebuild.
140         * archures.c (bfd_mach_m6812_default, bfd_mach_m6812,
141         bfd_mach_m6812s): Declare.
142
143         * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): New function.
144         (_bfd_m68hc12_elf_set_private_flags): Call it.
145         (_bfd_m68hc12_elf_print_private_bfd_data): Report processor version.
146         (_bfd_m68hc12_elf_merge_private_bfd_data): Merge the flags and
147         report microcontroller incompatibilities (HC12 vs HCS12).
148         (elf_backend_object_p): Update.
149
150 2002-11-30  Alan Modra  <amodra@bigpond.net.au>
151
152         * bfd-in.h (TRUE_FALSE_ALREADY_DEFINED, BFD_TRUE_FALSE): Delete.
153         (enum bfd_boolean, boolean): Delete.
154         (bfd_boolean): Typedef to an int.
155         (FALSE, TRUE): Define.
156         * aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c, aout-cris.c,
157         aout-encap.c, aout-ns32k.c, aout-target.h, aout-tic30.c, aoutf1.h,
158         aoutx.h, archive.c, archive64.c, archures.c, bfd-in.h, bfd.c, bfdwin.c,
159         binary.c, bout.c, cache.c, cisco-core.c, coff-a29k.c, coff-alpha.c,
160         coff-apollo.c, coff-arm.c, coff-aux.c, coff-h8300.c, coff-h8500.c,
161         coff-i386.c, coff-i860.c, coff-i960.c, coff-ia64.c, coff-m68k.c,
162         coff-m88k.c, coff-mcore.c, coff-mips.c, coff-or32.c, coff-ppc.c,
163         coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c, coff-tic30.c,
164         coff-tic4x.c, coff-tic54x.c, coff-tic80.c, coff-w65.c, coff-we32k.c,
165         coff-z8k.c, coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c,
166         corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c, cpu-avr.c,
167         cpu-cris.c, cpu-d10v.c, cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c,
168         cpu-h8300.c, cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c,
169         cpu-i860.c, cpu-i960.c, cpu-ia64.c, cpu-ip2k.c, cpu-m10200.c,
170         cpu-m10300.c, cpu-m32r.c, cpu-m68hc11.c, cpu-m68hc12.c, cpu-m68k.c,
171         cpu-m88k.c, cpu-mcore.c, cpu-mips.c, cpu-mmix.c, cpu-ns32k.c,
172         cpu-openrisc.c, cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c,
173         cpu-rs6000.c, cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c,
174         cpu-tic4x.c, cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c,
175         cpu-w65.c, cpu-we32k.c, cpu-xstormy16.c, cpu-z8k.c, dwarf1.c,
176         dwarf2.c, ecoff.c, ecofflink.c, efi-app-ia32.c, efi-app-ia64.c,
177         elf-bfd.h, elf-eh-frame.c, elf-hppa.h, elf-m10200.c, elf-m10300.c,
178         elf-strtab.c, elf.c, elf32-arc.c, elf32-arm.h, elf32-avr.c,
179         elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c, elf32-fr30.c,
180         elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c, elf32-hppa.h,
181         elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
182         elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
183         elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
184         elf32-pj.c, elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-sh64-com.c,
185         elf32-sh64.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
186         elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
187         elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
188         elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c,
189         elfarm-oabi.c, elfcode.h, elfcore.h, elflink.c, elflink.h,
190         elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c, elfxx-mips.h,
191         elfxx-target.h, format.c, freebsd.h, genlink.h, hash.c, hp300hpux.c,
192         hppabsd-core.c, hpux-core.c, i386aout.c, i386linux.c, i386lynx.c,
193         i386mach3.c, i386msdos.c, i386os9k.c, ieee.c, ihex.c, irix-core.c,
194         libaout.h, libbfd-in.h, libbfd.c, libcoff-in.h, libecoff.h, libieee.h,
195         libnlm.h, liboasys.h, libpei.h, libxcoff.h, linker.c, lynx-core.c,
196         m68klinux.c, m68klynx.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c,
197         mmo.c, netbsd-core.c, netbsd.h, nlm.c, nlm32-alpha.c, nlm32-i386.c,
198         nlm32-ppc.c, nlm32-sparc.c, nlmcode.h, oasys.c, opncls.c, osf-core.c,
199         pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c, pe-mcore.c, pe-mips.c,
200         pe-sh.c, peXXigen.c, pef.c, pei-arm.c, pei-i386.c, pei-mcore.c,
201         pei-mips.c, pei-sh.c, peicode.h, ppcboot.c, ptrace-core.c, reloc.c,
202         reloc16.c, riscix.c, rs6000-core.c, sco5-core.c, section.c, simple.c,
203         som.c, som.h, sparclinux.c, sparclynx.c, srec.c, stabs.c, sunos.c,
204         syms.c, targets.c, tekhex.c, ticoff.h, trad-core.c, versados.c,
205         vms-gsd.c, vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h,
206         xcoff-target.h, xcofflink.c, xsym.c, xsym.h: Replace boolean with
207         bfd_boolean, true with TRUE, false with FALSE.  Simplify comparisons
208         of bfd_boolean vars with TRUE/FALSE.  Formatting.
209         * bfd-in2.h, libbfd.h, libcoff.h: Regenerate
210
211 2002-11-28  Alan Modra  <amodra@bigpond.net.au>
212
213         * elf-bfd.h: Replace occurrences of Elf32_Internal_* and
214         Elf64_Internal_* with Elf_Internal_*.  Replace Elf_Internal_Rel
215         with Elf_Internal_Rela.
216         * elf-hppa.h, elf-m10200.c, elf-m10300.c, elf32-arc.c, elf32-arm.h,
217         elf32-avr.c, elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c,
218         elf32-fr30.c, elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c,
219         elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
220         elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
221         elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
222         elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-v850.c, elf32-vax.c,
223         elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
224         elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
225         elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c, elfarm-oabi.c,
226         elfcode.h, elflink.h, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c: Ditto.
227         * elf-hppa.h (elf_hppa_internal_shdr): Delete.  Use Elf_Internal_Shdr
228         throughout instead.
229         * elf.c (_bfd_elf_no_info_to_howto_rel): Delete.
230         * elfcode.h (elf_swap_reloca_in): Pass source operand as a bfd_byte *.
231         Remove INLINE keyword.
232         (elf_swap_reloc_in): Likewise.  Also clear r_addend.
233         (elf_swap_reloc_out, elf_swap_reloca_out): Pass destination operand
234         as a bfd_byte *.
235         (elf_write_relocs): Consolidate REL and RELA code.
236         (elf_slurp_reloc_table_from_section): Simplify REL code.
237         (NAME(_bfd_elf,size_info)): Populate reloc swap entries.
238         * elf-bfd.h (MAX_INT_RELS_PER_EXT_REL): Define.
239         * elflink.h (elf_link_read_relocs_from_section): Consolidate REL and
240         RELA code.
241         (elf_link_adjust_relocs): Likewise.  Don't malloc space for temp
242         reloc array, use a fixed size of MAX_INT_RELS_PER_EXT_REL.
243         (elf_link_output_relocs): Likewise.
244         (elf_reloc_link_order): Likewise.
245         (elf_finish_pointer_linker_section): Likewise.
246         (struct elf_link_sort_rela): Remove union.
247         (elf_link_sort_cmp1): Update to suit.
248         (elf_link_sort_cmp2): Here too.
249         (elf_link_sort_relocs): Consolidate REL and RELA code.  Fix memory
250         over-allocation for int_rels_per_ext_rel != 1 case.
251         * elf32-arm.h: Update all bfd_elf32_swap_reloc_out calls.
252         * elf32-i386.c: Likewise.
253         * elf32-cris.c: Likewise for bfd_elf32_swap_reloca_out.
254         * elf32-hppa.c, elf32-i370.c, elf32-m68k.c, elf32-ppc.c, elf32-s390.c,
255         elf32-sh.c, elf32-vax.c, elfxx-mips.c: Likewise.
256         * elf64-alpha.c: Likewise for bfd_elf64_swap_reloca_out.
257         * elf64-hppa.c, elf64-mips.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
258         elf64-sparc.c, elf64-x86-64.c: Likewise.
259         * elfxx-ia64.c: Likewise for bfd_elfNN_swap_reloca_out.
260         * elfxx-mips.c (sort_dynamic_relocs): Likewise for
261         bfd_elf32_swap_reloc_in.
262
263         * elf32-arm.h: Update elf32_arm_info_to_howto calls.
264         * elf32-mips.c: Likewise for mips_info_to_howto_rel.
265         (mips_elf64_swap_reloc_in): Zero r_addend.
266         (mips_elf64_be_swap_reloc_in): Likewise.
267         (mips_elf64_slurp_one_reloc_table): Simplify.
268
269         * elf64-alpha.c (alpha_elf_size_info): Populate reloc swap entries.
270         * elf64-hppa.c (hppa64_elf_size_info): Likewise.
271         * elf64-sparc.c (sparc64_elf_size_info): Likewise.
272
273 2002-11-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
274
275         * elf32-sh.c (sh_elf_relocate_section): Don't complain about
276         unresolved debugging relocs in dynamic applications.
277         * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
278
279 2002-11-26  Alan Modra  <amodra@bigpond.net.au>
280
281         * elf-eh-frame.c (ENSURE_NO_RELOCS): Disregard R_*_NONE relocs.
282         (_bfd_elf_discard_section_eh_frame): Don't discard duplicate CIEs
283         on a relocatable link.  Comment typos.
284         * elf.c (_bfd_elf_link_hash_newfunc): Assign elements of structure
285         in the order they are declared.  Clear elf_hash_value too.
286         (_bfd_elf_link_hash_table_init): Likewise assign in order.  Clear
287         eh_info and tls_segment.
288         * elflink.h (elf_link_input_bfd <emit_relocs>): Keep reloc offsets
289         sorted when discarding relocs by turning them into R_*_NONE.
290
291         * libbfd.c (warn_deprecated): Comment spelling.
292         * po/SRC-POTFILES.in: Regenerate.
293
294 2002-11-21  Richard Henderson  <rth@redhat.com>
295
296         * elflink.h (elf_link_add_object_symbols): Don't overwrite the
297         arch's st_other bits when merging visibilities.
298         (elf_link_output_extsym): Tidy clearing of visibility field.
299
300 2002-11-21  Alan Modra  <amodra@bigpond.net.au>
301
302         * coff-mcore.c (SWAP_IN_RELOC_OFFSET): Define.
303         (SWAP_OUT_RELOC_OFFSET): Define.
304
305 2002-11-20  Alexandre Oliva  <aoliva@redhat.com>
306
307         * elf.c (_bfd_elf_link_hash_table_init): Make sure
308         can_refcount is properly extended to the type of
309         init_refcount.
310
311 2002-11-19  Alexandre Oliva  <aoliva@redhat.com>
312
313         * elfxx-mips.c (MIPS_RELOC_RELA_P): New macro.
314         (_bfd_mips_elf_relocate_section): Use it.
315
316         * elfxx-mips.c (MNAME): New macro.
317         (_bfd_mips_elf_check_relocs): Use it.
318         (_bfd_mips_elf_discard_info): Likewise.
319         (_bfd_mips_elf_final_link): Likewise.
320
321 2002-11-19  Alan Modra  <amodra@bigpond.net.au>
322
323         * elf64-ppc.c (ppc64_elf_edit_opd): When deleting relocs, adjust
324         rel_hdr.sh_size too.
325
326 2002-11-18  Klee Dienes  <kdienes@apple.com>
327
328         * Makefile.am (BFD32_LIBS): Add bfdwin.lo, bfdio.lo.
329         (BFD32_LIBS_CFILES): Add bfdwin.c, bfdio.c.
330         (BFD_H_FILES): Add bfdwin.c, bfdio.c.
331         (LIBBFD_H_FILES): Add bfdwin.c, bfdio.c.
332         Add dependencies for bfdwin.c, bfdio.c.
333         * bfd.c: Remove bfd_get_mtime, bfd_get_size.
334         * libbfd.c: Remove real_read, bfd_bread, _bfd_window_internal,
335         bfd_init_window, bfd_free_window, bfd_get_file_window, bfd_bwrite,
336         bfd_tell, bfd_flush, bfd_stat, bfd_seek.
337         * bfdio.c: New file.  Contains real_read, bfd_bread, bfd_write,
338         bfd_tell, bfd_flush, bfd_stat, bfd_seek, bfd_ge_mtime,
339         bfd_get_size (moved from libbfd.c and bfd.c).
340         * bfdwin.c New file.  Contains _bfd_window_internal,
341         bfd_init_window, bfd_free_window, bfd_get_file_window (moved from
342         libbfd.c and bfd.c).
343         * po/SRC-POTFILES.in: Regenerate.
344         * po/bfd.pot: Regenerate.
345         * libbfd.h: Regenerate.
346         * bfd-in2.h: Regenerate.
347         * aclocal.m4: Regenerate.
348         * Makefile.in: Regenerate.
349         * configure: Regenerate.
350
351 2002-11-18  Klee Dienes  <kdienes@apple.com>
352
353         * bfd.c (bfd_preserve_save): Don't zero BFD_IN_MEMORY.
354
355 2002-11-15  Kazu Hirata  <kazu@cs.umass.edu>
356
357         * coff-h8300.c (h8300_reloc16_estimate): Do not optimize away
358         jsr after a short jump.
359         * elf32-h8300.c (elf32_h8_relax_section): Likewise.
360
361 2002-11-15  Klee Dienes  <kdienes@apple.com>
362
363         * pef.c (bfd_pef_convert_architecture): Move declaration of
364         ARCH_POWERPC and ARCH_M68K to the start of the function.
365
366 2002-11-14  Svein E. Seldal  <Svein.Seldal@solidas.com>
367
368         * coff-tic4x.c (tic4x_howto_table): Formatting fixup
369
370 2002-11-14  Hans-Peter Nilsson  <hp@bitrange.com>
371
372         * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs):
373         For bpo_gregs_section->contents, allocate _raw_size, not
374         _cooked_size.
375
376 2002-11-13  Klee Dienes  <kdienes@apple.com>
377
378         * config.bfd: Add entries for powerpc-*-darwin and cousins.
379
380 2002-11-13  H.J. Lu <hjl@gnu.org>
381
382         * elfcode.h (elf_object_p): Don't restore abfd->arch_info.
383
384 2002-11-13  Klee Dienes  <kdienes@apple.com>
385             Alan Modra  <amodra@bigpond.net.au>
386
387         * bfd.c (struct bfd_preserve): New.
388         (bfd_preserve_save): New function.
389         (bfd_preserve_restore): Ditto.
390         (bfd_preserve_finish): Ditto.
391         * bfd-in2.h: Regenerate.
392         * mach-o.c: Formatting.
393         (bfd_mach_o_scan_read_symtab_symbol): Make "value" unsigned.
394         (bfd_mach_o_object_p): Use bfd_preserve_save/restore/finish.
395         (bfd_mach_o_core_p): Ditto.
396         (bfd_mach_o_scan): Pass in mdata.
397         * mach-o.h (bfd_mach_o_scan): Update prototype.
398         * pef.c: Formatting.
399         (bfd_pef_object_p): Use bfd_preserve_save/restore/finish.
400         (bfd_pef_xlib_object_p): Ditto.
401         (bfd_pef_scan): Pass in mdata.  Move version check to bfd_pef_object_p.
402         * pef.h (bfd_pef_scan): Update prototype.
403         * xsym.c: Formatting, K&R fixes.
404         (bfd_sym_object_p): Use bfd_preserve_save/restore/finish.
405         (bfd_sym_scan): New function split out from bfd_sym_object_p.
406         * xsym.h (bfd_sym_scan): Declare.
407         * elfcode.h (elf_object_p): Use bfd_preserve_save/restore/finish.
408         * elfcore.h (elf_core_file_p): Likewise.
409         * targets.c (_bfd_target_vector): Revert 2002-11-08 change.
410
411 2002-11-12  Nick Clifton  <nickc@redhat.com>
412
413         * po/da.po: Updated Danish translation.
414
415 2002-11-12  Alan Modra  <amodra@bigpond.net.au>
416
417         * elflink.h (elf_link_add_object_symbols): Optimize stabs for
418         relocatable link too.
419         (elf_link_input_bfd): When emitting relocs, adjust offsets for
420         eh_frame and stab sections.  Zap deleted relocs.
421         (elf_reloc_symbol_deleted_p): Return true for zero r_symndx.
422         (elf_bfd_discard_info): Run for relocatable link too.
423         * elf64-ppc.c (ppc64_elf_edit_opd): Rename from edit_opd.  Make global.
424         Handle ld -r case.
425         (ppc64_elf_size_dynamic_sections): Don't call edit_opd from here.
426         * elf64-ppc.h (ppc64_elf_edit_opd): Declare.
427
428         * elf-bfd.h (struct cie_header): Move from elf_eh-frame.c.
429         (struct cie, struct eh_cie_fde, struct eh_frame_sec_info): Likewise.
430         (struct eh_frame_array_ent, struct eh_frame_hdr_info): Likewise.
431         (enum elf_link_info_type): Remove ELF_INFO_TYPE_EH_FRAME_HDR.
432         (struct eh_frame_hdr_info): Add "hdr_sec", remove "split".
433         (struct elf_link_hash_table): Add eh_info.
434         (struct elf_obj_tdata): Change eh_frame_hdr to an asection *.
435         (_bfd_elf_discard_section_eh_frame): Update prototype.
436         (_bfd_elf_discard_section_eh_frame_hdr): Likewise.
437         (_bfd_elf_write_section_eh_frame): Likewise.
438         (_bfd_elf_write_section_eh_frame_hdr): Likewise.
439         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Remove "ehdrsec"
440         param.  Get "hdr_info" from link hash table.
441         (_bfd_elf_discard_section_eh_frame_hdr): Remove "sec" param.  Get
442         header section from link hash table.  Save header section to elf_tdata.
443         (_bfd_elf_maybe_strip_eh_frame_hdr): Remove local "sec".  Use
444         header section from link hash table.  Don't alloc hdr_info.  Clear
445         hdr_sec instead of setting "strip".
446         (_bfd_elf_eh_frame_section_offset): Formatting.
447         (_bfd_elf_write_section_eh_frame): Remove "ehdrsec", add "info" param.
448         Get header section from link hash table.
449         (_bfd_elf_write_section_eh_frame_hdr): Remove "sec", add "info" param.
450         Get header section from link hash table.
451         * elf.c (map_sections_to_segments): Use cached eh_frame_hdr.
452         (get_program_header_size): Likewise.
453         (_bfd_elf_section_offset): Formatting.
454         * elflink.h (elf_link_create_dynamic_sections): Stash eh frame header
455         section pointer in link hash table.
456         (elf_bfd_final_link): Adjust _bfd_elf_write_section_eh_frame_hdr
457         and _bfd_elf_write_section_eh_frame calls.  Update comment about
458         eh_frame entries.
459         (elf_bfd_discard_info): Adjust _bfd_elf_discard_section_eh_frame and
460         _bfd_elf_discard_section_eh_frame_hdr calls.  Remove "ehdr".
461
462         * po/SRC-POTFILES.in: Regenerate.
463
464         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't zero
465         relocs for discarded FDEs.  Remove dead code.
466         (_bfd_elf_write_section_eh_frame_hdr): Remove dead code.
467         * elflink.h (elf_bfd_discard_info): Don't save edited relocs.
468         Tidy conditions under which stabs are edited.  Formatting.
469         * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
470         from discarded relocs.
471         * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Add reloc output
472         section adjustments after testing magic values.
473
474 2002-11-12  Thomas Moestl <tmm@FreeBSD.org>
475
476         * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Correct
477         references to large plt symbols.
478
479 2002-11-12  Klee Dienes  <kdienes@apple.com>
480
481         * mach-o.c (bfd_mach_o_scan_read_thread): Don't re-use 'i' when
482         looking for an unused section name.
483
484 2002-11-11  Kazu Hirata  <kazu@cs.umass.edu>
485
486         * coff-h8300.c: Fix formatting.
487         * elf32-h8300.c: Likewise.
488         * reloc16.c: Likewise.
489
490 2002-11-09  Jeroen Dobbelaere  <jeroen.dobbelaere@acunia.com>
491
492         * elf32-arm.h (elf32_arm_size_dynamic_sections): Don't strip output
493         section when dynamic section unused;  _bfd_strip_section_from_output
494         instead.
495
496 2002-11-08  Alan Modra  <amodra@bigpond.net.au>
497
498         * targets.c (_bfd_target_vector): Disable pef_vec, pef_xlib_vec
499         and sym_vec.
500
501         * dwarf2.c: Revert last change.
502
503 2002-11-07  Michal Ludvig  <mludvig@suse.cz>
504
505         * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
506         _bfd_dwarf2_find_nearest_line): Use
507         bfd_simple_get_relocated_section_contents() instead of
508         bfd_get_section_contents().
509         * reloc.c (bfd_perform_relocation): Add sanity check.
510         * simple.c (simple_get_relocated_section_contents): If the section
511         does not have any relocs associated with it, just return the
512         unadjusted contents.
513
514 2002-11-07  Hans-Peter Nilsson  <hp@axis.com>
515
516         * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOT,
517         case R_CRIS_32_GOT>: Correct test for filling in constant .got
518         contents, enabling for a non-DSO, for symbols defined in the
519         program with --export-dynamic.
520
521 2002-11-07  Alan Modra  <amodra@bigpond.net.au>
522
523         * elf64-ppc.c: Comment typo fixes.
524         (ppc64_elf_merge_private_bfd_data): Allow BFD_ENDIAN_UNKNOWN input.
525
526 2002-11-07  Nick Clifton  <nickc@redhat.com>
527
528         * po/da.po: Updated Danish translation.
529
530 2002-11-06  Alexandre Oliva  <aoliva@redhat.com>
531
532         * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Generate
533         exactly three internal relocs per external reloc.  Set reloc_count
534         to the external reloc count.
535
536 2002-11-06  Klee Dienes  <kdienes@apple.com>
537
538          * coff-stgo32.c (stub_bytes): Mark as const.
539          Fix comment formatting.
540
541 2002-11-06  Klee Dienes  <kdienes@apple.com>
542
543         * Makefile.am (BFD32_BACKENDS): Add mach-o.lo, pef.lo, and
544         xsym.lo.
545         (BFD32_BACKENDS_CFILES): Add mach-o.c, pef.c, and xsym.c.
546         (SOURCE_HFILES): Add mach-o.h, pef.h, pef-traceback.h, xsym.h
547         * archures.c (enum bfd_architecture): Add bfd_arch_m98k.
548         * bfd.c (struct bfd): Add private data for mach-o, pef, and sym.
549         * targets.c (enum bfd_flavour): Add flavours for mach-o, pef, and
550         sym.
551         (_bfd_target_vector): Add target vectors for mach-o, pef, and sym.
552         * Makefile.in: Regenerate.
553         * doc/Makefile.in: Regenerate.
554         * bfd-in2.h: Regenerate.
555         * xsym.c: New file.  Contains support for the Apple/Metrowerks
556         xSYM debugging format.
557         * xsym.h: New file.
558         * pef.c: New file.  Contains support for the Apple Code Fragment
559         Manager Preferred Executable Format
560         * pef.h: New file.
561         * pef-traceback.h: New file.  Contains support for parsing PowerPC
562         traceback tables as used by PEF executables (and perhaps other
563         systems as well).
564         * mach-o.c: New file.  Contains support for the Mach-O object file
565         format.
566         * mach-o.h: New file.
567         * mach-o-target.c: New file.  Declares the mach-o targets
568         themselves.  Included three times by mach-o.c; each time with a
569         different set of macros set.
570
571 2002-11-06  Graeme Peterson  <gp@qnx.com>
572
573         * Makefile.am: Remove entries for elf32-qnx.[ch].
574         * Makefile.in: Regenerate.
575         * config.bfd: Change arm-nto to use bfd_elf32_{big|little}arm_vec,
576         ppc-nto to use bfd_elf32_powerpc{le}_vec, sh-nto to use
577         bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
578         * configure.in: Remove support for bfd_elf32_sh{l}qnx_vec,
579         bfd_elf32_powerpc{le}qnx_vec, bfd_elf32_{big|little}armqnx_vec,
580         and bfd_elf32_i386qnx_vec, and removed elf32-qnx.lo from other targets.
581         bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
582         * configure: Regenerate.
583         * elf32-qnx.c: Remove.
584         * elf32-qnx.h: Remove.
585         * elf.c: Remove calls to QNX specific set_nonloadable_filepos,
586         is_contained_by_filepos, and copy_private_bfd_data_p.
587         * elf-bfd.h (struct elf_backend_data): Remove set_nonloadable_filepos,
588         is_contained_by_filepos, and copy_private_bfd_data_p.
589         * elf32-i386.c: Remove QNX extended bfd support.
590         * elf32-ppc.c: Remove QNX extended bfd support.
591         * elf32-sh.c: Remove QNX extended bfd support.
592         * elfarm-nabi.c: Remove QNX extended bfd support.
593         * targets.c: Remove qnx vectors.
594         * elfxx-target.h (elf_backend_set_nonloadable_filepos): Remove
595         (elf_backend_is_contained_by_filepos): Remove.
596         (elf_backend_copy_private_bfd_data_p): Remove.
597         * po/SRC-POTFILES.in: Regenerate.
598
599 2002-11-06  David O'Brien  <obrien@FreeBSD.org>
600             Alan Modra  <amodra@bigpond.net.au>
601
602         * elf64-sparc.c (sparc64_elf_relocate_section): Adjust addend of
603         dynamic relocs against section symbols for the output section vma.
604
605 2002-11-05  Alan Modra  <amodra@bigpond.net.au>
606
607         * elf32-arm.h (t2a1_push_insn, t2a2_ldr_insn, t2a3_mov_insn,
608         t2a4_bx_insn, t2a5_pop_insn, t2a6_bx_insn): Remove.
609
610 2002-11-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
611             Alan Modra  <amodra@bigpond.net.au>
612
613         * config.bfd (sh-*-linux*): Use bfd_elf*_sh64*lin_vec as sh64
614         vectors in target_selvecs.
615         (shle-*-netbsdelf*): Use bfd_elf*_sh64*nbsd_vec as sh64 vectors
616         in target_selvecs.
617         (sh-*-netbsdelf*): Likewise.
618         * configure.in (assocvecs): New variable.  Handle assocvecs like
619         selvecs.
620         * configure: Regenerate.
621         * format.c (bfd_check_format_matches): Store bfd_target pointers
622         in matching_vector instead of target names.  Select first target
623         from bfd_associated_vector that matches a list of ambiguous targets.
624         * targets.c (_bfd_associated_vector): New array.
625         (bfd_associated_vector): New variable.
626         (_bfd_target_vector): Add bfd_elf*_sh64*lin_vec.
627         * libbfd-in.h (bfd_associated_vector): Declare.
628         * libbfd.h: Regenerate.
629
630 2002-11-05  Elias Athanasopoulos  <eathan@otenet.gr>
631
632         * vms-gsd.c (_bfd_vms_write_gsd): Check that symbol->udata.p is
633         non-NULL before dereferencing.
634
635 2002-11-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
636
637         * vms.c (vms_object_p): Restore the start address when returning
638         NULL.
639
640 2002-11-04  Alan Modra  <amodra@bigpond.net.au>
641             Hans-Peter Nilsson  <hp@axis.com>
642
643         * elflink.h (struct elf_final_link_info): Add shndxbuf_size.
644         (elf_bfd_final_link): Don't bother zeroing symtab_hdr fields.
645         Set up a larger symshndxbuf, and write it out.  Free it on
646         exit rather than freeing symbuf twice.  Correct section index
647         on output section symbol loop.
648         (elf_link_output_sym): Accumulate symbol extension section
649         indices, reallocating symshndxbuf rather than writing it out.
650         (elf_link_flush_output_syms): Don't flush symshndxbuf.
651         * elf.c (assign_section_numbers): Init i_shdrp to all zero.
652         Use bfd_zalloc to clear i_shdrp[0] too.
653
654 2002-11-03  Stephen Clarke <stephen.clarke@earthling.net>
655
656          * elf32-sh64-com.c (sh64_address_in_cranges): Use
657         _raw_size of cranges section if _cooked_size not yet set.
658
659 2002-11-03  Hans-Peter Nilsson  <hp@axis.com>
660
661         * elf32-v850.c (v850_elf_relax_delete_bytes): Correct parameters
662         for bfd_elf32_swap_symbol_out.
663
664 2002-10-31  David O'Brien  <obrien@FreeBSD.org>
665
666         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't mix
667         signed and unsigned in comparison.
668
669 2002-10-30  Daniel Jacobowitz  <drow@mvista.com>
670
671         * coffcode.h: Remove extraneous '\'.
672
673 2002-10-28  H.J. Lu <hjl@gnu.org>
674
675         * Makefile.am (targets.lo): Depend on Makefile instead of
676         config.status.
677         (archures.lo): Likewise.
678         * Makefile.in: Regenerated.
679
680 2002-10-25  Jason Thorpe  <thorpej@wasabisystems.com>
681
682         * config.bfd (mips*el-*-netbsd*, mips*-*-netbsd*): Add
683         bfd_elf64_bigmips_vec and bfd_elf64_littlemips_vec to
684         targ_selvecs.
685
686 2002-10-25  Jim Wilson  <wilson@redhat.com>
687
688         * elf64-sh64.c (sh_elf64_relocate_section): Call
689         _bfd_elf_rela_local_sym.  Handle relocs against STT_SECTION symbol
690         of SHF_MERGE section.
691
692 2002-10-25  Hans-Peter Nilsson  <hp@axis.com>
693
694         * simple.c: Correct placement of ATTRIBUTE_UNUSED.
695
696 2002-10-24  John David Anglin  <dave@hiauly1.hia.nrc.ca>
697
698         * aoutx.h (NAME(aout,swap_ext_reloc_in)): Cast bytes->r_index to
699         unsigned int.  Cast RELOC_BASE10, RELOC_BASE13 and RELOC_BASE22 to
700         unsigned int.
701         (NAME(aout,final_link)): Cast enum used in assignment.
702         (aout_link_write_symbols): Cast enums in comparisons, int values to
703         boolean, enums in assignments to int.
704         (aout_link_input_section_std): Cast rel->r_index to unsigned int.
705         (aout_link_input_section_ext): Likewise.  Cast enums used in comparisons
706         with unsigned ints.
707         (aout_link_reloc_link_order): Cast enum to int in assignment.
708         * archive.c (_bfd_generic_read_ar_hdr_mag): Cast result of memchr
709         calls to char *.
710         * bfd-in.h (bfd_set_section_vma): Cast enum true to unsigned int in
711         assignment.
712         * bfd-in2.h (bfd_set_section_vma): Likewise.
713         * bfd.c (bfd_record_phdr): Cast enums in assignments.
714         * binary.c (bfd_alloc): Cast enum to long.
715         * coffgen.c (_bfd_coff_is_local_label_name): Cast return to boolean.
716         * dwarf2.c (read_abbrevs): Add casts to enum types.
717         (read_attribute_value): Likewise.
718         (arange_add): Cast result of bfd_zalloc call.
719         (comp_unit_contains_address): Return true and false.
720         (comp_unit_find_nearest_line): Cast return to boolean.
721         * format.c (bfd_check_format_matches, bfd_set_format): Likewise.
722         * gen-aout.c: define macro '_' if not defined.
723         * libbfd.c (bfd_realloc): Cast malloc and realloc to PTR.
724         (bfd_bwrite): Cast bfd_realloc to bfd_byte *.
725         (bfd_write_bigendian_4byte_int): Cast return to boolean.
726         (bfd_seek): Cast bfd_realloc to bfd_byte *.
727         (bfd_generic_is_local_label_name): Cast return to boolean.
728         * libcoff.h (_bfd_coff_adjust_symndx): Remove extraneous '\'.
729         * linker.c (_bfd_link_hash_newfunc): Cast bfd_hash_allocate result to
730         struct bfd_hash_entry *.
731         (_bfd_generic_link_hash_newfunc): likewise.
732         (_bfd_generic_final_link): Cast enum to unsigned int.
733         * merge.c (sec_merge_emit): Cast return to boolean.
734         (merge_strings): Add casts to const unsigned char *.
735         * reloc.c (bfd_get_reloc_code_name): Cast enums in comparison to int.
736         (bfd_generic_get_relocated_section_content): Cast enum to unsigned int.
737         * section.c (bfd_section_hash_newfunc): Cast bfd_hash_allocate result to
738         struct bfd_hash_entry *.
739         (bfd_set_section_content): Add cast to PTR in comparison.
740         * simple.c (simple_dummy_warning, simple_dummy_undefined_symbol,
741         simple_dummy_reloc_overflow, simple_dummy_reloc_dangerous,
742         simple_dummy_unattached_reloc,
743         bfd_simple_get_relocated_section_contents): Add K&R declarations and
744         function definitions.
745         * srec.c (S3Forced): Initialize to false.
746         (srec_get_symtab): Cast return value from bfd_alloc to asymbol *.
747         * stabs.c (_bfd_link_section_stabs): Cast enum to int in comparisons.
748         (_bfd_discard_section_stabs): Likewise.  Also cast return to boolean.
749         * syms.c (bfd_is_undefined_symclass): Cast return to boolean.
750         (_bfd_stab_section_find_nearest_line): Cast enum to bfd_byte in
751         comparisons.
752
753 2002-10-23  Jakub Jelinek  <jakub@redhat.com>
754
755         * elf64-alpha.c (elf64_alpha_check_relocs): Only put maybe_dynamic
756         relocs into shared lib non-allocated reloc sections.
757
758 2002-10-23  Nathan Tallent  <eraxxon@alumni.rice.edu>
759
760         * dwarf2.c (add_line_info): Ensure that the line_info_table is
761         sorted even when given an out-of-order line sequence.
762         (lookup_address_in_line_info_table): When an exact VMA match is
763         not found, return line information with the closest VMA.
764
765 2002-10-23 Ross Alexander <ross.alexander@uk.neceur.com>
766
767         * elf64-hppa.c: Force DT_FLAGS to always be set.  Required by
768         HPUX 11.00 patch PHSS_26559.
769
770 2002-10-22  Alexandre Oliva  <aoliva@redhat.com>
771
772         * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Don't move
773         the options section into a separate section unless IRIX 6
774         compatibility is enabled.
775
776 2002-10-22  Alexandre Oliva  <aoliva@redhat.com>
777
778         * elflink.h (struct elf_link_sort_rela): Turn rel and rela
779         into arrays.
780         (elf_link_sort_cmp1, elf_link_sort_cmp2): Adjust.
781         (elf_link_sort_relocs): Likewise.  Take int_rels_per_ext_rel
782         into account.
783         * elfxx-mips.c (mips_elf_create_dynamic_relocation): Compose
784         R_MIPS_REL32 with R_MIPS64 if ABI_64_P.
785
786 2002-10-21  Graeme Peterson  <gp@qnx.com>
787
788         * targets.c (_bfd_target_vector): Add missing qnx vectors.
789
790 2002-10-21  Alan Modra  <amodra@bigpond.net.au>
791
792         * targets.c (bfd_target_list): Don't return the default target twice.
793
794 2002-10-21  Elias Athanasopoulos  <eathan@otenet.gr>
795
796         * archive.c (_bfd_archive_bsd_update_armap_timestamp): Replace
797         perror with bfd_perror.
798
799 2002-10-19  H.J. Lu <hjl@gnu.org>
800
801         * elflink.h (elf_link_add_object_symbols): Correctly handle
802         DT_RPATH and DT_RUNPATH.
803
804 2002-10-19  Mark Kettenis  <kettenis@gnu.org>
805
806         * elf.c (elfcore_grok_note): Fix recognition on NT_PRXFPREG notes.
807
808 2002-10-17  Denis Chertykov  <denisc@overta.ru>
809
810         * elf32-ip2k.c (ELF_MACHINE_ALT1): Define alternate machine code
811         for ip2k port.
812
813 2002-10-17  Alan Modra  <amodra@bigpond.net.au>
814
815         * elfxx-target.h (USE_REL): Don't define as 1.
816         * elf32-arm.h (USE_REL): Provide a default define of 0.
817         Use #if rather than #ifdef when testing USE_REL.
818         * elf32-m32r.c: Likewise.
819
820         * elf32-arc.c (USE_REL): Define as 1.
821         * elf32-d10v.c (USE_REL): Likewise.
822         * elf32-m32r.c (USE_REL): Likewise.
823         * elf32-m68hc11.c (USE_REL): Likewise.
824         * elf32-m68hc12.c (USE_REL): Likewise.
825         * elf32-or32.c (USE_REL): Likewise.
826         * elfarm-nabi.c (USE_REL): Likewise.
827
828 2002-10-16  Jakub Jelinek  <jakub@redhat.com>
829
830         * config.bfd (s390-*-linux*): Add targ64_selvecs.
831         (s390x-*-linux*): Add targ_selvecs.
832
833 2002-10-16  Alan Modra  <amodra@bigpond.net.au>
834
835         * Makefile.am (BFD32_BACKENDS): Remove elfarmqnx-nabi.lo,
836         elf32-i386-fbsd.lo, elf32-i386qnx.lo, elf32-ppcqnx.lo,
837         elf32-sh-lin.lo, elf32-sh64-lin.lo, elf32-sh-nbsd.lo,
838         elf32-sh64-nbsd.lo, elf32-shqnx.lo.  Add elf32-qnx.lo.
839         (BFD32_BACKENDS_CFILES): Likewise for corresponding C files.
840         (BFD64_BACKENDS): Remove elf64-sh64-lin.lo, elf64-sh64-nbsd.lo.
841         (BFD64_BACKENDS_CFILES): Likewise for corresponding C files.
842         (SOURCE_HFILES): Add elf32-qnx.h.
843         (BUILD_HFILES): Add bfdver.h.
844         Run "make dep-am".
845         * Makefile.in: Regenerate.
846         * configure.in Update bfd vector dependencies.
847         * configure: Regenerate.
848         * elf32-i386-fbsd.c: Delete.  Move code to elf32-i386.c.
849         * elf32-i386qnx.c: Likewise.
850         * elf32-ppcqnx.c: Delete.  Move code to elf32-ppc.c.
851         * elf32-sh-nbsd.c: Delete.  Move code to elf32-sh.c.
852         * elf32-sh-lin.c: Likewise.
853         * elf32-shqnx.c: Likewise.
854         * elf32-sh64-lin.c: Delete.  Move code to elf32-sh64.c.
855         * elf32-sh64-nbsd.c: Likewise.
856         * elf64-sh64-lin.c: Delete.  Move code to elf64-sh64.c.
857         * elf64-sh64-nbsd.c: Likewise.
858         * elfarmqnx-nabi.c: Delete.  Move code to elfarm-nabi.c.
859         * elf32-arm.h (ELF_MAXPAGESIZE): Always define.
860         * elf32-i386.c: Remove ELF_ARCH and ELF32_I386_C_INCLUDED tests.
861         * elf32-ppc.c: Remove ELF32_PPC_C_INCLUDED tests.
862         * elf32-qnx.h (elf_backend_set_nonloadable_filepos): Always define.
863         (elf_backend_is_contained_by_filepos): Likewise.
864         (elf_backend_copy_private_bfd_data_p): Likewise.
865         Globalize and move functions to..
866         * elf32-qnx.c: ..here.  New file.
867         * elf32-sh.c: Remove ELF_ARCH and ELF32_SH_C_INCLUDED tests.  Don't
868         emit target vectors when INCLUDE_SHMEDIA.
869         * elf32-sh64.c: Remove ELF_ARCH test.  Move TARGET_* etc. defines to
870         end of file.
871         * elf64-sh64.c: Remove ELF_ARCH test.
872         * elfarm-nabi.c: Remove ELFARM_NABI_C_INCLUDED test.
873         * po/BLD-POTFILES.in: Regenerate.
874         * po/SRC-POTFILES.in: Regenerate.
875
876 2002-10-16  Alan Modra  <amodra@bigpond.net.au>
877
878         * elflink.h (elf_link_add_object_symbols): Error out on dynamic objects
879         loaded with --just-symbols.
880
881         * elf32-i386qnx.c (TARGET_LITTLE_NAME): Define.
882         * elf32-ppcqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
883         * elf32-shqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
884         * elfarmqnx-nabi.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
885
886 2002-10-15  Richard Henderson  <rth@redhat.com>
887
888         * Makefile.am (BFD64_BACKENDS): Remove elf64-alpha-fbsd.
889         (BFD64_BACKENDS_CFILES): Likewise.
890         * configure.in (bfd_elf64_alpha_freebsd_vec): Use elf64-alpha.
891         * elf64-alpha-fbsd.c: Remove file, move code ...
892         * elf64-alpha.c: ... here.
893         * Makefile.in, configure: Rebuild.
894
895 2002-10-14  Richard Henderson  <rth@redhat.com>
896
897         * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: Increment
898         VALUE, not ADDEND.
899
900 2002-10-14  Stephen Clarke <stephen.clarke@superh.com>
901
902         * elf32-sh.c (elf_sh_link_hash_entry): Replace
903         datalabel_got_offset with union of datalabel_got
904         offset and refcount.
905         (sh_elf_link_hash_newfunc): Initialize datalabel_got.refcount.
906         (allocate_dynrelocs): Delete unnecessary code for
907         STT_DATALABEL type.  Create entry in got for
908         datalabel version of symbol if datalabel_got.refcount > 0.
909         (sh_elf_relocate_section): Use datalabel_got union.
910         (sh_elf_gc_sweep_hook): Pull common code to initialize
911         h and eh out of switch statement.  Declare seen_stt_datalabel.
912         Initialize it.  Decrement datalabel_got.refcount for
913         got relocs when seen_stt_datalabel is true.
914         Decrement local_got_refcounts entry for datalabel got relocs
915         of local symbols.
916         (sh_elf_copy_indirect_symbol): Copy datalabel_got field over.
917         (sh_elf_check_relocs): Declare seen_stt_datalabel.
918         Initialize it.  When seen_stt_datalabel is true, increment
919         datalabel_got refcount rather than got.refcount.
920         (sh_elf_finish_dynamic_symbol): Create relocs to
921         initialize got entry for datalabel version of symbol.
922
923 2002-10-14  Alan Modra  <amodra@bigpond.net.au>
924
925         * Makefile.am: Run "make dep-am".
926         (BFD_H_FILES): Remove version.h.
927         * bfd-in.h (BFD_VERSION, BFD_VERSION_DATE, BFD_VERSION_STRING): Move..
928         * version.h: ..to here.
929         * configure.in (bfd_version_date): Remove.
930         (AC_OUTPUT): Make bfdver.h from version.h.
931         * bfd.c: #include "bfdver.h".
932         * vms-hdr.c: Likewise.
933         * Makefile.in: Regenerate.
934         * bfd-in2.h: Regenerate.
935         * configure: Regenerate.
936         * po/SRC-POTFILES.in: Regenerate.
937
938 2002-10-14  Alan Modra  <amodra@bigpond.net.au>
939
940         * archures.c (bfd_mach_i386_i386, bfd_mach_i386_i8086,
941         bfd_mach_i386_i386_intel_syntax, bfd_mach_x86_64,
942         bfd_mach_x86_64_intel_syntax bfd_mach_ppc, bfd_mach_ppc64,
943         bfd_mach_rs6k, bfd_mach_d10v, bfd_mach_sh, bfd_mach_v850,
944         bfd_mach_arc_5, bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8,
945         bfd_mach_m32r, bfd_mach_frv, bfd_mach_frvsimple,
946         bfd_mach_ia64_elf64, bfd_mach_ia64_elf32,
947         bfd_mach_ip2022, bfd_mach_ip2022ext,
948         bfd_mach_s390_31, bfd_mach_s390_64, bfd_mach_xstormy16): Renumber.
949         * bfd-in2.h: Regenerate.
950
951 2002-10-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
952
953         * config.bfd (sh*eb-*-linux*, sh*-*-linux*): Add the alternative
954         endian vector to targ_selvecs.
955
956 2002-10-13  Alexandre Oliva  <aoliva@redhat.com>
957
958         * elfxx-mips.c (mips_elf_calculate_relocation): Take
959         save_addend argument.  Don't apply the 32-bit mask to a
960         GPREL32 value if it's to be used in another relocation.  Don't
961         use forced-check computation of local_p to decide whether to
962         add gp0 to GPREL16 value.  Don't use only the lowest 16 bits
963         of the addend of a non-in-place GPREL16 relocation.
964         (_bfd_mips_elf_relocate_section): Pass use_saved_addend_p to
965         mips_elf_calculate_relocation().
966
967 2002-10-12  Stephane Carrez  <stcarrez@nerim.fr>
968
969         * elf32-m68hc11.c (m68hc11_elf_relax_section): Don't treat relocs
970         with symbols in other sections if we relaxed something;  the sections
971         output offsets must be re-computed before.
972
973 2002-10-12  Stephane Carrez  <stcarrez@nerim.fr>
974
975         * elf32-m68hc11.c (m68hc11_elf_relax_section): Update symbols
976         handling to use Elf_Internal_Sym.
977         (m68hc11_elf_relax_delete_bytes): Likewise.
978
979 2002-10-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
980
981         * elf32-sh.c (sh_elf_optimized_tls_reloc, sh_elf_mkobject,
982         sh_elf_object_p, dtpoff_base): New functions.
983         (sh_elf_howto_table): Add TLS relocs.
984         (sh_reloc_map): Likewise.
985         (sh_elf_info_to_howto): Support TLS relocs.
986         (elf_sh_link_hash_entry): Add tls_type and tls_tpoff32.
987         (sh_elf_hash_entry, sh_elf_tdata, sh_elf_local_got_tls_type):
988         New macros.
989         (sh_elf_obj_tdata): New.
990         (elf_sh_link_hash_table): Add tls_ldm_got.
991         (sh_elf_link_hash_table_create): Clear refcount of tls_ldm_got.
992         (allocate_dynrelocs): Support TLS relocs.
993         (sh_elf_size_dynamic_sections): Likewise.
994         (sh_elf_relocate_section): Support TLS relocs.  Don't try to find
995         .rela.got section when found already.  Return false after printing
996         error about unresolvable relocation.
997         (sh_elf_gc_sweep_hook): Support TLS relocs.
998         (sh_elf_check_relocs): Likewise.
999         (sh_elf_finish_dynamic_symbol): Likewise.
1000         (bfd_elf32_mkobject, elf_backend_object_p): Define for TLS case.
1001         * reloc.c: Add SH TLS relocs.
1002         * bfd-in2.h, libbfd.h: Regenerate.
1003
1004 2002-10-11  Daniel Jacobowitz  <drow@mvista.com>
1005
1006         * Makefile.in: Regenerated.
1007
1008 2002-10-11  Daniel Jacobowitz  <drow@mvista.com>
1009
1010         * Makefile.am: Run dep-am.
1011         (BFD_H_DEP): Add simple.c and linker.c.
1012         (BFD32_LIBS): Add simple.lo.
1013         (BFD32_LIBS_CFILES): Add simple.c.
1014         * Makefile.in: Regenerated.
1015         * bfd-in2.h: Regenerated.
1016         * simple.c: New file.
1017
1018 2002-10-11  Alan Modra  <amodra@bigpond.net.au>
1019
1020         * coff-arm.c (record_arm_to_thumb_glue): Avoid type-punned pointers.
1021         (record_thumb_to_arm_glue): Likewise.
1022         * ecoff.c (ecoff_link_add_externals): Likewise.
1023         * elf32-arm.h (record_arm_to_thumb_glue): Likewise.
1024         (record_thumb_to_arm_glue): Likewise.
1025         * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
1026         * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
1027         * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
1028         * elf64-alpha.c (elf64_alpha_create_dynamic_sections): Likewise.
1029         * elf64-ppc.c (func_desc_adjust): Likewise.
1030         * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
1031         (sh64_elf64_create_dynamic_sections): Likewise.
1032         * elflink.c (_bfd_elf_create_got_section): Likewise.
1033         (_bfd_elf_create_dynamic_sections): Likewise.
1034         (_bfd_elf_create_linker_section): Likewise.
1035         * elflink.h (elf_add_default_symbol): Likewise.
1036         (elf_link_create_dynamic_sections): Likewise.
1037         (NAME(bfd_elf,size_dynamic_sections)): Likewise.
1038         * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Likewise.
1039         * elfxx-mips.c (mips_elf_create_got_section): Likewise.
1040         (_bfd_mips_elf_add_symbol_hook): Likewise.
1041         (_bfd_mips_elf_create_dynamic_sections): Likewise.
1042         * linker.c (generic_link_add_symbol_list): Likewise.
1043         * xcofflink.c (xcoff_link_add_symbols): Likewise.
1044
1045         * elfxx-ia64.c (oor_brl, oor_ip): Conditionally define.
1046
1047         * elf64-ppc.c (edit_opd): Only zero opd syms when function is
1048         completely removed.  Correct local sym adjustment.
1049
1050 2002-10-10  Stephen Clarke <stephen.clarke@superh.com>
1051
1052         * elf32-sh.c (elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
1053         Correct mistake in calculation of address of .got.
1054         * elf64-sh64.c (elf_sh64_pic_plt_entry_be,
1055         elf_sh64_pic_plt_entry_le): Likewise.
1056
1057 2002-10-09  Richard Shann <richard.shann@superh.com>
1058             Stephen Clarke <stephen.clarke@superh.com>
1059
1060         * Makefile.am: Add entries for elf32-sh64-lin.c and
1061         elf64-sh64-lin.c. Regenerate.
1062         * Makefile.in: Regenerate.
1063         * config.bfd:  Change sh64eb-*-linux* and sh64-*-linux*
1064         to use sh64 vectors rather than sh vectors.
1065         * configure.in: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
1066         bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
1067         * configure: Regenerate.
1068         * elf32-sh64-lin.c: New file.
1069         * elf64-sh64-lin.c: New file.
1070         * targets.c: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
1071         bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
1072
1073 2002-10-08  H.J. Lu <hjl@gnu.org>
1074
1075         * elf32-i386.c (elf_i386_relocate_section): Re-arrange the
1076         IE->LE transition for R_386_TLS_IE.
1077
1078 2002-10-08  Alan Modra  <amodra@bigpond.net.au>
1079
1080         * elf64-ppc.c (edit_opd): Correct test for discarded sections.
1081
1082 2002-10-07  Mark Elbrecht  <snowball3@softhome.net>
1083
1084         * cofflink.c (mark_relocs): Don't mark relocations in excluded
1085         sections.
1086
1087 2002-10-07  Alan Modra  <amodra@bigpond.net.au>
1088
1089         * elflink.h (elf_link_input_bfd): Remove BFD_VERSION_DATE dependent
1090         code.
1091
1092         * elf64-ppc.c (ppc64_elf_build_stubs): Increment .glink indx.
1093
1094 2002-10-06  Alan Modra  <amodra@bigpond.net.au>
1095
1096         * opncls.c: Formatting.
1097         (_bfd_new_bfd): Use a smaller section hash table.
1098
1099 2002-10-05  Alexandre Oliva  <aoliva@redhat.com>
1100
1101         * elfxx-mips.c (mips_elf_create_dynamic_relocation): Set the type
1102         of the other two relocations packed with a REL32 to NONE.
1103
1104 2002-10-02  Stephen Clarke <stephen.clarke@superh.com>
1105
1106         * elf32-sh.c (elf_sh_link_hash_entry): Add gotplt_refcount.
1107         (sh_elf_link_hash_newfunc): Initialize it.
1108         (allocate_dynrelocs): Transfer gotplt refs from plt.refcount
1109         to got.refcount for symbols that are forced local or when
1110         we have direct got refs.
1111         (sh_elf_gc_sweep_hook): Adjust gotplt_refcount.  Use it
1112         to correctly adjust got.refcount and plt.refcount.
1113         (sh_elf_copy_indirect_symbol): Copy gotplt_refcount across.
1114         (sh_elf_check_relocs): Increment gotplt_refcount.
1115
1116 2002-10-01  Jakub Jelinek  <jakub@redhat.com>
1117
1118         * elf32-i386.c (elf_i386_relocate_section): Fix
1119         movl foo@indntpoff, %eax IE->LE transition.
1120
1121 2002-10-01  Jakub Jelinek  <jakub@redhat.com>
1122
1123         * elf64-x86-64.c (elf64_x86_64_relocate_section): Change TLSGD
1124         sequence and its transitions.
1125
1126 2002-10-01  Jakub Jelinek  <jakub@redhat.com>
1127
1128         * elf32-i386.c (elf_i386_relocate_section): Resolve R_386_TLS_LDO_32
1129         to st_value + addend in non-code sections.
1130         * elf64-x86-64.c (elf64_x86_64_relocate_section): Resolve
1131         R_X86_64_DTPOFF32 to st_value + addend in non-code sections.
1132
1133 2002-09-30  Gavin Romig-Koch  <gavin@redhat.com>
1134             Ken Raeburn  <raeburn@cygnus.com>
1135             Aldy Hernandez  <aldyh@redhat.com>
1136             Eric Christopher  <echristo@redhat.com>
1137             Richard Sandiford  <rsandifo@redhat.com>
1138
1139         * archures.c (bfd_mach_mips4120, bfd_mach_mips5400): New.
1140         (bfd_mach_mips5500): New.
1141         * cpu-mips.c (I_mips4120, I_mips5400, I_mips5500): New.
1142         (arch_info_struct): Add corresponding entries here.
1143         * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_4120,
1144         E_MIPS_MACH_5400 and E_MIPS_MACH_5500.
1145         (_bfd_mips_elf_final_write_processing): Handle bfd_mach_mips4120,
1146         bfd_mach_mips5400 and bfd_mach_mips5500.
1147         (_bfd_mips_elf_mach_extends_p): New function.
1148         (_bfd_mips_elf_merge_private_bfd_data): Use it to help merge
1149         the EF_MIPS_MACH flags.
1150         * bfd-in2.h: Regenerate.
1151
1152 2002-09-28  Jason Thorpe  <thorpej@wasabisystems.com>
1153
1154         * elf32-vax.c (elf_vax_size_dynamic_section): Don't strip
1155         .got sections.
1156
1157 2002-09-28  Alan Modra  <amodra@bigpond.net.au>
1158
1159         * elf.c (map_sections_to_segments): Correct test for start of
1160         writable section in the same page as end of read-only section.
1161
1162 2002-09-27  Matt Thomas  <matt@3am-software.com>
1163
1164         * elf32-vax.c (elf_vax_check_relocs): Remove unused
1165         local_got_refcounts usage.  Remove allocation of got slot.
1166         (elf_vax_gc_sweep_hook): Remove unused local_got_refcounts usage.
1167         Remove de-allocation of got slot.
1168         (elf_vax_size_dynamic_section): Fix some indentation.  Add hash
1169         traversal for elf_vax_instantiate_got_entries.  Allow empty .got
1170         sections to be GC'ed.
1171         (elf_vax_instantiate_got_entries): New function.
1172         (elf_vax_relocate_section): Simplify R_VAX_GOT32 handling.  Remove
1173         tests that are now handled by elf_vax_instantiate_got_entries.
1174         Assert GOT entry falls within .got section size.  Remove redundant
1175         comparisions.  Fix comments.
1176
1177 2002-09-27  Jakub Jelinek  <jakub@redhat.com>
1178
1179         * reloc.c: Add x86-64 TLS relocs.
1180         * bfd-in2.h, libbfd.h: Rebuilt.
1181         * elf64-x86-64.c (x86_64_elf_howto): Fix size fields for 32-bit
1182         relocs.  Add TLS relocs.
1183         (x86_64_reloc_map): Add TLS relocs.
1184         (elf64_x86_64_info_to_howto): Adjust for added TLS relocs.
1185         (struct elf64_x86_64_link_hash_entry): Add tls_type field.
1186         (GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD, GOT_TLS_IE): Define.
1187         (elf64_x86_64_hash_entry): Define.
1188         (struct elf64_x86_64_obj_tdata): New.
1189         (elf64_x86_64_tdata, elf64_x86_64_local_got_tls_type): Define.
1190         (struct elf64_x86_64_link_hash_table): Add tls_ld_got.
1191         (link_hash_newfunc): Initialize tls_type.
1192         (elf64_x86_64_link_hash_table_create): Initialize tls_ld_got.
1193         (elf64_x86_64_copy_indirect_symbol): Swap tls_type if necessary.
1194         (elf64_x86_64_mkobject): New.
1195         (elf64_x86_64_elf_object_p): Allocate struct elf64_x86_64_obj_tdata.
1196         (elf64_x86_64_tls_transition): New.
1197         (elf64_x86_64_check_relocs): Add r_type variable and use it.
1198         Handle TLS relocs.
1199         (elf64_x86_64_gc_sweep_hook): Handle TLS relocs.
1200         (allocate_dynrelocs): Allocate GOT space for TLS relocs.
1201         (elf64_x86_64_size_dynamic_sections): Likewise.
1202         (dtpoff_base, tpoff): New.
1203         (elf64_x86_64_relocate_section): Handle TLS relocs.
1204         (elf64_x86_64_finish_dynamic_symbol): Only handle non-TLS GOT
1205         entries.
1206         (bfd_elf64_mkobject): Define.
1207
1208         * elf32-i386.c (elf_i386_check_relocs) [R_386_TLS_LE]: Set
1209         DF_STATIC_TLS if shared.
1210
1211 2002-09-26  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1212
1213         * elfxx-mips.c (_bfd_mips_elf_fake_sections): Don't emit unneeded
1214         empty relocation sections.
1215
1216 2002-09-26  Alan Modra  <amodra@bigpond.net.au>
1217
1218         * elf64-ppc.c (ppc_build_one_stub): Don't build glink stubs here.
1219         (ppc64_elf_build_stubs): Build them here instead.
1220
1221 2002-09-24  Jakub Jelinek  <jakub@redhat.com>
1222
1223         * elf32-sparc.c (elf32_sparc_relocate_section): Put R_SPARC_RELATIVE
1224         addend into r_addend, not *r_offset.
1225         (elf32_sparc_finish_dynamic_symbol): Likewise.
1226         * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Clear xword at
1227         R_SPARC_RELATIVE's r_offset.
1228
1229 2002-09-23  Nathan Tallent  <eraxxon@alumni.rice.edu>
1230
1231         * dwarf2.c (decode_line_info): Update to correctly decode
1232         the (non-standard DWARF2) out-of-order address sequences
1233         generated by the Intel C++ 6.0 compiler for ia64-Linux.
1234
1235 2002-09-23  Mark Elbrecht  <snowball3@softhome.net>
1236
1237         * config.bfd: For DJGPP targets, match with any cpu and any machine.
1238
1239 2002-09-23  Alan Modra  <amodra@bigpond.net.au>
1240
1241         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Zero relocs
1242         for discarded FDEs.  Remove redundant assignment.
1243         * elflink.h (elf_bfd_discard_info): Save edited relocs.
1244
1245 2002-09-22  H.J. Lu <hjl@gnu.org>
1246
1247         * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Don't merge
1248         the relocation count between different .reloc sections.
1249
1250 2002-09-21  Alan Modra  <amodra@bigpond.net.au>
1251
1252         * elf32-ppc.c (ppc_elf_relocate_section): Allow ".sbss.*" and
1253         ".sdata.*" for R_PPC_SDAREL16, ".sbss2*" and ".sdata2*" for
1254         R_PPC_EMB_SDA2REL.  Similarly for R_PPC_EMB_SDA21 and
1255         R_PPC_EMB_RELSDA.
1256
1257         * elfcode.h (elf_slurp_reloc_table_from_section): Make "symcount"
1258         unsigned.  Move "symcount" assignment out of loop.
1259         * Makefile.am: Run "make dep-am".
1260         * Makefile.in: Regenerate.
1261         * configure: Regenerate.
1262         * po/SRC-POTFILES.in: Regnerate.
1263
1264 2002-09-19  Nathan Tallent  <eraxxon@alumni.rice.edu>
1265
1266         * dwarf2.c (_bfd_dwarf2_find_nearest_line): If address length is
1267         zero, set it to 8 for (non-standard) 64-bit DWARF2 formats
1268         (e.g. IRIX64).
1269
1270 2002-09-19  Jakub Jelinek  <jakub@redhat.com>
1271
1272         * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Clear .got word
1273         even if generating R_PPC_RELATIVE reloc.
1274         (ppc_elf_relocate_section): Make sure relocation is performed
1275         if skip == -2.  Clear memory at r_offset when creating dynamic
1276         relocation.
1277
1278 2002-09-19  Jakub Jelinek  <jakub@redhat.com>
1279
1280         * reloc.c (BFD_RELOC_386_TLS_TPOFF, BFD_RELOC_386_TLS_IE,
1281         BFD_RELOC_386_TLS_GOTIE): Add.
1282         * bfd-in2.h, libbfd.h: Rebuilt.
1283         * elf32-i386.c (elf_howto_table): Add R_386_TLS_TPOFF, R_386_TLS_IE
1284         and R_386_TLS_GOTIE.
1285         (elf_i386_reloc_type_lookup): Handle it.
1286         (struct elf_i386_link_hash_entry): Change tls_type type to unsigned
1287         char instead of enum, change GOT_* into defines.
1288         (GOT_TLS_IE_POS, GOT_TLS_IE_NEG, GOT_TLS_IE_BOTH): Define.
1289         (elf_i386_tls_transition): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
1290         (elf_i386_check_relocs): Likewise.  Avoid crash if local symbol is
1291         accessed both as normal and TLS symbol.  Move R_386_TLS_LDM and
1292         R_386_PLT32 cases so that R_386_TLS_IE can fall through.
1293         Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
1294         (elf_i386_gc_sweep_hook): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
1295         Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
1296         (allocate_dynrelocs): Allocate 2 .got and 2 .rel.got entries if
1297         tls_type is GOT_TLS_IE_BOTH.
1298         (elf_i386_size_dynamic_sections): Likewise.
1299         (elf_i386_relocate_section): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
1300         Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
1301         (elf_i386_finish_dynamic_symbol): Use tls_type & GOT_TLS_IE to catch
1302         all 4 GOT_TLS_* TLS types.
1303
1304 2002-09-19  Nick Clifton  <nickc@redhat.com>
1305
1306         * elflink.h (elf_fix_symbol_flags): When examining weak symbols,
1307         follow indirect links.
1308
1309 2002-09-19  Nathan Tallent  <eraxxon@alumni.rice.edu>
1310
1311         * ecoffswap.h (ecoff_swap_pdr_in) <isym, iline>: Update to
1312         correctly sign-extend 32-bit ECOFF null values (0xffffffff, -1)
1313         on 64 bit machines.
1314         (ecoff_swap_sym_in) <iss>: Likewise.
1315         * ecoff.c (_bfd_ecoff_slurp_symbolic_info): Fix error reading
1316         ECOFF information: 'ioptMax' refers to the actual *size*
1317         of the optimization symtab, not the number of entries.
1318
1319 2002-09-19  Daniel Jacobowitz  <drow@mvista.com>
1320
1321         * elf32-arm.h (elf32_arm_adjust_dynamic_symbol): Update
1322         ELF_LINK_HASH_NEEDS_PLT logic.
1323
1324 2002-09-18  Daniel Jacobowitz  <drow@mvista.com>
1325
1326         * elfcode.h (elf_slurp_reloc_table_from_section): Check
1327         correct relocation count.
1328
1329 2002-09-17  Daniel Jacobowitz  <drow@mvista.com>
1330
1331         * bfd-in.h (bfd_get_dynamic_symcount): Define.
1332         * bfd.c (struct _bfd): Add dynsymcount.
1333         * bfd-in2.h: Regenerated.
1334         * elf.c (_bfd_elf_canonicalize_dynamic_symtab): Set
1335         abfd->dynsymcount.
1336         * elfcode.h (elf_slurp_reloc_table_from_section): Check
1337         for overflow.
1338
1339 2002-09-17  Stan Cox <scox@redhat.com>
1340
1341         * elf64-mips.c (mips_elf64_be_swap_reloca_out): Handle type2 and type3.
1342         (mips_elf64_final_gp): Don't make up gp value.
1343         * elfn32-mips.c (mips_elf_final_gp): Likewise.
1344         * elfxx-mips.c (_bfd_mips_elf_final_link): Always create
1345         .MIPS.options/.options section.
1346
1347 2002-09-17  David O'Brien  <obrien@FreeBSD.org>
1348
1349         * elf32-i386-fbsd.c: Always label using the EI_OSABI method.
1350         It is benign for FreeBSD < 4.1.  Minor reformatting.
1351         * elf64-alpha-fbsd.c: Likewise.
1352
1353 2002-09-17  Jakub Jelinek  <jakub@redhat.com>
1354
1355         * elf32-i386.c (elf_i386_relocate_section) [R_386_TLS_TPOFF32]: Negate
1356         addend.
1357
1358 2002-09-17  Alan Modra  <amodra@bigpond.net.au>
1359
1360         * elf64-alpha.c (alpha_elf_size_info): Make static.
1361
1362 2002-09-17  Svein E. Seldal  <Svein.Seldal@solidas.com>
1363
1364         * coff-tic4x.c: Add function declarations and ATTRIBUTE_UNUSED.
1365         * cpu-tic4x.c: Ditto.
1366
1367 2002-09-17  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1368
1369         * elf64-mips.c (define elf_backend_ignore_discarded_relocs): Remove
1370         duplicate define.
1371
1372 2002-09-16  Bruno Haible  <bruno@clisp.org>
1373
1374         * elf32-i386.c: Don't defined ELF_ARCH etc. if this file is included
1375         by a target variant implementation.
1376         * elf64-alpha.c: Likewise.
1377         * elf32-i386-fbsd.c: New file.
1378         * elf64-alpha-fbsd.c: New file.
1379         * targets.c: Support bfd_elf32_i386_freebsd_vec and
1380         bfd_elf64_alpha_freebsd_vec.
1381         * configure.in: Accept the vectors bfd_elf32_i386_freebsd_vec,
1382         bfd_elf64_alpha_freebsd_vec.
1383         * Makefile.am (BFD32_BACKENDS): Add elf32-i386-fbsd.lo.
1384         (BFD32_BACKENDS_CFILES): Add elf32-i386-fbsd.c.
1385         (BFD64_BACKENDS): Add elf64-alpha-fbsd.lo.
1386         (BFD64_BACKENDS_CFILES): Add elf64-alpha-fbsd.c.
1387         (elf32-i386-fbsd.lo, elf64-alpha-fbsd.lo): Add dependencies.
1388         * config.bfd: For FreeBSD targets, set targ_defvec to a FreeBSD
1389         specific targets. Define OLD_FREEBSD_ABI_LABEL if appropriate.
1390
1391 2002-09-12  Jakub Jelinek  <jakub@redhat.com>
1392
1393         * elf32-i386.c (dtpoff_base, tpoff): Don't crash if tls_segment is
1394         NULL.
1395         (elf_i386_relocate_section): Return false after printing error about
1396         unresolvable relocation.
1397
1398 2002-09-12  Nick Clifton  <nickc@redhat.com>
1399
1400         * elf32-arm.h (elf32_arm_final_link_relocate): Fix handling of
1401         R_ARM_THM_PC11.
1402
1403 2002-09-11  Jeffrey Law  <law@redhat.com>
1404
1405         * elf32-h8300.c (elf32_h8_relax_section): Fix typo.
1406
1407 2002-09-11  Andrew Haley  <aph@cambridge.redhat.com>
1408
1409         * elf.c (_bfd_elf_find_nearest_line): Check functionname_ptr and
1410         line_ptr before deciding we've found a symbol.
1411
1412 2002-09-11  Nick Clifton  <nickc@redhat.com>
1413
1414         * po/da.po: New Danish translation file.
1415         * configure.in (LINGUAS): Add 'da'.
1416         * configure: Regenerate.
1417
1418 2002-09-10  Michael Snyder  <msnyder@redhat.com>
1419
1420         * irix-core.c (do_sections, do_sections64): New functions.
1421         (irix_core_core_file_p): Call new functions do_sections,
1422         do_sections64, depending on corefile (32-bit or 64-bit).
1423
1424 2002-09-09  Richard Henderson  <rth@redhat.com>
1425
1426         * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21M
1427         and PCREL21F like PCREL21B.
1428
1429 2002-09-04  Kevin Buettner  <kevinb@redhat.com>
1430
1431         * config.bfd (mips*-*-irix6*): Add new ABI vectors.  Make n32 default
1432         vector.
1433
1434 2002-09-02  Nick Clifton  <nickc@redhat.com>
1435
1436         * elf32-v850.c (v850_elf_final_link_relocate): Use helpful
1437         names instead of cryptically overloaded bfd_reloc error
1438         codes.
1439         (v850_elf_relocate_section): Likewise.
1440         (v850_elf_relax_section): Replace caching of external symbols
1441         with caching of internal symbols obtained from calling
1442         bfd_elf_get_elf_syms().
1443         Fixup problems with freeing cached allocated memory blocks.
1444
1445 2002-09-02  Alan Modra  <amodra@bigpond.net.au>
1446
1447         * cpu-pj.c (scan_mach, compatible, arch_info_struct): Remove.
1448         (bfd_pj_arch): Use bfd_default_scan.
1449         * cpu-v850.c (scan): Remove.
1450         (N): Use bfd_default_scan.
1451         * cpu-z8k.c (scan_mach): Remove.
1452         (arch_info_struct, bfd_z8k_arch): Reorganize so that the default is
1453         first.  Use bfd_default_scan.
1454
1455         * ecoff.c (_bfd_ecoff_set_arch_mach_hook): Don't use hard-coded
1456         bfd_mach constants.
1457         (ecoff_get_magic): Likewise.
1458         * elf32-v850.c (v850_elf_object_p): Likewise.
1459         (v850_elf_final_write_processing): Likewise.
1460         * mipsbsd.c (MY(set_arch_mach)): Likewise.
1461         (MY(write_object_contents)): Likewise.
1462         * coff64-rs6000.c (xcoff64_write_object_contents): Likewise.
1463         * coffcode.h (coff_write_object_contents): Likewise.
1464         (coff_set_arch_mach_hook): Add comment describing machine == 0.
1465         Remove unnecessary "machine" assignments.
1466         (coff_write_relocs): Test for the absolute section sym by testing
1467         section and flags.
1468
1469         * aoutx.h (NAME(aout,machine_type)): Recognize bfd_mach_i386_i386
1470         and bfd_mach_i386_i386_intel_syntax.
1471         * pdp11.c (NAME(aout,machine_type)): Likewise.
1472
1473 2002-08-30  John David Anglin  <dave@hiauly1.hia.nrc.ca>
1474
1475         * bfd-in.h (align_power): Cast constants to bfd_vma type.
1476         * bfd-in2.h (align_power): Likewise.
1477
1478 2002-08-30  Alan Modra  <amodra@bigpond.net.au>
1479
1480         * Makefile.am: Run "make dep-am".
1481         * Makefile.in: Regenerate.
1482
1483         * cpu-avr.c (compatible): Don't use hard-coded mach constants.
1484         * cpu-powerpc.c (powerpc_compatible): Likewise.
1485         * cpu-rs6000.c (rs6000_compatible): Likewise.
1486
1487 2002-08-28  Catherine Moore  <clm@redhat.com>
1488
1489         * elf32-v850.c (v850_elf_reloc_map):  Add new relocs.
1490         (v850-elf-reloc): Don't resolve pc relative relocs.
1491         (v850_elf_ignore_reloc): New routine.
1492         (v850_elf_final_link_relocate): Handle new relocs.
1493         (v850_elf_relax_delete_bytes ): New routine.
1494         (v850_elf_relax_section): New routine.
1495         (bfd_elf32_bfd_relax_section): Define.
1496         (HOWTO): New entries for new relocs.
1497         * reloc.c (BFD_RELOC_V850_LONGCALL): New reloc.
1498         (BFD_RELOC_V850_LONGJUMP): New reloc.
1499         (BFD_RELOC_V850_ALIGN): New reloc.
1500         * archures.c: Remove redundant v850ea architecture.
1501         * cpu-v850.c: Remove redundant v850ea support.
1502         * libbfd.h: Regenerate.
1503         * bfd-in2.h: Regenerated.
1504
1505 2002-08-28  Svein E. Seldal  <Svein.Seldal@solidas.com>
1506
1507         * config.bfd: Add tic4x-*-*coff* and c4x-*-*coff* target.
1508         * configure.in: Add tic4x_coff vector files.
1509         * configure: Regenerate.
1510         * Makefile.am: Add tic4x target.
1511         * Makefile.in: Regenerate.
1512
1513 2002-08-27  Michael Hayes <m.hayes@elec.canterbury.ac.nz>
1514
1515         * archures.c: Add the BFD arch type tic4x.
1516         * bfd-in.h: Add BFD_IN_MEMORY flag.
1517         * coff-tic4x.c: New file.
1518         * coffswap.h (coff_swap_sym_out): Add preadjuster.
1519         * cpu-tic4x.c: New file.
1520         * targets.c: Added tic4x- in list of xvecs.
1521         * ticoff.h: New file.
1522         * bfd-in2.h: Regenerate.
1523
1524 2002-08-27  Adam Nemet  <anemet@lnxw.com>
1525
1526         * elf32-arm.h (elf32_arm_finish_dynamic_sections): Set the last
1527         bit of DT_INIT and DT_FINI for Thumb functions.
1528
1529 2002-08-26  Alan Modra  <amodra@bigpond.net.au>
1530
1531         * coffcode.h (coff_set_arch_mach_hook): Handle W65MAGIC.
1532
1533 2002-08-26  Alan Modra  <amodra@bigpond.net.au>
1534
1535         * aoutx.h (NAME(aout,reloc_type_lookup)): Handle BFD_RELOC_8.
1536
1537 2002-08-24  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1538
1539         * elf32-sh.c (sh_elf_copy_indirect_symbol): New.
1540         (create_got_section, allocate_dynrelocs, readonly_dynrelocs):
1541         Likewise.
1542         (struct elf_sh_pcrel_relocs_copied): Removed.
1543         (struct elf_sh_dyn_relocs): New.
1544         (struct elf_sh_link_hash_entry): Replace pcrel_relocs_copied
1545         field with dyn_relocs.
1546         (struct elf_sh_link_hash_table): Add short-cuts to get dynamic
1547         sections and sym_sec.
1548         (sh_elf_link_hash_newfunc): Clear dyn_relocs.
1549         (sh_elf_link_hash_table_create): Clear shorts-cuts and sym_sec.
1550         (sh_elf_create_dynamic_sections): Use create_got_section instead
1551         of _bfd_elf_create_got_section.
1552         (sh_elf_check_relocs): Likewise.
1553         (sh_elf_create_dynamic_sections): Use short-cuts to the dynamic
1554         sections.
1555         (sh_elf_adjust_dynamic_symbol, sh_elf_size_dynamic_sections,
1556         sh_elf_relocate_section, sh_elf_check_relocs,
1557         sh_elf_finish_dynamic_symbol, sh_elf_finish_dynamic_sections):
1558         Likewise.
1559         (sh_elf_adjust_dynamic_symbol): Handle nocopyreloc. Keep the
1560         dynamic relocations and avoiding the copy relocation when we
1561         didn't find any dynamic relocations in the section which has
1562         contents or is read-only.
1563         (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
1564         (sh_elf_size_dynamic_sections): Don't reset the size of
1565         .rela.got section even if dynamic_sections_created flag is off.
1566         Don't use sh_elf_discard_copies. Scan all input bfd and use
1567         allocate_dynrelocs. Call readonly_dynrelocs to determine
1568         whether we need DT_TEXTREL.
1569         (sh_elf_adjust_dynamic_symbol): Use plt.refcount to determine
1570         whether the symbol was never referred to.
1571         (sh_elf_relocate_section): Use WILL_CALL_FINISH_DYNAMIC_SYMBOL.
1572         (sh_elf_gc_sweep_hook): Fill with the real sweep function.
1573         (sh_elf_check_relocs): Call create_got_section if the short-cut
1574         to .got is null. Increment reference counters only instead of
1575         allocating space on dynamic sections here. Don't conditionalize
1576         uninitialized got.offset value when marking the symbol as a
1577         global offset table entry. Keep relocations for symbols satisfied
1578         by a dynamic library to avoid copy relocations for the symbol.
1579         Set dynobj field of an elf hash table if needed.
1580         (sh_elf_finish_dynamic_sections): Handle null section pointer
1581         correctly.
1582         (elf_backend_copy_indirect_symbol): Defined.
1583         (elf_backend_can_refcount): Defined.
1584
1585 2002-08-23  Nick Clifton  <nickc@redhat.com>
1586
1587         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Undo
1588         previous change.  Add comment explaining why.
1589
1590 2002-08-23  Stephen Clarke <stephen.clarke@superh.com>
1591
1592         * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le): Copy
1593         contents of .got.plt[2] to tr0, not address of .got.plt.
1594         (sh_elf_finish_dynamic_symbol): Do not apply GOT_BIAS when
1595         patching absolute plt entry. For shmedia plt entry, set bottom bit
1596         of branch to plt0 as this is a branch to an shmedia instruction.
1597         * elf64-sh64.c (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le):
1598         Copy contents of .got.plt[2] to tr0, not address of .got.plt.
1599         (elf_sh64_plt_entry_be, elf_sh64_plt_entry_le): Use ptrel to
1600         branch to plt0.
1601         (sh64_elf64_finish_dynamic_symbol): Do not apply GOT_BIAS when
1602         patching absolute plt entry. For shmedia plt entry, branch to
1603         plt0 is now ptrel, so use relative offset.  Set bottom bit of
1604         branch target as it is a branch to an shmedia instruction.
1605
1606 2002-08-23  Stephen Clarke <stephen.clarke@superh.com>,
1607             Richard Shann <richard.shann@superh.com>
1608
1609         * elf32-sh.c (sh_elf_finish_dynamic_sections): Set LSB of DT_INIT
1610         value if .init is an SHmedia function.  Similarly for DT_FINI.
1611         * elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Likewise.
1612
1613 2002-08-23  Stephen Clarke <stephen.clarke@superh.com>
1614
1615         * elf32-sh.c (sh_elf_size_dynamic_sections): Zero initialize
1616         dynamic section.
1617         * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
1618
1619 2002-08-22  Kaz Kojima <kkojima@rr.iij4u.or.jp>
1620
1621         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use a simple
1622         byte read when reading the return address register column.
1623
1624 2002-08-22  Nick Clifton  <nickc@redhat.com>
1625
1626         * config.bfd: Add powepc64-*-*bsd* target.
1627
1628 2002-08-22  Graeme Peterson  <gp@qnx.com>
1629
1630         * Makefile.am: Add entries for elf32-shqnx.c
1631         * Makefile.in: Regenerate.
1632         * config.bfd: Add support sh-*-nto* target.
1633         * configure.in: Add support for bfd_elf32_sh{l}qnx_vec.
1634         * configure: Regenerate.
1635         * elf32-qnx.h: Changed typo "elf_i386qnx_*" to "elf_qnx_*" .
1636         * elf32-sh.c: Do not include elf32-target.h if
1637         ELF32_SH_C_INCLUDED is defined.
1638         * elf32-shqnx.c: New file: Support for QNX.
1639         * targets.c: Add bfd_elf32_sh{l}qnx_vec.
1640
1641 2002-08-22  Nick Clifton  <nickc@redhat.com>
1642
1643         * po/tr.po: Updated Turkish translation.
1644
1645         * syms.c (_bfd_generic_read_minisymbols): Set bfd_error if the
1646         symbols are not read.
1647
1648 2002-08-22  Alan Modra  <amodra@bigpond.net.au>
1649
1650         * elf32-m68hc11.c: Formatting fixes.
1651         (elf32_m68hc11_gc_mark_hook): Correct params.  Remove unnecessary test.
1652         * elf32-m68hc12.c: Formatting fixes.
1653         (elf32_m68hc11_gc_mark_hook): Correct params.  Remove unnecessary test.
1654
1655 2002-08-22  Alan Modra  <amodra@bigpond.net.au>
1656
1657         * coff-rs6000.c (rs6000coff_vec <object_flags>): Add SEC_CODE and
1658         SEC_DATA.
1659         (pmac_xcoff_vec): Likewise.
1660         * coff64-rs6000.c (rs6000coff64_vec): Likewise.
1661         (aix5coff64_vec): Likewise.
1662
1663 2002-08-22  Alan Modra  <amodra@bigpond.net.au>
1664
1665         * elf-bfd.h (struct elf_backend_data): Add struct elf_backend_data
1666         param to elf_backend_copy_indirect_symbol.
1667         (_bfd_elf_link_hash_copy_indirect): Likewise.
1668         * elflink.h (elf_add_default_symbol, elf_fix_symbol_flags): Adjust
1669         calls to copy_indirect_symbol.
1670         * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
1671         * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
1672         * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
1673         * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
1674         * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
1675         * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
1676         * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
1677         * elfxx-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
1678         * elfxx-mips.h (_bfd_mips_elf_copy_indirect_symbol): Likewise.
1679         * elf.c (_bfd_elf_link_hash_copy_indirect): Likewise.  Properly
1680         test refcounts for "used" values.
1681
1682 2002-08-21  John David Anglin  <dave@hiauly1.hia.nrc.ca>
1683
1684         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Add PARAMS to
1685         argument declaration.
1686
1687 2002-08-19  Elena Zannoni <ezannoni@redhat.com>
1688
1689         * archures.c (bfd_mach_ppc_e500): Added.
1690         * bfd-in2.h: Rebuilt.
1691         * cpu-powerpc.c (bfd_powerpc_archs): Added e500.
1692
1693 2002-08-19  Alan Modra  <amodra@bigpond.net.au>
1694
1695         * elf32-m68hc12.c (elf_backend_can_gc_sections): False.
1696
1697 2002-08-17  Andrew Cagney  <ac131313@redhat.com>
1698
1699         * elf.c (bfd_elf_get_elf_syms): Change type of `esym' to
1700         `bfd_byte'.
1701
1702 2002-08-17  Stan Cox  <scox@redhat.com>
1703
1704         * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Use the
1705         IRIX 6 segment layout for NEWABI.
1706
1707 2002-08-16  Stephen Clarke <stephen.clarke@superh.com>
1708
1709         * bfd/elf32-sh.c (sh_elf_gc_mark_hook): For sh64, skip indirect
1710         symbols when looking for section referred to by a relocation.
1711         * bfd/elf64-sh.c (sh_elf64_gc_mark_hook): Likewise.
1712
1713 2002-08-15  Alan Modra  <amodra@bigpond.net.au>
1714
1715         * elf32-i370.c: Move reloc enum to include/elf/i370.h.
1716
1717 2002-08-15  Hans-Peter Nilsson  <hp@axis.com>
1718
1719         * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Add
1720         missing check for whether the symbol is referenced by DSO before
1721         unexporting it as an unneeded dynamic symbol.
1722
1723 2002-08-14  H.J. Lu <hjl@gnu.org>
1724
1725         * libbfd.h: Regenerate.
1726
1727 2002-08-14  H.J. Lu <hjl@gnu.org>
1728
1729         * config.bfd: Always add 64bit vectors to 32bit Linux/mips.
1730
1731 2002-08-14  Stephane Carrez  <stcarrez@nerim.fr>
1732
1733         * elf32-m68hc11.c (m68hc11_relax_group): New to relax group of
1734         instructions.
1735         (m68hc11_direct_relax): New to define table of relaxable instructions.
1736         (find_relaxable_insn): New, find a relaxable insn.
1737         (compare_reloc): New to compare two relocs.
1738         (m68hc11_elf_relax_section): New, relax text sections.
1739         (m68hc11_elf_relax_delete_bytes): New, delete bytes and adjust branchs.
1740         (elf32_m68hc11_check_relocs): New function for GC support.
1741         (elf32_m68hc11_relocate_section): New function for GC support.
1742         (bfd_elf32_bfd_relax_section): Define to support linker relaxation.
1743         (elf_backend_check_relocs): Likewise.
1744         (elf_backend_relocate_section): Likewise.
1745
1746 2002-08-13  H.J. Lu <hjl@gnu.org>
1747
1748         * elflink.h (NAME(bfd_elf,size_dynamic_sections): Don't count
1749         definitions in shared objects when checking symbol with
1750         undefined version.
1751
1752 2002-08-13  Stephane Carrez  <stcarrez@nerim.fr>
1753
1754         * elf32-m68hc11.c (elf32_m68hc11_gc_mark_hook): New for section GC.
1755         (elf32_m68hc11_gc_sweep_hook): Likewise.
1756         (elf_backend_gc_mark_hook): Define for GC section support.
1757         (elf_backend_gc_sweep_hook): Likewise.
1758         (elf_backend_can_gc_sections): Likewise.
1759
1760         * elf32-m68hc12.c: Likewise.
1761
1762 2002-08-13  Stephane Carrez  <stcarrez@nerim.fr>
1763
1764         * elf32-m68hc11.c (_bfd_m68hc11_elf_print_private_bfd_data): New.
1765         (_bfd_m68hc11_elf_merge_private_bfd_data): New function.
1766         (_bfd_m68hc11_elf_set_private_flags): New function.
1767         Use them to set/check/print ELF flags specific to 68HC11.
1768
1769         * elf32-m68hc12.c (_bfd_m68hc12_elf_print_private_bfd_data): New.
1770         (_bfd_m68hc12_elf_merge_private_bfd_data): New function.
1771         (_bfd_m68hc12_elf_set_private_flags): New function.
1772         Use them to set/check/print ELF flags specific to 68HC12.
1773
1774 2002-08-13  Stephane Carrez  <stcarrez@nerim.fr>
1775
1776         * elf32-m68hc11.c (elf_m68hc11_howto_table): Add the new relocs;
1777         fix masks for PC-rel relocs.
1778         (m68hc11_elf_ignore_reloc): New function.
1779
1780         * elf32-m68hc12.c (m68hc12_elf_special_reloc): New to handle specific
1781         68HC12 banked addressing relocs.
1782         (m68hc12_phys_addr): New to compute physical address of banked memory.
1783         (m68hc12_phys_page): Likewise for page.
1784         (m68hc12_addr_is_banked): New to see if address is in banked area.
1785         (elf_m68hc12_howto_table): Add new relocs and rename to xx12.
1786
1787 2002-08-13  Stephane Carrez  <stcarrez@nerim.fr>
1788
1789         * reloc.c (BFD_RELOC_M68HC11_RL_JUMP, BFD_RELOC_M68HC11_RL_GROUP,
1790         BFD_RELOC_M68HC11_LO16, BFD_RELOC_M68HC11_PAGE,
1791         BFD_RELOC_M68HC11_24): New relocs for 68HC11/68HC12.
1792         * bfd-in2.h: Regenerate.
1793
1794 2002-08-12  H.J. Lu <hjl@gnu.org>
1795
1796         * elflink.h (elf_add_default_symbol): Preserve section across
1797         elf_merge_symbol.
1798
1799 2002-08-09  Graeme Peterson  <gp@qnx.com>
1800
1801         * Makefile.am: Add entries for elf32-ppcqnx.c, and add
1802         elf32-qnx.h dependency to elfarmqnx-nabi.c and elf32-i386qnx.c.
1803         * Makefile.in: Regenerate.
1804         * config.bfd: Add support for powerpc{le}-*-nto targets.
1805         * configure.in: Add support for bfd_elf32_powerpc{le}qnx_vec.
1806         * configure: Regenerate.
1807         * elf32-i386qnx.c: Moved backend functions into a QNX specific
1808         common file "elf32-qnx.h", and now include that file.
1809         * elf32-qnx.h: New file: QNX specific common elf backend.
1810         * elf32-ppc.c: Do not include elf32-target.h if
1811         ELF32_PPC_C_INCLUDED is defined.
1812         * elf32-ppcqnx.c: New file: Support for QNX.
1813         * elfarmqnx-nabi.c: Include elf32-qnx.h for qnx elf backend.
1814         * targets.c: Add bfd_elf32_powerpc{le}qnx_vec.
1815
1816 2002-08-09  Nick Clifton  <nickc@redhat.com>
1817
1818         * po/sv.po: Updated Swedish translation.
1819
1820 2002-08-09  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1821
1822         * elfxx-mips.c (mips_elf_global_got_index): Avoid segfault if
1823         g->global_gotsym is NULL.
1824
1825 2002-08-08  H.J. Lu <hjl@gnu.org>
1826
1827         * elflink.h (elf_add_default_symbol): Don't warn if a definition
1828         overrides an indirect versioned symbol.
1829
1830 2002-08-08  Jakub Jelinek  <jakub@redhat.com>
1831
1832         * elf32-i386.c (elf_i386_relocate_section): Fill in proper addend
1833         for R_386_TLS_TPOFF32 relocs against symndx 0.
1834
1835 2002-08-07  H.J. Lu <hjl@gnu.org>
1836
1837         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Check symbol
1838         with undefined version if needed.
1839         (elf_link_assign_sym_version): Match a default symbol with a
1840         version without definition. No need to hide the default
1841         definition separately.
1842
1843 2002-08-08  Alan Modra  <amodra@bigpond.net.au>
1844
1845         * elflink.h (elf_link_output_extsym): Don't output symbols from
1846         SEC_EXCLUDE sections.
1847
1848         * aoutx.h (aout_link_write_symbols): Correct handling of warning syms.
1849
1850 2002-08-07  Alan Modra  <amodra@bigpond.net.au>
1851
1852         * elf64-ppc.c (edit_opd): Arrange to drop symbols for discarded .opd
1853         entries.
1854
1855 2002-08-07  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1856
1857         * elfxx-mips.c (mips_elf_create_dynamic_relocation): Cast signedness
1858         mismatch.
1859
1860 2002-08-07  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1861
1862         * elfxx-mips.c (ABI_64_P): Remove superfluous check.
1863
1864 2002-08-07  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1865
1866         * elf32-mips.c (mips_reloc_map): Fix typo.
1867
1868 2002-08-06  Alan Modra  <amodra@bigpond.net.au>
1869
1870         * xcofflink.c (xcoff_write_global_symbol): Set n_scnum for abs_section.
1871
1872 2002-08-06  Alan Modra  <amodra@bigpond.net.au>
1873
1874         * elf64-ppc.c (ppc64_elf_howto_raw): Zero all src_mask entries.
1875
1876 2002-08-06  Alan Modra  <amodra@bigpond.net.au>
1877
1878         * libxcoff.h: Use PARAMS on function declarations.
1879         * coff-rs6000.c (xcoff_generate_rtinit): Simplify size calc.
1880         * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
1881
1882         * coff-rs6000.c: (xcoff_rtype2howto): Don't place reloc address in
1883         addend.
1884         * coff64-rs6000.c: (xcoff64_rtype2howto): Likewise.
1885
1886 2002-08-06  Alan Modra  <amodra@bigpond.net.au>
1887
1888         * coff-rs6000.c: Formatting fixes.
1889         (xcoff_calculate_relocation): Use PARAMS in declaration.
1890         (xcoff_complain_overflow): Likewise.
1891         (xcoff_ppc_relocate_section): Use old-style function pointer call.
1892         (bfd_xcoff_backend_data): Remove useless comments.
1893         (rs6000coff_vec): Likewise.
1894         (bfd_pmac_xcoff_backend_data): Likewise.
1895         (pmac_xcoff_vec): Likewise.
1896
1897         * coff64-rs6000.c: Formatting fixes.
1898         (xcoff64_calculate_relocation): Use PARAMS in declaration.
1899         (xcoff64_ppc_relocate_section): Use old-style function pointer call.
1900         (bfd_xcoff_backend_data): Remove useless comments.
1901         (rs6000coff64_vec): Likewise.
1902         (bfd_xcoff_aix5_backend_data): Likewise.
1903         (aix5coff64_vec): Likewise.
1904
1905 2002-08-06  Alan Modra  <amodra@bigpond.net.au>
1906
1907         * coff-rs6000.c (xcoff_howto_table): Revert some of last change to
1908         mask entries.  Use complain_overflow_dont for R_REF.
1909         (xcoff_reloc_type_ba): Revert last change.
1910         (xcoff_reloc_type_br): Likewise.
1911         (xcoff_reloc_type_crel): Likewise.
1912         (xcoff_ppc_relocate_section): Likewise.
1913         * coff64-rs6000.c (xcoff64_reloc_type_br): Likewise.
1914         (xcoff64_ppc_relocate_section): Likewise.
1915         (xcoff64_howto_table): Revert some of last change to mask entries.
1916         Use complain_overflow_dont for R_REF.
1917
1918         * coff-rs6000.c (xcoff_howto_table): Fix src_mask entries.  Make all
1919         relocs with bitsize == 16 have size = 1.
1920         (xcoff_reloc_type_ba): Correct src_mask and dst_mask adjustment.
1921         (xcoff_reloc_type_br): Likewise.
1922         (xcoff_reloc_type_crel): Likewise.
1923         (xcoff_ppc_relocate_section): Set up src_mask and dst_mask correctly.
1924         * coff64-rs6000.c (xcoff64_reloc_type_br): Correct src_mask and
1925         dst_mask adjustment.
1926         (xcoff64_ppc_relocate_section): Set up src_mask and dst_mask correctly.
1927         (xcoff64_howto_table): Fix src_mask entries.  Make all relocs with
1928         bitsize == 16 have size = 1.
1929
1930 2002-08-01  Denis Chertykov  <denisc@overta.ru>
1931
1932         * elf32-ip2k.c: Processor manufacturer changed to Ubicom.
1933         (struct misc): New field isymbuf. All free_* fields removed.
1934         (symbol_value): Pass in internal syms. No need to swap syms in.
1935         (ip2k_elf_relax_section): Use bfd_elf_get_elf_syms. Properly free
1936         possibly cached info.
1937         (tidyup_after_error): Removed.
1938         (ip2k_elf_relax_section_pass1): Don't use removed fields of struct
1939         misc. Use new field.
1940         (adjust_all_relocations): Use internal syms. No need to swap syms
1941         in and out.
1942         (add_page_insn): Don't use removed fields of struct misc.
1943
1944 2002-08-01  Nick Clifton  <nickc@redhat.com>
1945
1946         * elf32-arm.h: Revert previous delta.
1947
1948 2002-08-01  Nick Clifton  <nickc@redhat.com>
1949
1950         * configure.in (AM_INIT_AUTOMAKE): Bump version number.
1951         * configure: Regenerate.
1952
1953 2002-07-31  H.J. Lu <hjl@gnu.org>
1954
1955         * config.bfd: Add x86-64 vector to Linux/i386 if 64bit BFD is
1956         selected.
1957
1958 2002-07-31  H.J. Lu <hjl@gnu.org>
1959
1960         * config.bfd: Add n32 vectors to 32bit Linux/mips if 64bit BFD
1961         is selected.
1962
1963 2002-07-31  Jakub Jelinek  <jakub@redhat.com>
1964
1965         * elf32-i386.c (elf_i386_copy_indirect_symbol): Swap tls_type
1966         if _bfd_elf_link_hash_copy_indirect will swap got.refcount.
1967
1968 2002-07-31  Ian Dall  <ian@sibyl.beware.dropbear.id.au>
1969
1970         * cpu-ns32k.c (_bfd_ns32k_put_immdeiate, _bfd_ns32k_get_immediate):
1971         There is no 8 byte relocation type for this architecture.
1972         (do_ns32k_reloc): Use bfd_vma instead of native types.
1973         (bfd_ns32k_put_immediate, _bfd_ns32k_relocate_contents) put_data
1974         returns void.
1975         (_bfd_ns32k_put_displacement): Don't check for overflow. We can
1976         rely on generic code to do that.
1977         * aout-ns32k.c (howto_table): Add appropriate overflow detection
1978         to all table entries.
1979         (_bfd_ns32k_relocate_contents): put_data returns void.
1980         * ns32k.h: (_bfd_ns32k_put_displacement, _bfd_ns32k_put_immediate)
1981         (_bfd_do_ns32k_reloc_contents): Fix prototypes. put data functions
1982         return void.
1983
1984 2002-07-31  Ian Dall  <ian@sibyl.beware.dropbear.id.au>
1985
1986         * aoutx.h (aout_link_check_ar_symbols): Whether to include an
1987         archive object is target dependant.
1988
1989 2002-07-31  Adam Nemet  <anemet@lnxw.com>
1990
1991         * elf32-arm.h (ARM_PLT_ENTRY_SIZE): Rename PLT_ENTRY_SIZE.
1992         (THUMB_PLT_ENTRY_SIZE): New macro.
1993         (PLT_ENTRY_SIZE): Return the appropriate *_PLT_ENTRY_SIZE.
1994         (elf32_arm_plt0_entry): Rename PLT_ENTRY_SIZE to
1995         ARM_PLT_ENTRY_SIZE.
1996         (elf32_arm_plt_entry): Likewise.
1997         (elf_backend_plt_header_size): Likewise.
1998         (elf32_thumb_plt0_entry): New global.
1999         (elf32_arm_finish_dynamic_sections): Use it.  Put Thumb entries
2000         into .plt.thumb.
2001         (elf32_thumb_plt_entry): New global.
2002         (elf32_arm_finish_dynamic_symbol): Use it.  Use .thumb.plt for
2003         Thumb entries.  Set the bottom bit of the corresponding GOT entry
2004         for a Thumb PLT entry.
2005         (struct elf32_arm_plt_entry_info): New structure.
2006         (struct elf32_arm_link_hash_entry, plt_info): New member of this
2007         type.
2008         (elf32_arm_link_hash_newfunc): Initialize new member.
2009         (elf32_arm_final_link_relocate, R_ARM_THM_PC22 case): Handle
2010         relocations against the PLT.
2011         (elf32_arm_check_relocs, case R_ARM_PLT32 case): Set
2012         first_rel_type if this is the first time we encounter the symbol.
2013         (elf32_arm_check_relocs, case R_ARM_THM_PC22 case): New case.
2014         Determine if relocation needs a PLT entry.  Set first_rel_type if
2015         this is the first time we encounter the symbol
2016         (elf32_arm_adjust_dynamic_symbol): Create PLT entries for Thumb
2017         functions as well.
2018         (elf32_arm_size_dynamic_sections): Handle .plt.thumb like .plt.
2019         (elf32_arm_create_dynamic_sections): New function.  Create the
2020         .plt.thumb section.
2021         (elf_backend_create_dynamic_sections): Call it.
2022
2023 2002-07-31  Nick Clifton  <nickc@redhat.com>
2024
2025         * bfd.c (bfd_alt_mach_code): Rename parameter 'index' to
2026         'alternative' in order to avoid shadowing global symbol of the
2027         same name.
2028         * bfd-in2.h: Regenerate.
2029         * libbfd.h: Regenerate.
2030         * libcoff.h: Regenerate.
2031
2032 2002-07-31  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2033
2034         * Makefile.am: Add n32 ABI support.
2035         * Makefile.in: Regenerate.
2036         * config.bfd: Add n32 vectors to mips64*-*-linux* targets. Treat 64
2037         bit vectors for mips*-*-linux targets as optional.
2038         * configure.in: Add n32 ABI vectors.
2039         * configure: Regenerate.
2040         * elf32-mips.c (mips_elf32_object_p): Reject n32 ABI files.
2041         * elfn32-mips.c: New file, n32 ABI support.
2042         * targets.c: Add n32 ABI vectors.
2043
2044 2002-07-30  Graeme Peterson  <gp@qnx.com>
2045
2046         * elfarmqnx-nabi.c: New file: Support for QNX.
2047         * config.bfd: Add support for arm-*-nto target.
2048         * configure.in: Add support for bfd_elf32_{big|little}armqnx_vec.
2049         * configure: Regenerate.
2050         * Makefile.am: Add entries for elfarmqnx-nabi.c.
2051         * Makefile.in: Regenerate.
2052         * elf32-arm.h (ELF_MAXPAGESIZE): Do not define if already defined.
2053         Do not define global function if ELFARM_NABI_C_INCLUDED is defined.
2054         * elfarm-nabi.c: Do not include elf32-arm.h if
2055         ELFARM_NABI_C_INCLUDED is defined.
2056         * targets.c: Add bfd_elf32_{big|little}armqnx_vec.
2057
2058 2002-07-30  Nick Clifton  <nickc@redhat.com>
2059
2060         * po/sv.po: Updated Swedish translation.
2061
2062 2002-07-30  Jakub Jelinek  <jakub@redhat.com>
2063
2064         * elf.c (elf_fake_sections): Fix up .tbss sh_size and sh_type.
2065
2066 2002-07-30  Alan Modra  <amodra@bigpond.net.au>
2067
2068         * aoutx.h (some_aout_object_p): Clean up tdata properly on error.
2069         * archive.c (bfd_generic_archive_p): Likewise.
2070         * coff-rs6000.c (_bfd_xcoff_archive_p): Likewise.
2071         (_bfd_xcoff_archive_p): Use bfd_scan_vma in place of strtol.
2072         * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
2073         (xcoff64_archive_p): Likewise.
2074         (xcoff64_openr_next_archived_file): Likewise.
2075         (xcoff64_archive_p): Clean up tdata properly on error.
2076         * coffgen.c (coff_real_object_p): Likewise.
2077         (coff_object_p): Release filehdr and opthdr.
2078         * ecoff.c (_bfd_ecoff_archive_p): Clean up tdata properly on error.
2079         * ieee.c (ieee_archive_p): Likewise.
2080         * ihex.c (ihex_object_p): Likewise.
2081         (ihex_mkobject): Always allocate tdata.
2082         * peicode.h (pe_ILF_object_p): Release bfd_alloc'd buffer on error.
2083         * srec.c (srec_mkobject): Always allocate tdata.
2084         (srec_object_p): Clean up tdata properly on error.
2085         (symbolsrec_object_p): Likewise.
2086         * versados.c (versados_object_p): Likewise.
2087         * vms-misc.c (_bfd_vms_get_record): Use bfd_malloc instead of malloc,
2088         and bfd_realloc instead of realloc.
2089         (add_new_contents): Use bfd_alloc instead of bfd_malloc for sections.
2090         * vms.c (vms_initialize): Always allocate tdata.  Use bfd_alloc in
2091         place of bfd_malloc, simplifying error freeing.  Free hash table too.
2092         (vms_object_p): Clean up tdata on error.
2093         (vms_mkobject): Don't complain on stderr if vms_initialize fails.
2094         (vms_close_and_cleanup): Adjust for bfd_alloc use.
2095
2096 2002-07-30  Alan Modra  <amodra@bigpond.net.au>
2097
2098         * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set e_flags.
2099
2100 2002-07-26  Chris Demetriou  <cgd@broadcom.com>
2101
2102         * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Merge ASE
2103         flags into resulting BFD.
2104
2105 2002-07-26  Alan Modra  <amodra@bigpond.net.au>
2106
2107         From John Reiser <jreiser@BitWagon.com>
2108         * elf32-i386.c (elf_i386_link_hash_table_create): Clear
2109         tls_ldm_got.refcount.
2110
2111 2002-07-25  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2112
2113         * elf64-mips.c: Update TODO comment.
2114         (mips_elf64_higher_reloc,mips_elf64_highest_reloc,
2115         mips_elf64_gprel16_reloca): Remove prototypes.
2116         (mips16_jump_reloc,mips16_gprel_reloc): Add functions.
2117         (UNUSED_RELOC): Replace by EMPTY_RELOC.
2118         (mips_elf64_howto_table_rel): Use special R_MIPS_HI16 handling. Remove
2119         wrong comments. Remove disfunctional support of R_MIPS_HIGHER and
2120         R_MIPS_HIGHEST.
2121         (mips_elf64_howto_table_rela): Fix handling of R_MIPS_GPREL16 and
2122         R_MIPS_GOT16. Remove wrong comments.
2123         (elf_mips16_jump_howto,elf_mips16_gprel_howto,
2124         elf_mips_gnu_vtinherit_howto,elf_mips_gnu_vtentry_howto): New, code
2125         from elf32-mips.c.
2126         (mips_elf64_hi16_reloc): Fix formatting.
2127         (mips_elf64_higher_reloc,mips_elf64_highest_reloc): Remove.
2128         (mips_elf64_got16_reloc): Fix formatting. Remove superfluous code.
2129         Better comment. Fall back to R_MIPS_GOT_DISP instead of abort().
2130         (mips_elf64_gprel16_reloc): Make static. Add check for
2131         partial_inplace.
2132         (mips_elf64_gprel16_reloca): Remove.
2133         (mips_elf64_literal_reloc): New function.
2134         (mips_elf64_gprel32_reloc): Fix formatting.
2135         (mips_elf64_shift6_reloc): Fix comment. Make static.
2136         (mips16_jump_reloc,mips16_gprel_reloc): New functions, code from
2137         elf32-mips.c.
2138         (elf_reloc_map,mips_reloc_map): New mapping table, similiar as in
2139         elf32-mips.c
2140         (bfd_elf64_bfd_reloc_type_lookup): Use the mapping table. Enable GNU
2141         specific relocations.
2142         (mips_elf64_rtype_to_howto): Enable GNU specific relocations.
2143         (mips_elf64_object_p): Invert logic to check for SGI-ish ABI.
2144         (ELF_MAXPAGESIZE): Add comment.
2145
2146 2002-07-25  Nick Clifton  <nickc@redhat.com>
2147
2148         * po/sv.po: Updated Swedish translation.
2149         * po/es.po: Updated Spanish translation.
2150         * po/fr.po: Updated French translation.
2151
2152 2002-07-25  Alan Modra  <amodra@bigpond.net.au>
2153
2154         * elf-bfd.h (_bfd_elf32_link_record_local_dynamic_symbol): Define
2155         as elf_link_record_local_dynamic_symbol.
2156         (_bfd_elf64_link_record_local_dynamic_symbol): Likewise.
2157         (elf_link_record_local_dynamic_symbol): Declare.  Now returns int.
2158         * elflink.h (elf_link_record_local_dynamic_symbol): Move to..
2159         * elflink.c: .. here.  Use bfd_elf_get_elf_syms.  Check whether an
2160         attempt is made to record a symbol in a discarded section, and
2161         return `2' in that case.
2162
2163 2002-07-24  Nick Clifton  <nickc@redhat.com>
2164
2165         * po/sv.po: Updated Swedish translation.
2166         * po/es.po: Updated Spanish translation.
2167
2168 2002-07-23  Alan Modra  <amodra@bigpond.net.au>
2169
2170         * po/SRC-POTFILES.in: Regenerate.
2171
2172         * elf-hppa.h (elf_hppa_relocate_section): If relocatable, return
2173         immediately.  Remove code handling relocatable linking.
2174         * elf32-avr.c (elf32_avr_relocate_section): Likewise.
2175         * elf32-cris.c (cris_elf_relocate_section): Likewise.
2176         * elf32-fr30.c (elf32_frv_relocate_section): Likewise.
2177         * elf32-frv.c (elf32_frv_relocate_section): Likewise.
2178         * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
2179         * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
2180         * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
2181         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
2182         * elf32-v850.c (v850_elf_relocate_section): Likewise.
2183         * elf32-vax.c (elf_vax_relocate_section): Likewise.
2184         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
2185         * elf32-avr.c (elf_backend_rela_normal): Define.
2186         * elf32-cris.c: Likewise.
2187         * elf32-fr30.c: Likewise.
2188         * elf32-frv.c: Likewise.
2189         * elf32-h8300.c: Likewise.
2190         * elf32-hppa.c: Likewise.
2191         * elf32-ip2k.c: Likewise.
2192         * elf32-sparc.c: Likewise.
2193         * elf32-v850.c: Likewise.
2194         * elf32-vax.c: Likewise.
2195         * elf64-hppa.c: Likewise.
2196         * elf64-sparc.c: Likewise.
2197         * elf32-fr30.c (elf32_frv_relocate_section): Edit comment.
2198         * elf32-frv.c (elf32_frv_relocate_section): Likewise.
2199         * elf32-i860.c (elf32_i860_relocate_section): Likewise.
2200         * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
2201         * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
2202         * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
2203         * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
2204         * elf-m10200.c (USE_RELA): Don't define.
2205         * elf-m10300.c: Likewise.
2206         * elfarm-oabi.c: Likewise.
2207         * elf32-i370.c: Likewise.
2208         * elf32-ip2k.c: Likewise.
2209         * elf32-m68k.c: Likewise.
2210         * elf32-mcore.c: Likewise.
2211         * elf32-ppc.c: Likewise.
2212         * elf32-s390.c: Likewise.
2213         * elf32-vax.c: Likewise.
2214         * elf64-ppc.c: Likewise.
2215         * elf64-s390.c: Likewise.
2216         * elf64-x86-64.c: Likewise.
2217         * elfxx-ia64.c: Likewise.
2218         * elf32-avr.c (USE_REL): Don't undef.
2219         * elf32-ip2k.c: Likewise.
2220
2221 2002-07-23  Nick Clifton  <nickc@redhat.com>
2222
2223         * elf-bfd.h (struct elf_backend_data): Add new bitfield
2224         'want_p_paddr_set_to_zero'.
2225         * elfxx-target.h: Set default value for want_p_paddr_set_to_zero
2226         to false;
2227         * elfxx-ia64.c: Set want_p_paddr_set_zero for HPUX target.
2228         * elf.c (copy_private_bfd_data): Test want_p_paddr_set_zero.
2229
2230 2002-07-23  Gabor Keresztfalvi  <keresztg@mail.com>
2231
2232         * nlmcode.h (nlm_swap_auxiliary_headers_out): Swapped the order of
2233         the MeSsAgEs and CoPyRiGhT tags to make >=NW4.x NLM loaders to
2234         show the Copyright string.
2235         Minor formatting tidy ups.
2236
2237 2002-07-23  Nick Clifton  <nickc@redhat.com>
2238
2239         * po/fr.po: Updated French translation.
2240         * po/sv.po: Updated Swedish translation.
2241
2242 2002-07-23  Alan Modra  <amodra@bigpond.net.au>
2243
2244         * elflink.h (elf_link_input_bfd): Don't change internal symbols
2245         when outputting relocs.
2246
2247 2002-07-20  Jason Thorpe  <thorpej@wasabisystems.com>
2248
2249         * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only insert
2250         DT_PLTGOT into the dynamic section if there is a PLT.
2251
2252 2002-07-19  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2253
2254         * elfxx-mips.c (_bfd_mips_elf_discard_info): New function, code from
2255         elf32-mips.c.
2256         (_bfd_mips_elf_write_section): Likewise.
2257         * elfxx-mips.h (_bfd_mips_elf_discard_info): New prototype.
2258         (_bfd_mips_elf_write_section): Likewise.
2259         * elf32-mips.c (elf32_mips_discard_info): Move to elfxx-mips.c.
2260         (elf32_mips_write_section): Likewise.
2261         * elf64-mips.c (_bfd_mips_elf_ignore_discarded_relocs): Use it.
2262         (_bfd_mips_elf_write_section): Likewise.
2263
2264 2002-07-19  Alan Modra  <amodra@bigpond.net.au>
2265
2266         * elfxx-ia64.c: (elfNN_ia64_modify_segment_map): Properly scan
2267         PT_IA_64_UNWIND segments for a given section.
2268
2269 2002-07-17  H.J. Lu <hjl@gnu.org>
2270
2271         * Makefile.am: Fix a typo.
2272         * Makefile.in: Regenerate.
2273
2274 2002-07-15  Denis Chertykov  <denisc@overta.ru>
2275             Frank Ch. Eigler  <fche@redhat.com>
2276             Ben Elliston  <bje@redhat.com>
2277             Alan Lehotsky  <alehotsky@cygnus.com>
2278             John Healy  <jhealy@redhat.com>
2279             Graham Stott  <grahams@redhat.com>
2280             Jeff Johnston  <jjohnstn@redhat.com>
2281
2282         * Makefile.am: Add support for ip2k.
2283         * Makefile.in: Regenerate.
2284         * doc/Makefile.in: Regenerate.
2285         * archures.c: Add support for ip2k.
2286         * config.bfd: Add support for ip2k.
2287         * configure.in: Add support for ip2k.
2288         * configure: Regenerate.
2289         * reloc.c: Add support for ip2k.
2290         * targets.c: Add support for ip2k.
2291         * bfd-in2.h: Regenerate.
2292         * libbfd.h: Regenerate.
2293         * cpu-ip2k.c: New file.
2294         * elf32-ip2k.c: New file.
2295
2296 2002-07-17  Ian Rickards  <irickard@arm.com>
2297
2298         * dwarf2.c (concat_filename): If we can't establish the directory
2299         just return the filename.
2300
2301 2002-07-16  Moritz Jodeit  <moritz@jodeit.org>
2302
2303         * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Correct order of memset args.
2304
2305 2002-07-16  Alan Modra  <amodra@bigpond.net.au>
2306
2307         * elflink.h: Formatting fixes, tidy prototypes.
2308         (elf_link_assign_sym_version): Move common code out of loop.
2309
2310 2002-07-16  Alan Modra  <amodra@bigpond.net.au>
2311
2312         * elflink.h (elf_link_input_bfd): Don't call reloc_emitter when
2313         reloc section size is zero.  Correct reloc output location.
2314
2315 2002-07-16  John David Anglin  <dave@hiauly1.hia.nrc.ca>
2316
2317         * elf-hppa.h (elf_hppa_reloc_final_type): Use R_PARISC_PCREL16F as
2318         the final type for the e_fsel selector when generating PA2.0W code.
2319         (elf_hppa_relocate_insn): Provide support for PA2.0W 16-bit format 1
2320         relocations.
2321
2322 2002-07-14  H.J. Lu <hjl@gnu.org>
2323
2324         * elflink.h (elf_link_assign_sym_version): Hide the default
2325         definition if there is a hidden versioned definition.
2326
2327 2002-07-12  Hans-Peter Nilsson  <hp@axis.com>
2328
2329         * elf32-cris.c (cris_elf_relocate_section): Drop nonsensical
2330         dynamic reference test in assertion when initializing GOT with
2331         static contents.  Just assert that there are either no dynamic
2332         sections, the symbol is defined in the regular objects or that the
2333         symbol is undef weak.  Tweak comment.
2334         (elf_cris_finish_dynamic_symbol): Emit .got reloc for a program
2335         only if the symbol isn't defined in the program and isn't undef
2336         weak.
2337         (elf_cris_adjust_dynamic_symbol): Simplify condition for getting
2338         rid of PLT entry: only do it if the symbol isn't defined in a DSO.
2339         When doing so, clear ELF_LINK_HASH_NEEDS_PLT.  Tweak comments.
2340         (elf_cris_discard_excess_program_dynamics): Don't consider
2341         ELF_LINK_HASH_REF_DYNAMIC when omitting .got runtime relocs.
2342
2343 2002-07-11  Alan Modra  <amodra@bigpond.net.au>
2344
2345         * elf32-i386.c (elf_i386_relocate_section): Don't complain about
2346         unresolved debugging relocs in dynamic applications.
2347         * elf32-s390.c (elf_s390_relocate_section): Likewise.
2348         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
2349         * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
2350         * elf64-s390.c (elf_s390_relocate_section): Likewise.
2351         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
2352         * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
2353
2354 2002-07-10  Alan Modra  <amodra@bigpond.net.au>
2355
2356         * elf64-ppc.c (ONES): Define.
2357         (ppc64_elf_howto_table): Use ONES here to avoid warnings.  Fill in
2358         missing src_mask fields.  Tweak R_PPC64_NONE, R_PPC64_COPY.  Fill
2359         in missing dst_mask fields on R_PPC64_PLT32, R_PPC64_PLTREL32.
2360
2361         * elf64-ppc.c (ppc64_elf_get_symbol_info): Delete.
2362         (ppc64_elf_set_private_flags): Delete.
2363         (ppc64_elf_section_from_shdr): Delete.
2364         (ppc64_elf_merge_private_bfd_data): Remove flag checking/merging code.
2365         (ppc64_elf_fake_sections): Delete.
2366         (bfd_elf64_bfd_set_private_flags): Don't define.
2367         (bfd_elf64_get_symbol_info): Likewise.
2368         (elf_backend_section_from_shdr): Likewise.
2369         (elf_backend_fake_sections): Likewise.
2370
2371 2002-07-10  Marco Walther  <Marco.Walther@sun.com>
2372
2373         * elf.c: (assign_section_numbers) Set sh_entsize for .stab only
2374         when not already set.
2375         * elf64-sparc.c: (sparc64_elf_fake_sections): New function.
2376         (elf_backend_fake_sections): Define.
2377
2378 2002-07-10  Alan Modra  <amodra@bigpond.net.au>
2379
2380         * merge.c (_bfd_merge_section): Remove redundant output_section check.
2381         Formatting.
2382         (_bfd_merge_sections): Don't set SEC_EXCLUDE on unused sections.
2383
2384 2002-07-09  Hans-Peter Nilsson  <hp@axis.com>
2385
2386         * elf32-cris.c (cris_elf_relocate_section): Move sanity-check for
2387         NULL sym_hashes to just before use.
2388         <case R_CRIS_32_GOTREL>: In test for local symbol, accept also
2389         symbol with non-default visibility.
2390         <case R_CRIS_32_GOTREL, case R_CRIS_32_PLT_GOTREL>: Ditto.
2391         <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
2392         Ditto.
2393         (cris_elf_gc_sweep_hook): Only decrease h->plt.refcount for
2394         symbol with non-default visibility.
2395         (cris_elf_check_relocs): At tests for local symbol before
2396         increasing h->plt.refcount, also check for non-default
2397         visibility.  Ditto when checking for local symbol to eliminate
2398         pc-relative runtime relocs.
2399
2400 2002-07-08  Alan Modra  <amodra@bigpond.net.au>
2401
2402         * elf.c: Formatting.
2403         (IS_SOLARIS_PT_INTERP): Add p_paddr and p_memsz checks.
2404         (INCLUDE_SECTION_IN_SEGMENT): Remove IS_SOLARIS_PT_INTERP.
2405         (copy_private_bfd_data): Set p_vaddr on broken Solaris PT_INTERP
2406         segments.
2407
2408 2002-07-07  Mark Mitchell  <mark@codesourcery.com>
2409             Alan Modra  <amodra@bigpond.net.au>
2410
2411         * cofflink.c (_bfd_coff_final_link): On PE COFF systems, take into
2412         account the impact of relocation count overflow when computing
2413         section offsets.
2414         * coffcode.h (coff_write_relocs): Use obj_pe when deciding whether
2415         or not to apply the PE COFF reloc overflow handling.  Fix a
2416         fencepost error in deciding whether or not to use that technique.
2417
2418 2002-07-07  Alan Modra  <amodra@bigpond.net.au>
2419
2420         * elf-bfd.h (struct elf_reloc_cookie): Remove locsym_shndx,
2421         change type of locsyms.
2422         (bfd_elf_get_elf_syms): Declare.
2423         * elf.c (bfd_elf_get_elf_syms): New function.
2424         (group_signature): Use bfd_elf_get_elf_syms.
2425         (bfd_section_from_r_symndx): Likewise.
2426         * elfcode.h (elf_slurp_symbol_table): Likewise.
2427         * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
2428         (elf_link_add_object_symbols): Likewise.  Reorganise to increase
2429         locality of various data structures.  Properly free internal relocs.
2430         (elf_bfd_final_link): Properly free internal relocs.
2431         (elf_link_check_versioned_symbol): Use bfd_elf_get_elf_syms.
2432         (elf_link_input_bfd): Likewise.
2433         (elf_gc_mark): Likewise.  Properly free internal relocs.
2434         (elf_gc_sweep): Properly free internal relocs.
2435         (elf_reloc_symbol_deleted_p): No need to swap syms in.
2436         (elf_bfd_discard_info): Use bfd_elf_get_elf_syms.  Properly free
2437         internal relocs.
2438         * elf-m10200.c (mn10200_elf_relax_section): Use bfd_elf_get_elf_syms.
2439         Properly free possibly cached info.
2440         (mn10200_elf_relax_delete_bytes): Remove symbol swapping code.
2441         (mn10200_elf_symbol_address_p): Pass in internal syms.  Remove
2442         symbol swapping code.
2443         (mn10200_elf_get_relocated_section_contents): Use bfd_elf_get_elf_syms.
2444         Properly free possibly cached info.
2445         * elf-m10300.c (mn10300_elf_relax_section): As above for elf-m10200.c.
2446         (mn10300_elf_relax_delete_bytes): Likewise.
2447         (mn10300_elf_symbol_address_p): Likewise.
2448         (mn10300_elf_get_relocated_section_contents): Likewise.
2449         * elf32-h8300.c (elf32_h8_relax_section): As above for elf-m10200.c.
2450         (elf32_h8_relax_delete_bytes): Likewise.
2451         (elf32_h8_symbol_address_p): Likewise.
2452         (elf32_h8_get_relocated_section_contents): Likewise.
2453         * elf32-m32r.c (m32r_elf_relax_section): As above for elf-m10200.c.
2454         (m32r_elf_relax_delete_bytes): Likewise.
2455         (m32r_elf_get_relocated_section_contents): Likewise.
2456         * elf32-sh.c (sh_elf_reloc_loop): Free section contents using
2457         elf_section_data to determine whether cached.
2458         (sh_elf_relax_section): As above for elf-m10200.c.
2459         (sh_elf_relax_delete_bytes): Likewise.
2460         (sh_elf_get_relocated_section_contents): Likewise.
2461         * elf32-xstormy16.c (xstormy16_elf_relax_section): As above.
2462         * elf64-alpha.c (elf64_alpha_relax_section): As above.  Also delay
2463         reading of local syms.
2464         * elf64-mmix.c (mmix_elf_relax_section): Likewise.
2465         * elf64-sh64.c (sh_elf64_get_relocated_section_contents): As above.
2466         * elfxx-ia64.c (elfNN_ia64_relax_section): As above.
2467         * elfxx-mips.c (_bfd_mips_elf_check_relocs): Properly free internal
2468         relocs.
2469         * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Properly
2470         free internal relocs and section contents.  Don't read symbols.
2471         * elf32-hppa.c (get_local_syms): Use bfd_elf_get_elf_syms.
2472         (elf32_hppa_size_stubs): Don't free local syms.
2473         * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Delay
2474         reading of local syms.  Use bfd_elf_get_elf_syms.  Properly free
2475         possibly cached info.
2476         * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
2477         * elf64-hppa.c (elf64_hppa_check_relocs): Use bfd_elf_get_elf_syms.
2478         * elf64-ppc.c (struct ppc_link_hash_table): Delete bfd_count and
2479         all_local_syms.
2480         (get_local_syms): Delete function.
2481         (edit_opd): Use bfd_elf_get_elf_syms.  Free on error exit.  Cache
2482         on exit.
2483         (ppc64_elf_size_stubs): Use bfd_elf_get_elf_syms.  Free/cache on exit.
2484
2485 2002-07-05  Jim Wilson  <wilson@redhat.com>
2486
2487         * syms.c (decode_section_type): New.
2488         (bfd_decode_symclass): Call decode_section_type.
2489
2490 2002-07-04  Jakub Jelinek  <jakub@redhat.com>
2491
2492         * merge.c (_bfd_merged_section_offset): Avoid accessing byte before
2493         section content start.
2494         Reported by Michael Schumacher <mike@hightec-rt.com>.
2495
2496 2002-07-04  Alan Modra  <amodra@bigpond.net.au>
2497
2498         * section.c (_bfd_strip_section_from_output):  Remove unnecessary
2499         link order code.  Don't actually remove the output section here;
2500         Just set a flag for the linker to do so.
2501         * elflink.c (_bfd_elf_link_renumber_dynsyms): Test for removed
2502         sections when setting up output section dynsyms.
2503
2504 2002-07-04  Alan Modra  <amodra@bigpond.net.au>
2505
2506         * elflink.h (elf_link_add_object_symbols): Revert 1999-09-02 hpux
2507         fudge.
2508         * elf.c (bfd_section_from_shdr): Work around broken hpux shared
2509         libs here instead.
2510
2511 2002-07-02  Martin Schwidefsky  <schwidefsky@de.ibm.com>
2512
2513         * elf64-s390.c (create_got_section): Set .got section alignment to
2514         8 bytes.
2515         (elf_s390_check_relocs): Set .rela.dyn section alignment to 8 bytes.
2516
2517 2002-07-02  Alan Modra  <amodra@bigpond.net.au>
2518
2519         * elf.c (_bfd_elf_reloc_type_class): Fix comment grammar.
2520
2521 2002-07-01  Matt Thomas  <matt@3am-software.com>
2522
2523         * elf32-vax.c (elf32_vax_print_private_bfd_data): Change EF_*
2524         to EF_VAX_*.
2525
2526 2002-07-01  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2527
2528         * elfxx-mips.c (ABI_64_P): Fix comment.
2529         (MIPS_ELF_OPTIONS_SECTION_NAME,MIPS_ELF_STUB_SECTION_NAME): Use the
2530         new section names for N64 ABI.
2531         (mips_elf_output_extsym): No special _gp_disp handling for NewABI.
2532         (mips_elf_calculate_relocation): Code formatting.
2533         (mips_elf_create_dynamic_relocation): Likewise.
2534         (_bfd_mips_elf_fake_sections): IRIX6 needs this hack, too.
2535         (_bfd_mips_elf_size_dynamic_sections): Handle GOT_PAGE for any NewABI.
2536         (_bfd_mips_elf_relocate_section): No special handling for R_MIPS_64
2537         in any NewABI.
2538         (_bfd_mips_elf_finish_dynamic_symbol): No special _gp_disp handling
2539         for NewABI.
2540         (_bfd_mips_elf_modify_segment_map): Handle any N64 ABI.
2541         (_bfd_mips_elf_gc_sweep_hook): NewABI GOT relocs should be handled
2542         here, too.
2543
2544 2002-07-01  Andreas Schwab  <schwab@suse.de>
2545
2546         * elf64-x86-64.c (elf64_x86_64_relocate_section): Only convert
2547         R_X86_64_64 to R_X86_64_RELATIVE.
2548
2549 2002-07-01  John David Anglin  <dave@hiauly1.hia.nrc.ca>
2550
2551         * vaxbsd.c: New BFD backend for VAX BSD and Ultrix.
2552         * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Add new backend.
2553         Run "make dep-am".
2554         * config.bfd (vax-*-bsd* | vax-*-ultrix*): Use vaxbsd_vec instead of
2555         host_aout_vec.
2556         * configure.in (vaxbsd_vec): Add.
2557         * targets.c (vaxbsd_vec): Add.
2558         * Makefile.in: Rebuild.
2559         * configure: Rebuild.
2560         * po/SRC-POTFILES.in: Rebuild.
2561
2562 2002-07-01  Alan Modra  <amodra@bigpond.net.au>
2563
2564         * elflink.h (elf_gc_mark): Pass in the section whose relocs we are
2565         examining to gc_mark_hook, rather than the bfd.
2566         (elf_gc_sections): Adjust.
2567         * elf-bfd.h (struct elf_backend_data <gc_mark_hook>): Likewise.
2568         * elf-m10300.c (mn10300_elf_gc_mark_hook): Likewise.
2569         * elf32-arm.h (elf32_arm_gc_mark_hook): Likewise.
2570         * elf32-avr.c (elf32_avr_gc_mark_hook): Likewise.
2571         * elf32-cris.c (cris_elf_gc_mark_hook): Likewise.
2572         * elf32-d10v.c (elf32_d10v_gc_mark_hook): Likewise.
2573         * elf32-fr30.c (fr30_elf_gc_mark_hook): Likewise.
2574         * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise.
2575         * elf32-i386.c (elf_i386_gc_mark_hook): Likewise.
2576         * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise.
2577         * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise.
2578         * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise.
2579         * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Likewise.
2580         * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise.
2581         * elf32-s390.c (elf_s390_gc_mark_hook): Likewise.
2582         * elf32-sh.c (sh_elf_gc_mark_hook): Likewise.
2583         * elf32-sparc.c (elf32_sparc_gc_mark_hook): Likewise.
2584         * elf32-v850.c (v850_elf_gc_mark_hook): Likewise.
2585         * elf32-vax.c (elf_vax_gc_mark_hook): Likewise.
2586         * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Likewise.
2587         * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise.
2588         * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
2589         * elf64-s390.c (elf_s390_gc_mark_hook): Likewise.
2590         * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
2591         * elfxx-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise.
2592         * elfxx-mips.h (_bfd_mips_elf_gc_mark_hook): Likewise.
2593         * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise.
2594         * elf32-frv.c (elf32_frv_gc_mark_hook): Likewise.  Also remove
2595         redundant local sym tests.
2596         * elf64-ppc.c (struct ppc_link_hash_entry): Add is_entry.
2597         (link_hash_newfunc): Init is_entry.
2598         (ppc64_elf_copy_indirect_symbol): Copy is_entry.
2599         (ppc64_elf_link_hash_table_create): Init all_local_syms.
2600         (create_linkage_sections): Use bfd_make_section_anyway rather than
2601         bfd_make_section.
2602         (ppc64_elf_mark_entry_syms): New function.
2603         (ppc64_elf_check_relocs): Don't bother testing elf_bad_symtab.  Set
2604         up opd entry to function section map.
2605         (ppc64_elf_gc_mark_hook): Special case opd section relocs, and
2606         relocs that reference the opd section.
2607         (edit_opd): New function.
2608         (ppc64_elf_size_dynamic_sections): Call get_local_syms and edit_opd.
2609         (ppc64_elf_setup_section_lists): Don't calculate htab->bfd_count here.
2610         (get_local_syms): Do so here.  Exit if we already have local syms.
2611         Remove bogus comment imported from elf32-hppa.c.  Don't attempt to
2612         read local syms on non-ELF input.
2613         (ppc64_elf_size_stubs): Call _bfd_elf64_link_read_relocs rather
2614         than duplicating it's function here.  Adjust free of internal
2615         relocs to suit.
2616         (ppc64_elf_relocate_section): Adjust local syms in opd section.
2617         * elf64-ppc.h (ppc64_elf_mark_entry_syms): Declare.
2618         * elf32-hppa.c (elf32_hppa_size_stubs): Call
2619         _bfd_elf32_link_read_relocs rather than duplicating it's function
2620         here.  Adjust free of internal relocs to suit.
2621
2622 2002-07-01  Andreas Jaeger  <aj@suse.de>
2623
2624         * elf64-x86-64.c (elf64_x86_64_check_relocs): Certain relocations
2625         are not allowed in shared libs code, enforce -fPIC.
2626
2627 2002-06-29  Hans-Peter Nilsson  <hp@bitrange.com>
2628
2629         * mmo.c (mmo_write_loc_chunk): Don't eliminate leading and
2630         trailing zero-sequences when there's previous left-over data.
2631
2632 2002-06-27  John David Anglin  <dave@hiauly1.hia.nrc.ca>
2633
2634         * elf64-hppa.c (elf64_hppa_reloc_type_class): New function.
2635         (elf64_hppa_finish_dynamic_sections): Check other_rel_sec, dlt_rel_sec
2636         and opd_rel_sec in order for starting rela section.  Check _raw_size.
2637         (elf_backend_reloc_type_class): Define.
2638
2639 2002-06-27  Kevin Buettner <kevinb@redhat.com>
2640
2641         * dwarf2.c (decode_line_info): Handle older, non-standard, 64-bit
2642         DWARF2 formats.
2643
2644 2002-06-27  Alan Modra  <amodra@bigpond.net.au>
2645
2646         * cpu-powerpc.c: Comment on ordering of arch_info.
2647         * elf32-ppc.c (ppc_elf_object_p): New function.
2648         (elf_backend_object_p): Define.
2649         * elf64-ppc.c (ppc64_elf_object_p): New function.
2650         (elf_backend_object_p): Define.
2651
2652 2002-06-26  Jason Thorpe  <thorpej@wasabisystems.com>
2653
2654         * configure.in (vax-*-netbsd*): Set COREFILE to netbsd-core.lo.
2655         * configure: Regenerate.
2656
2657 2002-06-25  Jason Eckhardt  <jle@rice.edu>
2658
2659         * dwarf2.c (decode_line_info): Check unit->addr_size
2660         to read in the proper number of prologue bytes.
2661
2662 2002-06-25  Nick Clifton  <nickc@cambridge.redhat.com>
2663
2664         * config.bfd (powerpc-*-aix5*): Only create a selvecs for
2665         aix5coff64_vec if 64-bit bfd support has been enabled.
2666         (powerpc64-*-aix5*): Only define if 64-bit bfd support has
2667         been enabled.
2668
2669         * targets.c (_bfd_target_vector[]): Only include
2670         aix5coff64_vec if 64-bit bfd support has been enabled.
2671
2672 2002-06-25  Alan Modra  <amodra@bigpond.net.au>
2673
2674         * elf64-ppc.c (ppc_add_stub): Replace strcpy/strncpy with memcpy.
2675         * elf32-hppa.c (hppa_add_stub): Likewise.
2676         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
2677         * elflink.h (elf_add_default_symbol): Fix comment typo.
2678         (elf_add_default_symbol): Replace strcpy and strncpy with memcpy.
2679         (elf_link_add_object_symbols): Likewise.
2680         (elf_link_assign_sym_version): Likewise.
2681         * hash.c (bfd_hash_lookup): Likewise.
2682         * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
2683         * section.c (bfd_get_unique_section_name): Likewise.
2684         * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
2685         * elf.c (_bfd_elf_make_section_from_phdr): Likewise.
2686         (assign_section_numbers): Likewise.
2687         (_bfd_elfcore_make_pseudosection): Likewise.
2688         (elfcore_grok_lwpstatus): Likewise.
2689         (elfcore_grok_win32pstatus): Likewise.
2690         (elfcore_write_note): Constify input params.  Use PTR instead of
2691         void *.  Include terminating NUL in namesz.  Correct padding.
2692         Support NULL "name" param.  Use memcpy instead of strcpy.
2693         (elfcore_write_prpsinfo): Constify input params.
2694         (elfcore_write_prstatus): Likewise.  Use PTR instead of void *.
2695         (elfcore_write_lwpstatus): Likewise.
2696         (elfcore_write_pstatus): Likewise.
2697         (elfcore_write_prfpreg): Likewise.
2698         (elfcore_write_prxfpreg): Likewise.
2699         * elf-bfd.h (elfcore_write_note): Update declaration.
2700         (elfcore_write_prpsinfo): Likewise.
2701         (elfcore_write_prstatus): Likewise.
2702         (elfcore_write_pstatus): Likewise.
2703         (elfcore_write_prfpreg): Likewise.
2704         (elfcore_write_prxfpreg): Likewise.
2705         (elfcore_write_lwpstatus): Likewise.
2706
2707 2002-06-25  Jason Eckhardt  <jle@rice.edu>
2708
2709         * ecoff.c (ecoff_set_symbol_info): Set BSF_FUNCTION for
2710         symbols of type stProc and stStaticProc.
2711
2712 2002-06-25  Nick Clifton  <nickc@redhat.com>
2713
2714         * ecoff.c: VArious formatting fixes.
2715
2716 2002-06-25  Alan Modra  <amodra@bigpond.net.au>
2717
2718         * coff-rs6000.c (xcoff_generate_rtinit): Fix typo.
2719
2720 2002-06-25  Alan Modra  <amodra@bigpond.net.au>
2721
2722         * aout-adobe.c: Don't compare against "true" or "false.
2723         * aout-target.h: Likewise.
2724         * aoutx.h: Likewise.
2725         * archive.c: Likewise.
2726         * bout.c: Likewise.
2727         * cache.c: Likewise.
2728         * coff-a29k.c: Likewise.
2729         * coff-alpha.c: Likewise.
2730         * coff-i386.c: Likewise.
2731         * coff-mips.c: Likewise.
2732         * coff-or32.c: Likewise.
2733         * coff64-rs6000.c: Likewise.
2734         * coffcode.h: Likewise.
2735         * coffgen.c: Likewise.
2736         * cpu-ns32k.c: Likewise.
2737         * ecoff.c: Likewise.
2738         * ecofflink.c: Likewise.
2739         * elf.c: Likewise.
2740         * elf32-arm.h: Likewise.
2741         * elf32-cris.c: Likewise.
2742         * elf32-d30v.c: Likewise.
2743         * elf32-i386.c: Likewise.
2744         * elf32-mcore.c: Likewise.
2745         * elf32-ppc.c: Likewise.
2746         * elf32-sh.c: Likewise.
2747         * elf32-sh64.c: Likewise.
2748         * elf32-v850.c: Likewise.
2749         * elf64-alpha.c: Likewise.
2750         * elf64-sh64.c: Likewise.
2751         * elfcode.h: Likewise.
2752         * elfcore.h: Likewise.
2753         * elflink.h: Likewise.
2754         * elfxx-mips.c: Likewise.
2755         * i386os9k.c: Likewise.
2756         * ieee.c: Likewise.
2757         * libbfd.c: Likewise.
2758         * linker.c: Likewise.
2759         * mmo.c: Likewise.
2760         * nlm32-alpha.c: Likewise.
2761         * nlm32-i386.c: Likewise.
2762         * nlm32-ppc.c: Likewise.
2763         * nlm32-sparc.c: Likewise.
2764         * nlmcode.h: Likewise.
2765         * oasys.c: Likewise.
2766         * pdp11.c: Likewise.
2767         * peicode.h: Likewise.
2768         * reloc.c: Likewise.
2769         * som.c: Likewise.
2770         * srec.c: Likewise.
2771         * tekhex.c: Likewise.
2772         * vms.c: Likewise.
2773         * xcofflink.c: Likewise.
2774         * elf64-sparc.c: Edit comment to not use "== false".
2775
2776         * aoutf1.h: Don't use "? true : false".
2777         * ecoff.c: Likewise.
2778         * format.c: Likewise.
2779         * ieee.c: Likewise.
2780         * linker.c: Likewise.
2781         * mmo.c: Likewise.
2782         * oasys.c: Likewise.
2783
2784 2002-06-23  H.J. Lu  <hjl@gnu.org>
2785
2786         * elflink.h (elf_link_add_archive_symbols): For the default
2787         version, check references with only one `@' first.
2788
2789 2002-06-23  John David Anglin  <dave@hiauly1.hia.nrc.ca>
2790
2791         * elf64-hppa.c (elf64_hppa_mark_milli_and_exported_functions): New
2792         function.
2793         (allocate_global_data_dlt):  Don't add millicode symbols to dynamic
2794         symbol table.
2795         (allocate_global_data_opd, allocate_dynrel_entries): Likewise.
2796         (elf64_hppa_size_dynamic_sections): Revise to use
2797         elf64_hppa_mark_milli_and_exported_functions.
2798         (elf64_hppa_finish_dynamic_symbol): Remove code to keep millicode
2799         symbols out of dynamic symbol table.
2800
2801 2002-06-23  Alan Modra  <amodra@bigpond.net.au>
2802
2803         * Makefile.in: Regenerate.
2804         * libbfd.h: Regenerate.
2805         * bfd-in2.h: Regenerate.
2806         * configure: Regenerate.
2807         * po/SRC-POTFILES.in: Regenerate.
2808
2809         * elflink.h: Comment typo fixes.
2810
2811 2002-06-23  H.J. Lu  <hjl@gnu.org>
2812
2813         * elf-bfd.h (elf_link_loaded_list): New structure.
2814         (elf_link_hash_table): Add "loaded".
2815         * elf.c (_bfd_elf_link_hash_table_init): Initialize "loaded".
2816         * elflink.h (elf_link_check_versioned_symbol): New function.
2817         (elf_link_output_extsym): Call elf_link_check_versioned_symbol.
2818
2819 2002-06-19  Nick Clifton  <nickc@cambridge.redhat.com>
2820
2821         * elflink.h (size_dynamic_sections): If the target does not
2822         support an ELF style hash table, return true, indicating that
2823         nothing needed to be done, rather than false, indicating that the
2824         section's size could not be computed.
2825
2826 2002-06-18  Dave Brolley  <brolley@redhat.com>
2827
2828         From Catherine Moore, Michael Meissner, Dave Brolley:
2829         * po/SRC-POTFILES.in: Add cpu-frv.c and elf32-frv.c
2830         * targets.c: Support bfd_elf32_frv_vec.
2831         * reloc.c: Add FRV relocs.
2832         * configure.in: Add support for bfd-elf32-frv-vec.
2833         * config.bfd (targ_cpu): Add support for frv-*-elf.
2834         * archures.c: Add frv arch and machines.
2835         * Makefile.am (ALL_MACHINES): Add cpu-frv.lo.
2836         (ALL_MACHINES_CFILES): Add cpu-frv.c.
2837         (BFD32_BACKENDS): Add elf32-frv.lo.
2838         (BFD32_BACKENDS_CFILES): Add elf32-frv.c
2839         (cpu-frv.lo): New target.
2840         (elf32-frv.lo): New target.
2841         * cpu-frv.c: New file.
2842         * elf32-frv.c: New file.
2843
2844 2002-06-18  Jakub Jelinek  <jakub@redhat.com>
2845
2846         * elfcode.h (elf_object_p): Sanity check eh_shoff == 0 implies
2847         e_shnum == 0.
2848         Only read the first section header if e_shoff is non-zero.
2849         Don't consider e_shstrndx if there are no sections.
2850
2851 2002-06-17  Tom Rix <trix@redhat.com>
2852
2853         * elf32-d10v.c (elf_d10v_howto_table): Change R_D10V_10_PCREL_R,
2854         R_D10V_10_PCREL_L and R_D10V_18_PCREL to use
2855         complain_overflow_bitfield.
2856
2857 2002-06-17  Alan Modra  <amodra@bigpond.net.au>
2858
2859         * opncls.c (bfd_openr): Remove redundant bfd_set_error.
2860         (bfd_fdopenr): Likewise.
2861         (bfd_openstreamr): Likewise.
2862         (bfd_openw): Likewise.
2863
2864         * targets.c: Sort target vecs.
2865         (_bfd_target_vector): Add aix5coff64_vec, bfd_elf32_sh64_vec,
2866         bfd_elf32_sh64l_vec, bfd_elf32_sh64lnbsd_vec,
2867         bfd_elf32_sh64nbsd_vec, bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec,
2868         bfd_elf64_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec.
2869         * configure.in: Sort target vecs.  Add m88kmach3_vec.
2870         * configure: Regenerate.
2871
2872 2002-06-16  Hans-Peter Nilsson  <hp@bitrange.com>
2873
2874         * elf64-mmix.c (bpo_reloc_request_sort_fn): Use member
2875         bpo_reloc_no to break sort order ties, not address of items.
2876
2877 2002-06-16  John David Anglin  <dave@hiauly1.hia.nrc.ca>
2878
2879         * elf-hppa.h (elf_hppa_final_link): Fix formatting in comment.
2880         Skip excluded sections in determing __gp value.
2881         (elf_hppa_final_link_relocate): Use the symbol's address in
2882         R_PARISC_FPTR64 relocations that don't need an opd entry.
2883         * elf64-hppa.c (allocate_dynrel_entries): Simplify code.
2884         (elf64_hppa_finalize_dynreloc): Likewise.
2885         (elf64_hppa_size_dynamic_sections): Move comments and fix typo.
2886         (elf64_hppa_finish_dynamic_symbol): Break up assert.
2887
2888 2002-06-14  Sergey Grigoriev  <serge@leopold.Physik.Uni-Augsburg.DE>
2889
2890         * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
2891         alignment for .bss, .data and .text sections so that sse and sse2
2892         code will work.
2893         * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
2894
2895 2002-06013  J"orn Rennecke  <joern.rennecke@superh.com>
2896
2897         config.bfd: Add support for sh[1234]l*-*-elf* | sh3el*-*-elf*,
2898         sh[1234]*-elf*.
2899
2900 2002-06-12  John David Anglin  <dave@hiauly1.hia.nrc.ca>
2901
2902         * elflink.h (elf_bfd_final_link): Improve error handling for missing
2903         dynamic sections.
2904
2905         * elf64-hppa.c (allocate_global_data_opd): We don't need an opd entry
2906         for a symbol that has no output section.
2907         (allocate_dynrel_entries): Correct comment.
2908         (elf64_hppa_finalize_dynreloc): Likewise.  Don't create an opd entry
2909         unless we want one.
2910         (elf64_hppa_finalize_opd): Prevent segfault if dyn_h is NULL.
2911         (elf64_hppa_finalize_dlt): Likewise.  Prevent segfault for symbols
2912         with no section.  Remove unnecessary parentheses.
2913
2914 2002-06-11  Tom Rix  <trix@redhat.com>
2915
2916         * coffcode.h (coff_compute_section_file_positions): Add data
2917         section to AIX loader alignment check.
2918
2919         * coff-rs6000.c (_bfd_xcoff_mkobject): Set default text section
2920         alignment to 4 bytes.
2921         (_bfd_xcoff_copy_private_bfd_data): Use text and data alignment
2922         power accessor macro.
2923         (do_shared_object_padding): Remove invalid assertion.
2924
2925 2002-06-10  Richard Sandiford  <rsandifo@redhat.com>
2926
2927         * section.c (_bfd_strip_section_from_output): Set SEC_EXCLUDE
2928         for removed output sections.
2929
2930 2002-06-10  Geoffrey Keating  <geoffk@redhat.com>
2931
2932         * merge.c (merge_strings): Use htab_create_alloc with calloc, not
2933         htab_alloc.
2934         * elf-strtab.c (_bfd_elf_strtab_finalize): Likewise.
2935
2936 2002-06-08  H.J. Lu <hjl@gnu.org>
2937
2938         * elf.c (copy_private_bfd_data): Don't cast to bfd_size_type to
2939         work around a long long bug in gcc 2.96 on mips.
2940
2941 2002-06-08  Jason Thorpe  <thorpej@wasabisystems.com>
2942
2943         * Makefile.am (BFD32_BACKENDS): Add vax1knetbsd.lo.
2944         (BFD32_BACKENDS_CFILES): Add vax1knetbsd.c.
2945         Regenerate dependency lists.
2946         * Makefile.in: Regenerate.
2947         * config.bfd (vax-*-netbsdelf*, vax-*-netbsdaout*): Add
2948         vax1knetbsd_vec to targ_selvecs.
2949         * configure.in: Add vax1knetbsd_vec.
2950         * configure: Regenerate.
2951         * targets.c (_bfd_target_vector): Add vax1knetbsd_vec.
2952         * vax1knetbsd.c: New file.
2953         * vaxnetbsd.c: Update copyright years.
2954         (TARGET_PAGE_SIZE): Set to 0x1000.
2955         (DEFAULT_MID): Set to M_VAX4K_NETBSD.
2956
2957 2002-06-08  Matt Thomas  <matt@3am-software.com>
2958
2959         * libaout.h (enum machine_type): Add M_VAX4K_NETBSD.
2960
2961 2002-06-08  Alan Modra  <amodra@bigpond.net.au>
2962
2963         * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Make static.
2964
2965 2002-06-08  Alan Modra  <amodra@bigpond.net.au>
2966
2967         * Makefile.am: Run "make dep-am".
2968         * Makefile.in: Regenerate.
2969
2970         * armnetbsd.c: Replace CONST with const.
2971         * corefile.c: Likewise.
2972         * elf32-dlx.c: Likewise.
2973         * elf64-mips.c: Likewise.
2974         * mmo.c: Likewise.
2975         * ns32knetbsd.c: Likewise.
2976
2977         * elf64-sparc.c (sparc64_elf_add_symbol_hook): Check the hash
2978         table is elf64-sparc.
2979
2980 2002-06-08  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2981
2982         * elfxx-mips.c (_bfd_mips_elf_relocate_section): Simplify code.
2983         Fix RELA addends to get not shifted in the result. Don't do special
2984         handling of R_MIPS_64 for NewABI.
2985
2986 2002-06-07  Alan Modra  <amodra@bigpond.net.au>
2987
2988         * aoutx.h (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
2989         (NAME(aout,slurp_reloc_table)): Likewise.
2990         * coff-mips.c (mips_relax_section): Use bfd_zalloc.
2991         * coff-rs6000.c (xcoff_write_armap_big): Use bfd_zmalloc.
2992         (xcoff_write_archive_contents_big): Likewise.
2993         (xcoff_generate_rtinit): Likewise.
2994         (xcoff_generate_rtinit): Likewise, and check error return.
2995         * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
2996         * coffgen.c (coff_section_symbol): Use bfd_zalloc.
2997         (coff_get_normalized_symtab): Likewise.
2998         (coff_make_empty_symbol): Likewise.
2999         (bfd_coff_set_symbol_class): Likewise.
3000         * cofflink.c (coff_link_add_symbols): Likewise.
3001         * ecoff.c (_bfd_ecoff_make_empty_symbol): Likewise.
3002         * ecofflink.c (ecoff_write_shuffle): Use bfd_zmalloc.
3003         (bfd_ecoff_write_accumulated_debug): Likewise.
3004         * elf64-alpha.c (get_got_entry): Use bfd_zalloc.
3005         * i386linux.c (bfd_i386linux_size_dynamic_sections): Likewise.
3006         * i386lynx.c (NAME(lynx,slurp_reloc_table)): Use bfd_zmalloc.
3007         * ieee.c (do_with_relocs): Use bfd_zalloc.
3008         * m68klinux.c (bfd_m68klinux_size_dynamic_sections): Likewise.
3009         * pdp11.c (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
3010         (NAME(aout,slurp_reloc_table)): Likewise.
3011         (NAME(aout,squirt_out_relocs)): Don't memset when zalloc'd.
3012         * reloc16.c (bfd_coff_reloc16_relax_section): Use bfd_zmalloc.
3013         * som.c (som_build_and_write_symbol_table): Likewise.
3014         (som_slurp_string_table): Likewise.
3015         (som_slurp_symbol_table): Likewise.
3016         (som_bfd_ar_write_symbol_stuff): Likewise.
3017         * sparclinux.c (bfd_sparclinux_size_dynamic_sections): Use bfd_zalloc.
3018         * sunos.c (bfd_sunos_size_dynamic_sections): Likewise.
3019         * tekhex.c (find_chunk): Likewise.  Get rid of unused "sname".
3020         * vms-gsd.c (_bfd_vms_slurp_gsd): Use bfd_zmalloc.
3021         * xcofflink.c (xcoff_link_add_symbols): Use bfd_zalloc/bfd_zmalloc.
3022
3023 2002-06-07  Alan Modra  <amodra@bigpond.net.au>
3024
3025         * elf-bfd.h (struct bfd_elf_section_data <group_name>): Replace with
3026         "group" union.
3027         (elf_group_name): Update.
3028         (elf_group_id): Define.
3029         (bfd_elf_set_group_contents): Declare.
3030         * elf.c (elf_fake_sections): Qualify use of elf_group_name.
3031         (set_group_contents): Rename to bfd_elf_set_group_contents.  Remove
3032         ATTRIBUTE_UNUSED from failedptrarg.  If elf_group_id is set, use
3033         that sym for the signature.
3034         (_bfd_elf_compute_section_file_positions): Don't call
3035         set_group_contents for "ld -r" case.
3036         (swap_out_syms): Use bfd_zalloc.
3037         * elflink.h (elf_link_add_archive_symbols): Likewise.
3038         (NAME(bfd_elf,size_dynamic_sections)): Likewise.
3039         (elf_bfd_final_link): Call bfd_elf_set_group_contents.
3040
3041 2002-06-07  Alan Modra  <amodra@bigpond.net.au>
3042
3043         * elf64-ppc.c (ppc64_elf_relocate_section): Allow unresolved
3044         relocs in opd for non-shared too.
3045
3046 2002-06-06  Jeffrey Law  <law@redhat.com>
3047
3048         * elf32-h8300.c (elf32_h8_relax_section): Ignore uninteresting
3049         relocations.
3050
3051 2002-06-06  Nick Clifton  <nickc@cambridge.redhat.com>
3052
3053         * merge.c: Include libiberty.h.
3054         * elf-strtab.c: Include libiberty.h.
3055
3056 2002-06-06  Elias Athanasopoulos  <eathan@otenet.gr>
3057
3058         * peXXigen.c (pe_print_idata): Remove unused variable.
3059
3060 2002-06-06  David Heine <dlheine@tensilica.com>
3061
3062         * elf.c (assign_file_positions_for_segments): Remove unallocated
3063         sections from the section to segment mapping for PT_LOAD segments.
3064         Update comment about empty loadable segments.
3065
3066 2002-06-06  Richard Sandiford  <rsandifo@redhat.com>
3067
3068         * stabs.c (_bfd_link_section_stabs): Check that the symbol offset
3069         is within the .stabstr section.
3070
3071 2002-06-06  Alan Modra  <amodra@bigpond.net.au>
3072
3073         * elf-bfd.h (struct elf_size_info <swap_symbol_in>): Function args
3074         are "const PTR", not "const PTR *".
3075         (bfd_elf32_swap_symbol_in): Likewise.
3076         (bfd_elf64_swap_symbol_in): Likewise.
3077         * elfcode.h (elf_swap_symbol_in): Change input args to const PTR.
3078         (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
3079         * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
3080         (elf_link_add_object_symbols): Likewise.
3081         (elf_link_record_local_dynamic_symbol): Likewise.
3082         (elf_link_input_bfd): Likewise.
3083         (elf_gc_mark): Likewise.
3084         (elf_reloc_symbol_deleted_p): Likewise.
3085         * elf-m10200.c (mn10200_elf_relax_section): Likewise.
3086         (mn10200_elf_relax_delete_bytes): Likewise.
3087         (mn10200_elf_symbol_address_p): Likewise.
3088         (mn10200_elf_get_relocated_section_contents): Likewise.
3089         * elf-m10300.c (mn10300_elf_relax_section): Likewise.
3090         (mn10300_elf_relax_section): Likewise.
3091         (mn10300_elf_relax_delete_bytes): Likewise.
3092         (mn10300_elf_symbol_address_p): Likewise.
3093         (mn10300_elf_get_relocated_section_contents): Likewise.
3094         * elf32-h8300.c (elf32_h8_relax_section): Likewise.
3095         (elf32_h8_relax_delete_bytes): Likewise.
3096         (elf32_h8_symbol_address_p): Likewise.
3097         (elf32_h8_get_relocated_section_contents): Likewise.
3098         * elf32-hppa.c (get_local_syms): Likewise.
3099         * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
3100         * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
3101         * elf32-sh.c (sh_elf_relax_section): Likewise.
3102         (sh_elf_relax_delete_bytes): Likewise.
3103         (sh_elf_get_relocated_section_contents): Likewise.
3104         * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
3105         * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
3106         * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
3107         * elf64-mmix.c (mmix_elf_relax_section): Likewise.
3108         * elf64-ppc.c (get_local_syms): Likewise.
3109         * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
3110         * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
3111
3112 2002-06-05  J"orn Rennecke <joern.rennecke@superh.com>
3113
3114         * config.bfd (sh64l*-*-elf*, shl*-*-elf*): New configurations.
3115
3116 2002-06-05  Alan Modra  <amodra@bigpond.net.au>
3117
3118         * elf.c (group_signature): Swap in the whole symbol, and handle
3119         extracting section symbol names.
3120         (setup_group): Add comment.
3121         (set_group_contents): When called from objcopy or ld, arrange for
3122         section contents to be written.  Write group member output section
3123         indices to allow objcopy to reorganize sections.
3124         (_bfd_elf_copy_private_section_data): Copy group info.
3125
3126         * elf-bfd.h (struct elf_size_info): Add swap_symbol_in field.
3127         (bfd_elf32_swap_symbol_in): Update prototype.
3128         (bfd_elf64_swap_symbol_in): Likewise.
3129         * elfcode.h (elf_swap_symbol_in): Change input args to const PTR *.
3130         (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
3131         * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
3132         (elf_link_add_object_symbols): Likewise.
3133         (elf_link_record_local_dynamic_symbol): Likewise.
3134         (elf_link_input_bfd): Likewise.
3135         (elf_gc_mark): Likewise.
3136         (elf_reloc_symbol_deleted_p): Likewise.
3137         * elf-m10200.c (mn10200_elf_relax_section): Likewise.
3138         (mn10200_elf_relax_delete_bytes): Likewise.
3139         (mn10200_elf_symbol_address_p): Likewise.
3140         (mn10200_elf_get_relocated_section_contents): Likewise.
3141         * elf-m10300.c (mn10300_elf_relax_section): Likewise.
3142         (mn10300_elf_relax_section): Likewise.
3143         (mn10300_elf_relax_delete_bytes): Likewise.
3144         (mn10300_elf_symbol_address_p): Likewise.
3145         (mn10300_elf_get_relocated_section_contents): Likewise.
3146         * elf32-h8300.c (elf32_h8_relax_section): Likewise.
3147         (elf32_h8_relax_delete_bytes): Likewise.
3148         (elf32_h8_symbol_address_p): Likewise.
3149         (elf32_h8_get_relocated_section_contents): Likewise.
3150         * elf32-hppa.c (get_local_syms): Likewise.
3151         * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
3152         * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
3153         * elf32-sh.c (sh_elf_relax_section): Likewise.
3154         (sh_elf_relax_delete_bytes): Likewise.
3155         (sh_elf_get_relocated_section_contents): Likewise.
3156         * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
3157         * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
3158         * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
3159         * elf64-mmix.c (mmix_elf_relax_section): Likewise.
3160         * elf64-ppc.c (get_local_syms): Likewise.
3161         * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
3162         * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
3163         * elfcode.h (NAME(_bfd_elf,size_info)): Update initialiser.
3164         * elf64-alpha.c (alpha_elf_size_info): Likewise.
3165         * elf64-hppa.c (hppa64_elf_size_info): Likewise.
3166         * elf64-mips.c (mips_elf64_size_info): Likewise.
3167         * elf64-s390.c (s390_elf64_size_info): Likewise.
3168         * elf64-sparc.c (sparc64_elf_size_info): Likewise.
3169
3170 2002-06-05  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
3171
3172         * elf32-mips.c (elf32_mips_ignore_discarded_relocs): Move to...
3173         elfxx-mips.c (_bfd_mips_elf_ignore_discarded_relocs): ... here.
3174         elf64-mips.c (elf_backend_ignore_discarded_relocs): Use
3175         _bfd_mips_elf_ignore_discarded_relocs.
3176         elfxx-mips.h (_bfd_mips_elf_ignore_discarded_relocs): Declare.
3177
3178 2002-06-05  H.J. Lu <hjl@gnu.org>
3179
3180         * elfxx-mips.c (mips_elf_calculate_relocation): Call
3181         _bfd_elf_rel_local_sym for STT_SECTION relocations against
3182         the SEC_MERGE section.
3183
3184 2002-06-05  Alan Modra  <amodra@bigpond.net.au>
3185
3186         * coff-alpha.c: Update copyright date.
3187         * coff-mips.c: Likewise.
3188         * xcoff-target.h: Likewise.
3189
3190         * bfd-in.h: Remove "taken from the source" comment.
3191         * libbfd-in.h: Likewise.
3192         * libcoff-in.h: Likewise.
3193         * bfd-in2.h: Regenerate.
3194         * libbfd.h: Regenerate.
3195         * libcoff.h: Regenerate.
3196
3197         * elf.c (bfd_elf_discard_group): Return true.
3198         * elf-bfd.h (bfd_elf_discard_group): Declare.
3199         * bfd-in.h (bfd_elf_discard_group): Don't declare here.
3200         * section.c (bfd_discard_group): Rename to bfd_generic_discard_group.
3201         * bfd.c (bfd_discard_group): Define.
3202         * targets.c (struct bfd_target): Add _bfd_discard_group.
3203         (BFD_JUMP_TABLE_LINK): Here too.
3204         * libbfd-in.h (_bfd_nolink_bfd_discard_group): Define.
3205         * aout-adobe.c (aout_32_bfd_discard_group): Define.
3206         * aout-target.h (MY_bfd_discard_group): Define.
3207         * aout-tic30.c (MY_bfd_discard_group): Define.
3208         * binary.c (binary_bfd_discard_group): Define.
3209         * bout.c (b_out_bfd_discard_group): Define.
3210         * coff-alpha.c (_bfd_ecoff_bfd_discard_group): Define.
3211         * coffcode.h (coff_bfd_discard_group): Define.
3212         * coff-mips.c (_bfd_ecoff_bfd_discard_group): Define.
3213         * elfxx-target.h (bfd_elfNN_bfd_discard_group): Define.
3214         * i386msdos.c (msdos_bfd_discard_group): Define.
3215         * i386os9k.c (os9k_bfd_discard_group): Define.
3216         * ieee.c (ieee_bfd_discard_group): Define.
3217         * ihex.c (ihex_bfd_discard_group): Define.
3218         * mmo.c (mmo_bfd_discard_group): Define.
3219         * nlm-target.h (nlm_bfd_discard_group): Define.
3220         * oasys.c (oasys_bfd_discard_group): Define.
3221         * ppcboot.c (ppcboot_bfd_discard_group): Define.
3222         * som.c (som_bfd_discard_group): Define.
3223         * srec.c (srec_bfd_discard_group): Define.
3224         * tekhex.c (tekhex_bfd_discard_group): Define.
3225         * versados.c (versados_bfd_discard_group): Define.
3226         * vms.c (vms_bfd_discard_group): Define.
3227         * xcoff-target.h (_bfd_xcoff_bfd_discard_group): Define.
3228         * coff64-rs6000.c (rs6000coff64_vec): Update initialiser.
3229         (aix5coff64_vec): Likewise.
3230         * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Likewise.
3231
3232 2002-06-04  Jason Thorpe  <thorpej@wasabisystems.com>
3233
3234         * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-com.lo.
3235         (BFD32_BACKENDS_CFILES): Add elf32-sh64-com.c.
3236         (elf32-sh64-com.lo): New dependency list.
3237         * Makefile.in: Regenerate.
3238         * configure.in (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec)
3239         (bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec): Add
3240         elf32-sh64-com.lo.
3241         * configure: Regenerate.
3242         * elf32-sh64.c (sh64_address_in_cranges)
3243         (sh64_get_contents_type, sh64_address_is_shmedia): Move to...
3244         (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb):
3245         (crange_bsearch_cmpl): Prepend _bfd_sh64_ to name and move to...
3246         * elf32-sh64-com.c: ...here.  New file.
3247
3248 2002-06-04  Alan Modra  <amodra@bigpond.net.au>
3249
3250         * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Remove
3251         ATTRIBUTE_UNUSED on used params.
3252         * elf32-vax.c (elf_vax_gc_mark_hook): Remove unnecessary checks
3253         before calling bfd_section_from_elf_index on local syms.
3254         * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
3255
3256 2002-06-04  Jason Thorpe  <thorpej@wasabisystems.com>
3257
3258         * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-nbsd.lo.
3259         (BFD32_BACKENDS_CFILES): Add elf32-sh64-nbsd.c.
3260         (BFD64_BACKENDS): Add elf64-sh64-nbsd.lo.
3261         (BFD64_BACKENDS_CFILES): Add elf64-sh64-nbsd.c.
3262         (elf32-sh64-nbsd.lo, elf64-sh64-nbsd.lo): New rules.
3263         * Makefile.in: Regenerate.
3264         * config.bfd (sh5le-*-netbsd*, sh5-*-netbsd*, sh64le-*-netbsd*)
3265         (sh64-*-netbsd*): New targets.
3266         * configure.in: Add bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec,
3267         bfd_elf64_sh64nbsd_vec, and bfd_elf64_sh64lnbsd_vec.
3268         * configure: Regenerate.
3269         * elf32-sh64-nbsd.c: New file.
3270         * elf64-sh64-nbsd.c: New file.
3271         * targets.c: Add extern decls for bfd_elf32_sh64nbsd_vec,
3272         bfd_elf32_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec, and
3273         bfd_elf64_sh64lnbsd_vec.
3274
3275 2002-06-04  Alan Modra  <amodra@bigpond.net.au>
3276
3277         * elf.c (setup_group): Set SEC_LINK_ONCE on GRP_COMDAT groups.
3278         (bfd_section_from_shdr): Likewise.  Set section name of group
3279         sections from signature.
3280         (group_signature): Split out from setup_group.  Ensure symbol table
3281         is available.
3282         (bfd_elf_discard_group): New function.
3283         (_bfd_elf_make_section_from_shdr): Don't set SEC_LINK_ONCE on
3284         .gnu.linkonce* sections if they are members of a group.
3285         (set_group_contents): Set GRP_COMDAT flag.
3286         * section.c (bfd_discard_group): New function.
3287         * bfd-in.h (bfd_elf_discard_group): Declare.
3288         * bfd-in2.h: Regenerate.
3289         * elf-bfd.h (struct bfd_elf_section_data): Add linkonce_p field.
3290         (elf_linkonce_p): Define.
3291
3292 2002-06-04  Alan Modra  <amodra@bigpond.net.au>
3293
3294         * elf.c (bfd_section_from_shdr): Make "name" const.
3295         * elf-bfd.h (elf_backend_section_from_shdr): Likewise.
3296         * elf32-i370.c (i370_elf_section_from_shdr): Likewise.
3297         * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
3298         * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
3299         * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
3300         * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
3301         * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
3302         * elf64-ppc.c (ppc64_elf_section_from_shdr): Likewise.
3303         * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
3304         * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
3305         * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
3306
3307 2002-06-03  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
3308
3309         * elfxx-mips.c (ABI_64_P): Use backend's data to determine the
3310         ABI.
3311
3312 2002-06-02  Kazu Hirata  <kazu@cs.umass.edu>
3313
3314         * elf32-arc.c: Fix formatting.
3315         * elf32-arm.h: Likewise.
3316         * elf32-cris.c: Likewise.
3317         * elf32-dlx.c: Likewise.
3318         * elf32-hppa.c: Likewise.
3319         * elf32-i386.c: Likewise.
3320         * elf32-i386qnx.c: Likewise.
3321         * elf32-or32.c: Likewise.
3322         * elf32-s390.c: Likewise.
3323         * elf32-sh64.c: Likewise.
3324         * elf32-vax.c: Likewise.
3325         * elf32-xstormy16.c: Likewise.
3326         * elf64-alpha.c: Likewise.
3327         * elf64-mmix.c: Likewise.
3328         * elf64-ppc.c: Likewise.
3329         * elf64-s390.c: Likewise.
3330         * elf64-sh64.c: Likewise.
3331         * elf64-x86-64.c: Likewise.
3332
3333 2002-06-02  Richard Henderson  <rth@redhat.com>
3334
3335         * elf64-alpha.c (elf64_alpha_relocate_section): Don't dereference
3336         null when there are no got entries for a symbol.
3337         (elf64_alpha_relax_find_tls_segment): Rearrange to avoid
3338         uninitialized variable warning.
3339
3340 2002-06-01  Richard Henderson  <rth@redhat.com>
3341
3342         * elf64-alpha.c (elf64_alpha_relax_with_lituse): Don't test for
3343         undefined symbols here.
3344         (elf64_alpha_relax_section): Do it here.  Also test for not
3345         defined in the current module.
3346         (elf64_alpha_relocate_section_r): Split out of ...
3347         (elf64_alpha_relocate_section): ... here.  Don't dereference
3348         NULL when looking up local got entries.
3349
3350 2002-06-01  Richard Henderson  <rth@redhat.com>
3351
3352         * elf64-alpha.c (elf64_alpha_relax_with_lituse): Reject undefined
3353         symbols from JSR relaxation.
3354         (elf64_alpha_size_plt_section_1): New.
3355         (elf64_alpha_calc_dynrel_sizes): Split out .rela.got bits ...
3356         (elf64_alpha_size_rela_got_1): ... here.
3357         (elf64_alpha_size_dynamic_sections): Split out .rela.got bits ...
3358         (elf64_alpha_size_rela_got_section): ... here.
3359         (elf64_alpha_size_plt_section): New.
3360         (elf64_alpha_relax_section): Call them.
3361         (elf64_alpha_size_got_sections): Remove output_bfd arg.
3362         (elf64_alpha_finish_dynamic_symbol): Check gotent use_count.
3363
3364 2002-06-01  Richard Henderson  <rth@redhat.com>
3365
3366         * elf64-alpha.c (alpha_get_dtprel_base, alpha_get_tprel_base): New.
3367         (elf64_alpha_relocate_section): Use them.  Reject LE TLS relocs
3368         in shared libraries.  Fix DTPRELHI and TPRELHI value.
3369         (INSN_ADDQ, INSN_RDUNIQ): New.
3370         (struct alpha_relax_info): Add symtab_hdr, tls_segment, first_gotent.
3371         (elf64_alpha_relax_with_lituse): Return boolean.  Remove irelend
3372         argument.  Reject dynamic symbols.  Use LITUSE symbolic constants.
3373         (elf64_alpha_relax_got_load): Rename from relax_without_lituse.
3374         Handle GOTDTPREL and GOTTPREL relocations.
3375         (elf64_alpha_relax_gprelhilo): New.
3376         (elf64_alpha_relax_tls_get_addr): New.
3377         (elf64_alpha_relax_find_tls_segment): New.
3378         (elf64_alpha_relax_section): Handle TLS relocations.
3379         (ALPHA_ELF_LINK_HASH_TLS_IE): New.
3380         (elf64_alpha_check_relocs): Set it.
3381
3382 2002-06-01  Richard Henderson  <rth@redhat.com>
3383
3384         * elf64-alpha.c (elf64_alpha_relax_section): Don't store computed gp.
3385
3386         * elf64-alpha.c (elf64_alpha_check_relocs): Fix typo on maybe_dynamic
3387         check; don't suppress dynamic relocs for non-allocated sections.
3388
3389         * elf64-alpha.c: Remove dead code.
3390
3391 2002-05-31  Alan Modra  <amodra@bigpond.net.au>
3392
3393         * bfd-in2.h: Regenerate.
3394         * libbfd.h: Regenerate.
3395         * po/SRC-POTFILES.in: Regenerate.
3396
3397         * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate
3398         space for bss .plt.
3399
3400 2002-05-31  Graeme Peterson  <gp@qnx.com>
3401
3402         * Makefile.am (BFD32_BACKENDS): Add elf32-i386qnx.lo.
3403         (BFD32_BACKENDS_CFILES): Add elf32-i386qnx.c.
3404         Run "make dep-am".
3405         * Makefile.in: Regenerate.
3406         * config.bfd: Add i[3456]86-*-nto-qnx* support.
3407         * configure.in: Add bfd_elf32_i386qnx_vec support.
3408         * configure: Regenerate.
3409         * elf-bfd.h (struct elf_backend_data): Add set_nonloadable_filepos,
3410         is_contained_by_filepos, and copy_private_bfd_data_p.
3411         * elf.c (assign_file_positions_for_segments): Call backend
3412         set_nonloadable_filepos.  Fix non-K&R call to _bfd_error_handler.
3413         (IS_CONTAINED_BY_FILEPOS): Define.
3414         (INCLUDE_SECTION_IN_SEGMENT): Also test IS_CONTAINED_BY_FILEPOS.
3415         (copy_private_bfd_data): Use IS_CONTAINED_BY_FILEPOS.  Typo fix.
3416         Fix non-K&R call to _bfd_error_handler.
3417         (_bfd_elf_copy_private_section_data): Use backend
3418         copy_private_bfd_data_p.
3419         * elf32-i386.c: Don't include elfxx-target.h when
3420         ELF32_I386_C_INCLUDED is defined.
3421         * elf32-i386qnx.c: New QNX elf backend file.
3422         * elfxx-target.h: Add elf_backend_set_nonloadable_filepos,
3423         elf_backend_is_contained_by_filepos, and
3424         elf_backend_do_copy_private_bfd_data.
3425         * targets.c: Add bfd_target bfd_elf32_i386qnx_vec.
3426
3427 2002-05-31  Alan Modra  <amodra@bigpond.net.au>
3428
3429         * elfarm-oabi.c (bfd_elf32_arm_add_glue_sections_to_bfd): Define.
3430         Move other similar defines to start of file.
3431
3432 2002-05-30  Tom Rix  <trix@redhat.com>
3433
3434         * coff-rs6000.c (xcoff_rtype2howto): Handle 16 bit R_RBA.
3435         * coff64-rs6000.c (xcoff64_rtype2howto): Same.
3436
3437 2002-05-30  Richard Henderson  <rth@redhat.com>
3438
3439         * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_TLSGD,
3440         ALPHA_ELF_LINK_HASH_LU_TLSLDM, ALPHA_ELF_LINK_HASH_LU_FUNC): New.
3441         (ALPHA_ELF_GOT_ENTRY_RELOCS_DONE): Remove.
3442         (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Remove.
3443         (struct alpha_elf_got_entry): Add reloc_type, reloc_done, reloc_xlated.
3444         (struct alpha_elf_obj_tdata): Rename total_got_entries and
3445         n_local_got_entries to total_got_size and local_got_size.
3446         (elf64_alpha_howto, elf64_alpha_reloc_map): Update for TLS relocs.
3447         (alpha_got_entry_size): New.
3448         (elf64_alpha_relax_with_lituse): Use it.
3449         (elf64_alpha_relax_without_lituse): Likewise.
3450         (MAX_GOT_SIZE): Rename from MAX_GOT_ENTRIES.
3451         (get_got_entry): New.
3452         (elf64_alpha_check_relocs): Handle TLS relocs.  Reorganize.
3453         (elf64_alpha_adjust_dynamic_symbol): Test LU_FUNC as a mask.
3454         (elf64_alpha_merge_ind_symbols): Check gotent->reloc_type.
3455         (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots): Likewise.
3456         (elf64_alpha_calc_got_offsets_for_symbol): Use alpha_got_entry_size.
3457         (elf64_alpha_calc_got_offsets): Likewise.
3458         (alpha_dynamic_entries_for_reloc): New.
3459         (elf64_alpha_calc_dynrel_sizes): Use it.
3460         (elf64_alpha_size_dynamic_sections): Likewise.
3461         (elf64_alpha_relocate_section): Handle TLS relocations.
3462         * reloc.c: Add Alpha TLS relocations.
3463         * bfd-in2.h, libbfd.h: Rebuild.
3464
3465 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
3466
3467         * peXXigen.c (pe_print_idata): Remove double printed
3468         import table lines; add Bound-To comment.
3469
3470 2002-05-29  Matt Thomas  <matt@3am-software.com>
3471
3472         * Makefile.am (BFD32_BACKENDS): Add elf32-vax.lo.
3473         (BFD32_BACKENDS_CFILES): Add elf32-vax.c.
3474         (elf32-vax.lo): New rule.
3475         * Makefile.in: Regenerate.
3476         * configure.in (bfd_elf32_vax_vec)
3477         (vaxnetbsd_vec): New vectors.
3478         * configure: Regenerate.
3479         * config.bfd (vax-*-netbsdelf*)
3480         (vax-*-netbsdaout*)
3481         (vax-*-netbsd*): New targets.
3482         * elf32-vax.c: New file.
3483         * reloc.c: Add VAX relocations.
3484         * bfd-in2.h: Regenerate.
3485         * targets.c (_bfd_target_vector): Add bfd_elf32_vax_vec.
3486
3487 2002-05-29  Jason Thorpe  <thorpej@wasabisystems.com>
3488
3489         * config.bfd (arm-*-netbsd*): Add bfd_elf32_littlearm_vec
3490         and bfd_elf32_bigarm_vec to targ_selvecs.
3491
3492 2002-05-29  Ralf Habacker  <ralf.habacker@freenet.de>
3493
3494         * peXXigen.c (pe_print_idata): Fix seg faults on printing import tables
3495         with auto-imported symbols.
3496
3497 2002-05-29  Adam Nemet  <anemet@lnxw.com>
3498
3499         * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Don't add glue
3500         sections only record bfd.
3501         (bfd_elf32_arm_add_glue_sections_to_bfd): New function.
3502         * bfd-in.h (bfd_elf32_arm_add_glue_sections_to_bfd): Declare it.
3503         * bfd-in2.h: Regenerate.
3504
3505 2002-05-28  Nick Clifton  <nickc@cambridge.redhat.com>
3506
3507         * syms.c (_bfd_stab_section_find_nearest_line): Move
3508         declaration and initialisation of saw_line and saw_func out of
3509         for loop.
3510
3511 2002-05-29  Alan Modra  <amodra@bigpond.net.au>
3512
3513         * elf64-ppc.c (ppc64_elf_get_symbol_info): New function.
3514         (bfd_elf64_get_symbol_info): Define.
3515         * elfxx-target.h (bfd_elfNN_get_symbol_info): Only define if undef.
3516
3517 2002-05-29  Andrey Volkov  <avolkov@transas.com>
3518
3519         * cpu-h8300.c: Make default h8300 machine first in machine list.
3520
3521 2002-05-28  Kuang Hwa Lin <kuang@sbcglobal.net>
3522
3523         * config.bfd: Added DLX configuraton.
3524         * Makefile.am: Added DLX configuraton.
3525         * configure.in: Added DLX configuraton.
3526         * archures.c: Add DLX architecure.
3527         * reloc.c: Add DLX relocs.
3528         * targets.c: Added DLX target vector.
3529         * configure: Regenerate.
3530         * Makefile.in: Regenreate.
3531         * bfd-in2.h: Regenreate.
3532         * elf32-dlx.c: New file: Support DLX target.
3533         * cpu-dlx.c: New file: Support DLX target.
3534
3535 2002-05-25  Alan Modra  <amodra@bigpond.net.au>
3536
3537         * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Formatting.
3538
3539         * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Revert last change.
3540         (ppc64_elf_check_relocs): Don't set up function descriptor symbol
3541         strings to point inside function code sym string.
3542         (func_desc_adjust): Likewise.
3543         (ppc64_elf_hide_symbol): Rewrite code to look up function code sym.
3544
3545 2002-05-24  Michal Ludvig  <mludvig@suse.cz>
3546
3547         * elf64-x86-64.c (elf64_x86_64_grok_prstatus): Added.
3548         (elf64_x86_64_grok_psinfo): Added.
3549
3550 2002-05-24  TAMURA Kent <kent@netbsd.org>
3551
3552         * config.bfd: Add a target for i386-netbsdpe.
3553
3554 2002-05-24  Alan Modra  <amodra@bigpond.net.au>
3555
3556         * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy is_func
3557         and is_func_descriptor.
3558         (func_desc_adjust): Hide function code sym in shared libs unless
3559         there is a matching exported function descriptor sym.
3560
3561 2002-05-23  Jakub Jelinek  <jakub@redhat.com>
3562
3563         * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_THREAD_LOCAL
3564         for symbols from SHF_TLS section.
3565         (_bfd_elf_print_private_bfd_data): Add PT_TLS.
3566         (elf_fake_sections): Set SHF_TLS for SEC_THREAD_LOCAL sections.
3567         (map_sections_to_segments): Build PT_TLS segment if necessary.
3568         (assign_file_positions_for_segments): Likewise.
3569         (get_program_header_size): Account for PT_TLS segment.
3570         (swap_out_syms): Set type of BSF_THREAD_LOCAL symbols and symbols from
3571         SEC_THREAD_LOCAL sections to STT_TLS.
3572         * reloc.c: Add 386 and IA-64 TLS relocs.
3573         * section.c (SEC_THREAD_LOCAL): Define.
3574         (SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS):
3575         Remove.
3576         * elflink.h (elf_link_add_object_symbols): Support .tcommon.
3577         (size_dynamic_sections): If DF_STATIC_TLS, set DF_FLAGS
3578         unconditionally.
3579         (struct elf_final_link_info): Add first_tls_sec.
3580         (elf_bfd_final_link): Set first_tls_sec.
3581         Compute elf_hash_table (info)->tls_segment.
3582         (elf_link_output_extsym): Handle STT_TLS symbols.
3583         (elf_link_input_bfd): Likewise.
3584         * syms.c (BSF_THREAD_LOCAL): Define.
3585         * bfd-in2.h: Rebuilt.
3586         * libbfd.h: Rebuilt.
3587         * elf32-i386.c (elf_i386_tls_transition, dtpoff_base, tpoff,
3588         elf_i386_mkobject, elf_i386_object_p): New functions.
3589         (elf_howto_table): Add TLS relocs.
3590         (elf_i386_reloc_type_lookup): Support TLS relocs.
3591         (elf_i386_info_to_howto_rel): Likewise.
3592         (struct elf_i386_link_hash_entry): Add tls_type.
3593         (struct elf_i386_obj_tdata): New.
3594         (elf_i386_hash_entry, elf_i386_tdata, elf_i386_local_got_tls_type):
3595         New macros.
3596         (struct elf_i386_link_hash_table): Add tls_ldm_got.
3597         (link_hash_newfunc): Clear tls_type.
3598         (elf_i386_check_relocs): Support TLS relocs.
3599         (elf_i386_gc_sweep_hook): Likewise.
3600         (allocate_dynrelocs): Likewise.
3601         (elf_i386_size_dynamic_sections): Likewise.
3602         (elf_i386_relocate_section): Likewise.
3603         (elf_i386_finish_dynamic_symbol): Likewise.
3604         (bfd_elf32_mkobject, elf_backend_object_p): Define.
3605         * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add tprel_offset,
3606         dtpmod_offset, dtprel_offset, tprel_done, dtpmod_done, dtprel_done,
3607         want_tprel, want_dtpmod, want_dtprel.
3608         (elfNN_ia64_tprel_base, elfNN_ia64_dtprel_base): New functions.
3609         (ia64_howto_table): Add TLS relocs, rename R_IA64_LTOFF_TP22 to
3610         R_IA64_LTOFF_TPREL22.
3611         (elf_code_to_howto_index): Add TLS relocs.
3612         (elfNN_ia64_check_relocs): Support TLS relocs.
3613         (allocate_global_data_got): Account for TLS .got data.
3614         (allocate_dynrel_entries): Account for TLS dynamic relocations.
3615         (elfNN_ia64_install_value): Supprt TLS relocs.
3616         (set_got_entry): Support TLS relocs.
3617         (elfNN_ia64_relocate_section): Likewise.
3618
3619 2002-05-23  Nick Clifton  <nickc@cambridge.redhat.com>
3620
3621         * elf32-arm.h (elf32_arm_final_link_relocate): For the Thumb
3622         BLX reloc round the relocation up rather than down.
3623         * coff-arm.c (coff_arm_relocate_section): Likewise.
3624
3625 2002-05-21  H.J. Lu  (hjl@gnu.org)
3626
3627         * linker.c (_bfd_generic_link_add_one_symbol): Allow multiple
3628         definition.
3629
3630 2002-05-22  Alan Modra  <amodra@bigpond.net.au>
3631
3632         * elf64-ppc.c (ppc64_elf_size_stubs): Don't strip .branch_lt.
3633         (ppc64_elf_relocate_section): Handle unresolved relocs in opd.
3634
3635 2002-05-22  Alan Modra  <amodra@bigpond.net.au>
3636
3637         * elf64-ppc.c (ppc64_elf_relocate_section): Return false for
3638         unresolved relocs.
3639         (ppc64_elf_size_dynamic_sections): Check for splt NULL.
3640
3641 2002-05-21  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3642
3643         * bfd.c (bfd_get_arch_size): Remove bfd_set_error call for
3644         non-ELF targets.
3645
3646 2002-05-21  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3647
3648         * elf-bfd.h (elf_backend_emit_relocs): Change prototype to return
3649         an error value.
3650         * elflink.h (elf_link_output_relocs): Likewise. Improve error message.
3651         return with false on error.
3652         (elf_link_input_bfd): Check reloc_emitter return value.
3653
3654 2002-05-21  Jason Thorpe  <thorpej@wasabisystems.com>
3655
3656         * config.bfd (armeb-*-netbsdelf*): New target.
3657
3658 2002-05-20  Alan Modra  <amodra@bigpond.net.au>
3659
3660         * elf64-ppc.c (ppc_build_one_stub): Point undefined function syms
3661         at the plt call stub.
3662
3663 2002-05-19  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3664
3665         * cpu-mips.c (mips_compatible): Don't try to check machine
3666         compatibility.
3667
3668 2002-05-18  Tom Rix  <trix@redhat.com>
3669
3670         * coff64-rs6000.c (_bfd_xcoff64_swap_aux_out):  Fix C_FILE auxent.
3671
3672 2002-05-17  Alan Modra  <amodra@bigpond.net.au>
3673
3674         * elf64-ppc.c (ppc64_elf_info_to_howto): Formatting.
3675         (ppc64_elf_relocate_section): Don't warn about reloc overflow when
3676         we've already warned about an undefined symbol.  Report more
3677         detail on reloc errors.
3678
3679 2002-05-17  Alan Modra  <amodra@bigpond.net.au>
3680
3681         * acinclude.m4 (AM_INSTALL_LIBBFD): New.
3682         * configure.in: Invoke AM_INSTALL_LIBBFD.
3683         * Makefile.am (install-data-local): Revert 2002-05-13.  Move to..
3684         (install_libbfd): .. New target.
3685         (uninstall_libbfd): Likewise.
3686         (install-bfdlibLTLIBRARIES): Likewise.
3687         (uninstall-bfdlibLTLIBRARIES): Likewise.
3688         (bfdlibdir): New.
3689         (bfdincludedir): New.
3690         (lib_LTLIBRARIES): Rename to bfdlib_LTLIBRARIES.
3691         * aclocal.m4: Regenerate.
3692         * configure: Regenerate.
3693         * Makefile.in: Regenerate.
3694
3695 2002-05-17  Stuart Balfour <sbalfour@cisco.com>
3696
3697         * hash.c (bfd_hash_lookup): Remove computation of len from inside
3698         hash loop.
3699
3700 2002-05-16  Nick Clifton  <nickc@cambridge.redhat.com>
3701
3702         * config.bfd: Add targets for sh64-linux (little endian and
3703         big endian).
3704
3705 2002-05-15  Laurent Pinchart <laurent.pinchart@skynet.be>
3706
3707         * peXXigen.c (pe_print_idata): Do not assume that the first thunk
3708         is located in the same section as the import table.  Instead
3709         check, and if necessary load the section containing the thunk.
3710
3711 2002-05-15  Nick Clifton  <nickc@cambridge.redhat.com>
3712
3713         * aix5ppc-core.c (xcoff64_core_p): Replace bfd_read with
3714         bfd_bread.
3715         (xcoff64_core_file_matches_executable_p): Replace bfd_read
3716         with bfd_bread.
3717
3718 2002-05-15  Alan Modra  <amodra@bigpond.net.au>
3719
3720         * aix5ppc-core.c: Warning fixes.
3721         * aout-adobe.c (aout_32_bfd_link_just_syms): Define.
3722         * aout-target.h (MY_bfd_link_just_syms): Define.
3723         * aout-tic30.c (MY_bfd_link_just_syms): Define.
3724         * bfd.c (bfd_link_just_syms): Define.
3725         * binary.c (binary_bfd_link_just_syms): Define.
3726         * bout.c (b_out_bfd_link_just_syms): Define.
3727         * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update initializer.
3728         * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
3729         * coffcode.h (coff_bfd_link_just_syms): Define.
3730         * elf-bfd.h (enum elf_link_info_type): Add ELF_INFO_TYPE_JUST_SYMS.
3731         (elf_discarded_section): Check for ELF_INFO_TYPE_JUST_SYMS.
3732         (_bfd_elf_link_just_syms): Declare.
3733         * elf.c (_bfd_elf_link_just_syms): New function.
3734         * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Check that
3735         sections haven't already been discarded by the linker.
3736         * elflink.h (elf_link_add_object_symbols): Likewise for stab
3737         sections and SEC_MERGE sections.
3738         (elf_bfd_discard_info): Similarly here.
3739         * elfxx-target.h (bfd_elfNN_bfd_link_just_syms): Define.
3740         * i386msdos.c (msdos_bfd_link_just_syms): Define.
3741         * i386os9k.c (os9k_bfd_link_just_syms): Define.
3742         * ieee.c (ieee_bfd_link_just_syms): Define.
3743         * ihex.c (ihex_bfd_link_just_syms): Define.
3744         * libbfd-in.h (_bfd_nolink_bfd_link_just_syms): Define.
3745         (_bfd_generic_link_just_syms): Declare.
3746         * libecoff.h (_bfd_ecoff_bfd_link_just_syms): Define.
3747         * linker.c (_bfd_generic_link_just_syms): New function.
3748         * mmo.c (mmo_bfd_link_just_syms): Define.
3749         * nlm-target.h (nlm_bfd_link_just_syms): Define.
3750         * oasys.c (oasys_bfd_link_just_syms): Define.
3751         * ppcboot.c (ppcboot_bfd_link_just_syms): Define.
3752         * som.c (som_bfd_link_just_syms): Define.
3753         * srec.c (srec_bfd_link_just_syms): Define.
3754         * targets.c (struct bfd_target): Add _bfd_link_just_syms.
3755         (BFD_JUMP_TABLE_LINK): And here.
3756         * tekhex.c (tekhex_bfd_link_just_syms): Define.
3757         * versados.c (versados_bfd_link_just_syms): Define.
3758         * vms.c (vms_bfd_link_just_syms): Define.
3759         * libbfd.h: Regenerate.
3760         * bfd-in2.h: Regenerate.
3761
3762 2002-05-15  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3763
3764         * elf32-mips.c: Remove superfluous definitions copied from
3765         elfxx-mips.c.
3766         (bfd_elf32_bigmips_vec,bfd_elf32_littlemips_vec): Use the
3767         SGIish vectors to check the special case.
3768         (mips_elf_hi16_reloc): Fix comment.
3769         (mips_elf_got16_reloc): Likewise.
3770         (_bfd_mips_elf32_gprel16_reloc): Likewise.
3771         (elf_reloc_map): Code cleanup.
3772         (mips_reloc_map): Add comment.
3773         (bfd_elf23_bfd_reloc_type_lookup): Code cleanup.
3774         (mips_elf32_rtype_to_howto): Likewise.
3775         (mips_elf32_discard_info): Likewise.
3776         (elf32_mips_irix_compat): Invert logic: Only SGIish vectors
3777         lead to IRIX compatibility now.
3778
3779 2002-05-15  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3780
3781         * elfxx-mips.c: Call it IRIX, not Irix in comments.
3782
3783 2002-05-13  Jason Thorpe  <thorpej@wasabisystems.com>
3784
3785         * config.bfd (shle-*-netbsdelf*): Add target which includes
3786         sh64 support.
3787
3788 2002-05-13  David Edelsohn  <edelsohn@gnu.org>
3789
3790         * configure.in: Revert 2002-04-07.  Instead, auto-configure
3791         HAVE_ST_C_IMPL.
3792         * configure: Regenerate.
3793         * config.in: Regenerate.
3794         * rs6000-core.c (CNEW_IMPL): Guard use of c_impl with HAVE_ST_C_IMPL
3795         or AIX_5_CORE.
3796
3797 2002-05-11  Federico G. Schwindt <fgsch@olimpo.com.br>
3798
3799         * configure.in (sparc*-*-openbsd*): Support sparc64-openbsd
3800         corefiles as well.2
3801         * configure: Regenerate.
3802
3803 2002-05-13  Alan Modra  <amodra@bigpond.net.au>
3804
3805         * Makefile.am (install-data-local): Install headers to
3806         $(exec_prefix)/include.
3807         * Makefile.in: Regenerate.
3808
3809 2002-05-11  Ralf Corsepius  <corsepiu@faw.uni-ulm.de>
3810             Daniel Jacobowitz  <drow@mvista.com>
3811
3812         * coff-sh.c (sh_reloc_map): Map to R_SH_IMM32 for non-PE.  Don't
3813         map BFD_RELOC_RVA.
3814
3815 2002-05-11  Federico G. Schwindt <fgsch@olimpo.com.br>
3816
3817         * config.bfd (alpha*-*-openbsd*, sparc64*-*-openbsd*,
3818         hppa*-*-openbsd*): New targets.
3819         * configure.in (alpha*-*-openbsd*): Set COREFILE.
3820         * configure: Regenerate.
3821
3822 2002-05-10  Tom Rix  <trix@redhat.com>
3823
3824         * coff64-rs6000.c (xcoff64_reloc_type_br): New function for
3825         xcoff64_ppc_relocate_section.
3826         * coff-rs6000.c : Extern common xcoff_reloc_type functions.
3827         * libxcoff.h: Common xcoff_reloc_type function declaration.
3828
3829 2002-05-10  Alan Modra  <amodra@bigpond.net.au>
3830
3831         * elf32-i386.c (elf_i386_relocate_section): Remove overflow checks
3832         added in 2002-05-09 commit.
3833
3834         * elf32-hppa.c (elf32_hppa_size_stubs): Revert part of 2002-05-04,
3835         don't look for stubs on all undefined syms.
3836
3837 2002-05-09  Alan Modra  <amodra@bigpond.net.au>
3838
3839         * elf64-ppc.c (RA_REGISTER_MASK, RA_REGISTER_SHIFT): Delete.
3840         (ppc64_elf_howto_raw <R_PPC64_RELATIVE>): Not pc_relative or
3841         pcrel_offset.
3842
3843         * elf32-i386.c (elf_howto_table): Comments.
3844         (elf_i386_relocate_section): Handle more relocs for relocatable
3845         linking and against SEC_MERGE sections.
3846
3847 2002-05-08  Alan Modra  <amodra@bigpond.net.au>
3848
3849         * elf32-ppc.c (ppc_elf_create_got): New function.
3850         (ppc_elf_create_dynamic_sections): Call ppc_elf_create_got before
3851         _bfd_elf_create_dynamic_sections.  Correct .plt flags.
3852         (ppc_elf_check_relocs): Use ppc_elf_create_got in place of
3853         _bfd_elf_create_got_section.
3854
3855 2002-05-07  Alan Modra  <amodra@bigpond.net.au>
3856
3857         * elf-bfd.h (struct elf_backend_data): Add rela_normal.
3858         * elfxx-target.h (elf_backend_rela_normal): Define.
3859         (elfNN_bed): Init rela_normal.
3860         * elflink.h (elf_link_input_bfd <emit_relocs>): Handle adjustment
3861         for section symbols here if rela_normal.  Simplify abs section test.
3862         * elf-m10200.c (mn10200_elf_relocate_section): If relocatable,
3863         return immediately.  Remove code handling relocatable linking.
3864         * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
3865         * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
3866         * elf32-i370.c (i370_elf_relocate_section): Likewise.
3867         * elf32-i860.c (elf32_i860_relocate_section): Likewise.
3868         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
3869         * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
3870         * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
3871         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
3872         * elf32-s390.c (elf_s390_relocate_section): Likewise.
3873         * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
3874         * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
3875         * elf64-s390.c (elf_s390_relocate_section): Likewise.
3876         * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
3877         * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
3878         * elf32-arm.h (elf32_arm_relocate_section): Likewise #ifndef USE_REL.
3879         * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
3880         * elf-m10200.c (elf_backend_rela_normal): Define.
3881         * elf-m10300.c (elf_backend_rela_normal): Define.
3882         * elf32-fr30.c (elf_backend_rela_normal): Define.
3883         * elf32-i370.c (elf_backend_rela_normal): Define.
3884         * elf32-i860.c (elf_backend_rela_normal): Define.
3885         * elf32-m68k.c (elf_backend_rela_normal): Define.
3886         * elf32-mcore.c (elf_backend_rela_normal): Define.
3887         * elf32-openrisc.c (elf_backend_rela_normal): Define.
3888         * elf32-ppc.c (elf_backend_rela_normal): Define.
3889         * elf32-s390.c (elf_backend_rela_normal): Define.
3890         * elf32-xstormy16.c (elf_backend_rela_normal): Define.
3891         * elf64-ppc.c (elf_backend_rela_normal): Define.
3892         * elf64-s390.c (elf_backend_rela_normal): Define.
3893         * elf64-x86-64.c (elf_backend_rela_normal): Define.
3894         * elfxx-ia64.c (elf_backend_rela_normal): Define.
3895         * elf32-arm.h (elf_backend_rela_normal): Define #ifndef USE_REL.
3896         * elf32-m32r.c (elf_backend_rela_normal): Likewise.
3897
3898 2002-05-06  Nick Clifton  <nickc@cambridge.redhat.com>
3899
3900         * elf32-arm.h (elf32_arm_final_link_relocate): Convert
3901         'reloc_signed_max' and 'reloc_signed_min' into half-word offsets.
3902
3903 2002-05-06  Alan Modra  <amodra@bigpond.net.au>
3904
3905         * elflink.h (elf_link_input_bfd <emit_relocs>): Adjust r_offset
3906         when not relocatable.  Fix reloc_emitter call for K&R.
3907
3908 2002-05-04  Alan Modra  <amodra@bigpond.net.au>
3909
3910         * elf64-ppc.c (ppc64_elf_relocate_section): Reinstate code
3911         reloading local sym addend mistakenly removed in 2002-05-01 change.
3912
3913         * dwarf2.c (struct line_head): Make prologue_length a bfd_vma.
3914         (read_abbrevs): Change "offset" param to bfd_vma.
3915         (parse_comp_unit): Change "version" and addr_size to unsigned ints.
3916         Change "abbrev_offset" to bfd_vma.
3917         (read_indirect_string): Use correct conversion chars in error
3918         message format string, cast bfd_vma's to unsigned long.
3919         (read_abbrevs): Likewise.
3920         (read_attribute_value): Likewise.
3921         (decode_line_info): Likewise.
3922         (scan_unit_for_functions): Likewise.
3923         (parse_comp_unit): Likewise.
3924
3925 2002-05-04  Tom Rix  <trix@redhat.com>
3926
3927         * coffswap.h (coff_swap_reloc_in): Remove XCOFF support.
3928         (coff_swap_reloc_out): Same.
3929         * coff-rs6000.c: (xcoff_swap_reloc_in): Moved from coffswap.h.
3930         (xcoff_swap_reloc_out): Same.
3931         (xcoff_rtype2howto): Renamed from _bfd_xcoff_rtype2howto. Special
3932         case some 16 bit relocs. Add reloc value to output.
3933         (xcoff_howto_table): Remove 64 bit R_POS, add 16 bit
3934         R_RBR. Improve names.
3935         (_bfd_xcoff_reloc_type_lookup): Adjust for removal of 64 bit R_POS.
3936         (bfd_xcoff_backend_data): Update with new reloc swap names.
3937         (bfd_pmac_xcoff_backend_data) : Same.
3938         * coff64-rs6000.c: (xcoff64_swap_reloc_in): Moved from coffswap.h.
3939         (xcoff64_swap_reloc_out): Same.
3940         (xcoff64_rtype2howto): Special case some 16 bit relocs and 32 bit
3941         R_POS. Add reloc value to output.
3942         (xcoff64_howto_table): Move 64 bit R_POS to first entry.  Add 16
3943         bit R_RBR. Improve names, masks.
3944         (xcoff64_reloc_type_lookup): Adjust for move of 64 bit R_POS.
3945         (bfd_xcoff_backend_data): Update with new reloc swap names.
3946         (bfd_xcoff_aix5_backend_data) : Same.
3947
3948 2002-05-04  Alan Modra  <amodra@bigpond.net.au>
3949
3950         * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add
3951         bfd_count top_index, input_list, all_local_syms.
3952         (elf32_hppa_setup_section_lists): New function, split from
3953         elf32_hppa_size_stubs.
3954         (elf32_hppa_next_input_section): Likewise.
3955         (group_sections): Likewise.
3956         (get_local_syms): Likewise.
3957         (elf32_hppa_size_stubs): Adjust for split out functions.  Look for
3958         stubs on undefined syms too.
3959         (elf32_hppa_set_gp): Use bfd_link_hash* instead of elf_link_hash*.
3960         Only access htab elf fields when we have an elf hash table.
3961         * elf32-hppa.h (elf32_hppa_setup_section_lists): Declare.
3962         (elf32_hppa_next_input_section): Declare.
3963
3964 2002-05-04  Bob Byrnes  <byrnes@curl.com>
3965
3966         * opncls.c (_bfd_new_bfd_contained_in): Check return value of
3967         _bfd_new_bfd.
3968
3969 2002-05-03  H.J. Lu  (hjl@gnu.org)
3970
3971         * elfxx-mips.c (mips_elf_link_hash_entry): Add forced_local.
3972         (mips_elf_link_hash_newfunc): Initialize forced_local to false.
3973         (mips_elf_record_global_got_symbol): Call _bfd_mips_elf_hide_symbol
3974         to hide a global symbol.
3975         (_bfd_mips_elf_hide_symbol): Return if forced_local is true. Set
3976         forced_local to true.
3977
3978 2002-05-02  Richard Henderson  <rth@redhat.com>
3979
3980         * elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs
3981         vs SHN_UNDEF to zero.
3982
3983 2002-05-02  Alan Modra  <amodra@bigpond.net.au>
3984
3985         * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_SECTOFF>): Change to a
3986         16 bit reloc.
3987         <R_PPC64_SECTOFF_DS>: Likewise.
3988         (ppc64_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
3989         SECTOFF reloc.
3990         * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_SECTOFF>): Correct.
3991         (ppc_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
3992         SECTOFF reloc.
3993
3994         * elf64-ppc.c (ppc64_elf_addr16_ha_reloc): Delete.
3995         (ppc64_elf_ha_reloc): New function.
3996         (ppc64_elf_brtaken_reloc): New function.
3997         (ppc64_elf_sectoff_reloc): New function.
3998         (ppc64_elf_sectoff_ha_reloc): New function.
3999         (ppc64_elf_toc_reloc): New function.
4000         (ppc64_elf_toc_ha_reloc): New function.
4001         (ppc64_elf_toc64_reloc): New function.
4002         (ppc64_elf_unhandled_reloc): New function.
4003         (ppc64_elf_howto_raw): Use the above.
4004         <R_PPC64_RELATIVE>: Mark pc_relative, pcrel_offset.
4005         <R_PPC64_SECTOFF>: Not pc_relative or pcrel_offset.  Fix dst_mask.
4006         <R_PPC64_SECTOFF_DS>: Likewise.
4007         (IS_ABSOLUTE_RELOC): Update.
4008         (struct ppc_link_hash_table): Add have_undefweak.
4009         (ppc64_elf_link_hash_table_create): Init.
4010         (func_desc_adjust): Set have_undefweak.
4011         (ppc64_elf_func_desc_adjust): Call func_desc_adjust earlier.  Only
4012         add the .sfpr blr when have_undefweak.
4013         (ppc64_elf_setup_section_lists): Check hash table flavour.
4014         (ppc64_elf_next_input_section): Move output_section->owner test to
4015         ppc64elf.em.
4016         (ppc64_elf_set_toc): Rename to ppc64_elf_toc, remove info param
4017         and relocatable test.  Return TOCstart and don't set elf_gp.
4018         (ppc64_elf_relocate_section): Correct BRTAKEN/BRNTAKEN branch
4019         offset calculation.  Add assert on weak sym branch tweaks.
4020         * elf64-ppc.h (ppc64_elf_set_toc): Delete.
4021         (ppc64_elf_toc): Declare.
4022         (ppc64_elf_next_input_section): Update.
4023
4024 2002-05-01  Alan Modra  <amodra@bigpond.net.au>
4025
4026         * syms.c (_bfd_stab_section_find_nearest_line): Don't bomb on NULL
4027         file_name.
4028
4029 2002-05-01  Alan Modra  <amodra@bigpond.net.au>
4030
4031         * elf64-ppc.c (CROR_151515, CROR_313131): Define.
4032         (ppc64_elf_relocate_section): Use them.  Don't look for plt calls
4033         on R_PPC64_ADDR24 relocs.  Require a nop or no link reg on plt
4034         call branches.  Correct undefined weak destination.
4035         (ppc64_elf_func_desc_adjust): Always create at least one blr in
4036         .sfpr, and correct case where either only savef* or restf* is
4037         needed.
4038
4039         Long branch stubs, multiple stub sections.
4040         * elf64-ppc.h (ppc64_elf_setup_section_lists): Declare.
4041         (ppc64_elf_next_input_section): Declare.
4042         * elf64-ppc.c: Move linker-only prototypes.
4043         (STUB_SUFFIX): Define.
4044         (enum ppc_stub_type): New.
4045         (struct ppc_stub_hash_entry): New.
4046         (struct ppc_branch_hash_entry): New.
4047         (struct ppc_link_hash_entry): Add stub_cache, oh.
4048         (struct ppc_link_hash_table): Add stub_hash_table etc.  Remove
4049         sstub.  Add sbrlt, srelbrlt, has_14bit_branch, stub_iteration.
4050         Rename plt_overflow to stub_error.
4051         (ppc_stub_hash_lookup): Define.
4052         (ppc_branch_hash_lookup): Define.
4053         (stub_hash_newfunc): New function.
4054         (branch_hash_newfunc): New function.
4055         (link_hash_newfunc): Init new fields.
4056         (ppc64_elf_link_hash_table_create): Likewise.
4057         (ppc64_elf_link_hash_table_free): New function.
4058         (ppc_stub_name): New function.
4059         (ppc_get_stub_entry): New function.
4060         (ppc_add_stub): New function.
4061         (create_linkage_sections): Use bfd_make_section_anyway.  Create
4062         .branch_lt and .rela.branch_lt sections.  Don't create .stub.
4063         (ppc64_elf_check_relocs): Set has_14bit_branch on R_PPC64_REL14*,
4064         and set up for plt call stubs.  Link func and func desc syms.
4065         (ppc64_elf_gc_sweep_hook): Handle REL14* as per REL24.
4066         (func_desc_adjust): Avoid hash lookup when func desc sym available
4067         via shortcut, and set links when processing.
4068         (ppc64_elf_hide_symbol): Likewise.
4069         (allocate_dynrelocs): Don't allocate stub section here.
4070         (ppc64_elf_size_dynamic_sections): Handle sbrlt and srelbrlt.
4071         Remove sstub code.
4072         (ppc_type_of_stub): New function.
4073         (build_one_stub): Delete.
4074         (ppc_build_one_stub): New function.
4075         (ppc_size_one_stub): New function.
4076         (ppc64_elf_setup_section_lists): New function.
4077         (ppc64_elf_next_input_section): New function.
4078         (group_sections): New function.
4079         (get_local_syms): New function.
4080         (ppc64_elf_size_stubs): Rewrite.
4081         (ppc64_elf_build_stubs): Rewrite.
4082         (ppc64_elf_relocate_section): Look up stub entry for REL24
4083         relocs.  Don't propagate REL14* to dynamic objects.  Look for long
4084         branch stubs if REL14* or REL24 relocs won't reach.
4085         (bfd_elf64_bfd_link_hash_table_free): Define.
4086
4087 2002-04-30  Mark Mitchell  <mark@codesourcery.com>
4088
4089         * config.bfd: Add support for powerpc-*-windiss.
4090
4091 2002-04-30  Tom Rix  <trix@redhat.com>
4092
4093         * xcofflink.c (xcoff_link_add_symbols): Always copy undef C_EXT
4094         symbol names into the hash table.
4095
4096 2002-04-28  Tom Rix  <trix@redhat.com>
4097
4098         * coff-rs6000.c (xcoff_calculate_relocation) : Function table for
4099         calulating relocations.
4100         (xcoff_complain_overflow) : Function table for relocation errors.
4101         (xcoff_ppc_relocate_section): Use relocation and complain function
4102         tables.
4103         (xcoff_complain_overflow_unsigned_func): New complain function.
4104         (xcoff_complain_overflow_signed_func): Same.
4105         (xcoff_complain_overflow_bitfield_func): Same.
4106         (xcoff_complain_overflow_dont_func): Same.
4107         (xcoff_reloc_type_crel): New recot function.
4108         (xcoff_reloc_type_br): Same.
4109         (xcoff_reloc_type_ba): Same.
4110         (xcoff_reloc_type_toc): Same.
4111         (xcoff_reloc_type_rel): Same.
4112         (xcoff_reloc_type_neg): Same.
4113         (xcoff_reloc_type_pos): Same.
4114         (xcoff_reloc_type_fail): Same.
4115         (xcoff_reloc_type_noop): Same.
4116         * libxcoff.h : Declare common parts for xcoff64.
4117         * coff64-rs6000.c (xcoff64_ppc_relocate_section): Use relocation
4118         and complain function tables.
4119
4120 2002-04-28  Alan Modra  <amodra@bigpond.net.au>
4121
4122         * elf64-x86-64.c (struct elf64_x86_64_dyn_relocs): Comment typo.
4123         * elf32-hppa.c (elf32_hppa_final_link): Formatting.
4124
4125 2002-04-26  Alan Modra  <amodra@bigpond.net.au>
4126
4127         * opncls.c (bfd_make_readable): Call bfd_section_list_clear.
4128         * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
4129
4130         * elflink.h (elf_bfd_final_link): Ensure input bfd class is the
4131         same as the output before calling elf_link_input_bfd.
4132
4133         * coffcode.h (coff_compute_section_file_positions): Set
4134         section_tail after shuffling section list.
4135
4136 2002-04-24  Christian Groessler <chris@groessler.org>
4137
4138         * coff-z8k.c (extra_case): Fix R_IMM32 relocations: The
4139         addresses are 23bit with a special layout, not plain 32bit
4140         values.  Prevent relocation of immediate values.
4141
4142 2002-04-24  Chris G. Demetriou  <cgd@broadcom.com>
4143
4144         * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): If MDMX or
4145         MIPS-16 ASE flags are set, print something to indicate that.
4146
4147 2002-04-23  Alan Modra  <amodra@bigpond.net.au>
4148
4149         * elf32-hppa.c (hppa_type_of_stub): Correct and simplify condition
4150         under which a plt call stub is used.
4151         (final_link_relocate): Similarly.
4152         (allocate_plt_static): Clear h-plabel except when plt entry is
4153         exclusively used for a plabel.
4154         (allocate_dynrelocs): Use the above to simplify plt sizing.
4155         (struct elf32_hppa_link_hash_table): Add has_22bit_branch.
4156         (elf32_hppa_link_hash_table_create): Init.
4157         (BL22_RP): Define.
4158         (hppa_build_one_stub): Use BL22_RP if has_22bit_branch.
4159         (elf32_hppa_check_relocs): Set has_22bit_branch.
4160
4161         * elf32-hppa.c (elf32_hppa_check_relocs): Remove debug message.
4162         (final_link_relocate): Likewise.
4163
4164 2002-04-22  Jakub Jelinek  <jakub@redhat.com>
4165
4166         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't build
4167         search table if some FDE is DW_EH_PE_aligned encoded either.
4168         (_bfd_elf_write_section_eh_frame): Handle terminating FDE specially.
4169
4170 2002-04-22  Richard Smith  <richard@ex-parrot.com>
4171             Jakub Jelinek  <jakub@redhat.com>
4172
4173         * elf-eh-frame.c (struct eh_cie_fde): Add per_encoding_relative.
4174         (_bfd_elf_discard_section_eh_frame): Set it for CIEs with pcrel
4175         encoded personality.
4176         (_bfd_elf_write_section_eh_frame): Adjust pcrel encoded personality
4177         for CIE/FDE removal.
4178
4179 2002-04-20  Tom Rix  <trix@redhat.com>
4180
4181         * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Fix C_FILE auxent.
4182
4183 2002-04-20  Alan Modra  <amodra@bigpond.net.au>
4184
4185         * archures.c (bfd_lookup_arch): Move the list order comment..
4186         (struct bfd_arch_info): ..to where it belongs.
4187         * bfd-in2.h: Regenerate.
4188
4189         * archures.c (bfd_lookup_arch): Add comment on list order.
4190         (bfd_default_set_arch_mach): Use bfd_lookup_arch.
4191         * cpu-powerpc.c (bfd_powerpc_archs): Re-order so that the default
4192         is always at head of list.
4193
4194 2002-04-18  Nick Clifton  <nickc@cambridge.redhat.com>
4195
4196         * coff-arm.c (coff_thumb_pcrel_12, coff_thumb_pcrel_9,
4197         insert_thumb_branch, record_thumb_to_arm_glue): Suppress
4198         definition of these functions for ARM_WINCE builds as they are
4199         not used.
4200         (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define
4201         for ARM_WINCE builds.
4202
4203 2002-04-18  Nick Clifton  <nickc@cambridge.redhat.com>
4204
4205         * coff-arm.c (bfd_arm_process_before_allocation):
4206
4207 2002-04-17  J"orn Rennecke <joern.rennecke@superh.com>
4208
4209         * cpu-sh.c (scan_mach): Delete.
4210         (arch_info_struct): Replace scan_mach with bfd_default_scan.
4211         (bfd_sh_arch): Likewise.
4212
4213 2002-04-16  Nick Clifton  <nickc@cambridge.redhat.com>
4214
4215         * ihex.c (ihex_write_object_contents): Fix check for records
4216         crossing 64K boundaries.
4217
4218 2002-04-16  Alan Modra  <amodra@bigpond.net.au>
4219
4220         * elf32-m32r.c (m32r_elf_add_symbol_hook): Check the hash table
4221         type rather than just assuming entries are ELF.
4222         * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
4223         * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
4224         * elf64-sparc.c (sparc64_elf_add_symbol_hook): Likewise.
4225         * elf64-mmix.c (mmix_elf_add_symbol_hook): Use bfd_link_hash_entry
4226         rather than elf_link_hash_entry.
4227
4228 2002-04-15  Richard Henderson  <rth@redhat.com>
4229
4230         * elf32-mips.c (mips_elf32_object_p): Revert 0404 fragment: allow
4231         n32 binaries.
4232
4233 2002-04-15  Michael Snyder  <msnyder@redhat.com>
4234
4235         * opncls.c (bfd_close): Write contents if writeable.
4236         Minor formatting tidy-ups.
4237
4238 2002-04-15  Alan Modra  <amodra@bigpond.net.au>
4239
4240         * elf32-ppc.c (ppc_elf_add_symbol_hook): Check the hash table type.
4241
4242 2002-04-12  Michael Snyder  <msnyder@redhat.com>
4243
4244         * bfd-in.h (bfd_get_section_lma): New access macro.
4245         Minor white-space fix-up.
4246
4247 2002-04-12  Alan Modra  <amodra@bigpond.net.au>
4248
4249         * elf.c (prep_headers): Don't zero EI_OSABI, EI_ABIVERSION or
4250         header pad.
4251
4252 2002-04-09  DJ Delorie  <dj@redhat.com>
4253
4254         * elfarm-nabi.c (elf32_arm_howto_table): Fix ABS16 masks.
4255
4256 2002-04-09  Casper S. Hornstrup <chorns@users.sourceforge.net>
4257
4258         * coffcode.h (coff_read_word): New.
4259         (coff_compute_checksum): New.
4260         (coff_apply_checksum): New.
4261         (coff_write_object_contents): Call coff_apply_checksum () to
4262         apply checksum to PE image.
4263
4264 2002-04-08  Randolph Chung  <tausq@debian.org>
4265
4266         * elf32-hppa.c (hppa_unwind_entry_compare): Move to elf-hppa.h.
4267         (elf32_hppa_final_link): Split out sorting logic to..
4268         * elf-hppa.h (elf_hppa_sort_unwind): ..here.
4269         (elf_hppa_final_link): Call elf_hppa_sort_unwind.
4270
4271 2002-04-07  Andrew Cagney  <ac131313@redhat.com>
4272
4273         * configure.in: Add missing ``|'' to powerpc-*-aix4.[4-9]*
4274         pattern.
4275         * configure: Re-generate.
4276
4277 2002-04-07  Andrew Cagney  <ac131313@redhat.com>
4278
4279         * configure.in: Only define AIX_CORE_DUMPX_CORE when AIX version
4280         is greater or equal to 4.3.3.
4281         * configure: Regenerate.
4282         Fix PR gdb/344.
4283
4284 2002-04-05  Hans-Peter Nilsson  <hp@axis.com>
4285
4286         * elf32-cris.c (cris_elf_howto_table) <R_CRIS_16_PCREL,
4287         R_CRIS_32_PCREL>: Fix typo in name.
4288         (cris_elf_check_relocs): Always create .rela.got here when
4289         R_CRIS_16_GOTPLT or R_CRIS_32_GOTPLT is seen.
4290         (elf_cris_adjust_gotplt_to_got): Don't create .rela.got here;
4291         assume it's created.
4292
4293 2002-04-04  Daniel Jacobowitz  <drow@mvista.com>
4294
4295         * aout-adobe.c (aout_32_bfd_link_hash_table_free): Define.
4296         * aout-target.h (MY_bfd_link_hash_table_free): Conditionally
4297         define.
4298         * aout-tic30.c (MY_bfd_link_hash_table_free): Likewise.
4299         * bfd.c (bfd_link_hash_table_free): Define.
4300         * binary.c (binary_bfd_link_hash_table_free): Define.
4301         * bout.c (b_out_bfd_link_hash_table_free): Define.
4302         * coff-rs6000.c (rs6000coff_vec): Include
4303         _bfd_generic_link_hash_table_free.
4304         (pmac_xcoff_vec): Likewise.
4305         * coff64-rs6000.c (rs6000coff64_vec): Likewise.
4306         (aix5coff64_vec): Likewise.
4307         * coffcode.h (coff_bfd_link_hash_table_free): Conditionally define.
4308         * elf-m10300.c (elf32_mn10300_link_hash_table_free): New function.
4309         (bfd_elf32_bfd_link_hash_table_free): Define.
4310         * elf32-hppa.c (elf32_hppa_link_hash_table_free): New function.
4311         (bfd_elf32_bfd_link_hash_table_free): Define.
4312         * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Conditionally
4313         define.
4314         * i386msdos.c (msdos_bfd_link_hash_table_free): Define.
4315         * i386os9k.c (os9k_bfd_link_hash_table_free): Define.
4316         * ieee.c (ieee_bfd_link_hash_table_free): Define.
4317         * ihex.c (ihex_bfd_link_hash_table_free): Define.
4318         * libbfd-in.h (_bfd_nolink_bfd_link_hash_table_free): Define.
4319         (_bfd_generic_link_hash_table_free): Add prototype.
4320         * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Add prototype.
4321         * libecoff.h (_bfd_ecoff_bfd_link_hash_table_free): Define.
4322         * linker.c (_bfd_generic_link_hash_table_free): New function.
4323         * mmo.c (mmo_bfd_link_hash_table_free): Define.
4324         * nlm-target.h (nlm_bfd_link_hash_table_free): Define.
4325         * oasys.c (oasys_bfd_link_hash_table_free): Define.
4326         * ppcboot.c (ppcboot_bfd_link_hash_table_free): Define.
4327         * som.c (som_bfd_link_hash_table_free): Define.
4328         * srec.c (srec_bfd_link_hash_table_free): Define.
4329         * tekhex.c (tekhex_bfd_link_hash_table_free): Define.
4330         * versados.c (versados_bfd_link_hash_table_free): Define.
4331         * vms.c (vms_bfd_link_hash_table_free): New function.
4332         * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_free): New function.
4333
4334         * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_malloc
4335         instead of bfd_alloc.
4336         * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
4337         * coff-mcore.c (coff_mcore_link_hash_table_create): Likewise.
4338         * coff-ppc.c (ppc_coff_link_hash_table_create): Likewise.
4339         * cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
4340         * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
4341         * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
4342         * elf.c (_bfd_elf_link_hash_table_create): Likewise.
4343         * elf32-arm.h (elf32_arm_link_hash_table_create): Likewise.
4344         * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
4345         * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
4346         * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
4347         * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
4348         * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
4349         * elf32-sh.c (sh_elf_link_hash_table_create): Likewise.
4350         * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create): Likewise.
4351         * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
4352         * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
4353         * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
4354         * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create): Likewise.
4355         * elf64-x86-64.c (elf64_x86_64_link_hash_table_create): Likewise.
4356         * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
4357         * linker.c (_bfd_generic_link_hash_table_create): Likewise.
4358         * m68klinux.c (linux_link_hash_table_create): Likewise.
4359         * sparclinux.c (linux_link_hash_table_create): Likewise.
4360         * sunos.c (sunos_link_hash_table_create): Likewise.
4361         * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
4362
4363         * targets.c: Add _bfd_link_hash_table_free to xvec.
4364
4365         * bfd-in2.h: Regenerate.
4366         * libbfd.h: Regenerate.
4367         * libcoff.h: Regenerate.
4368
4369 2002-04-04  Alan Modra  <amodra@bigpond.net.au>
4370
4371         * dep-in.sed: Cope with absolute paths.
4372         * Makefile.am (dep.sed): Subst TOPDIR, and not INCDIR.
4373         Run "make dep-am".
4374         * Makefile.in: Regenerate.
4375         * coff-arm.c: Fix copyright date.
4376         * cpu-h8300.c: Likewise.
4377         * cpu-i370.c: Likewise.
4378         * cpu-s390.c: Likewise.
4379         * cpu-mips.c: Likewise.
4380         * po/SRC-POTFILES.in: Regenerate.
4381
4382 2002-04-04  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4383
4384         * Makefile.am: Add elfxx-mips.c to the known backends.
4385         (elf32-mips.lo): remove dependency to coff/external.h.
4386         * Makefile.in: Regenerate.
4387         * configure.in: Add elfxx-mips.lo to all vectors using elf32-mips.lo
4388         Remove elf32-mips.lo from 64 bit vectors. Update dependencies
4389         accordingly.
4390         * configure: Regenerate.
4391         * elf-bfd.h: Move all MIPS ELF specific prototypes to elfxx-mips.h.
4392         (irix_compat_t): IRIX compatibility level, moved from elf32-mips.c.
4393         (elf_backend_mips_irix_compat, elf_backend_mips_rtype_to_howto): New
4394         MIPS specific backend functions.
4395         * elf32-mips.c: Moved most code to elfxx-mips.c.
4396         (mips_elf_hi16_reloc): Rename from _bfd_mips_elf_hi16_reloc and make
4397         static.
4398         (mips_elf_lo16_reloc): Likewise, was _bfd_mips_elf_lo16_reloc.
4399         (mips_elf_got16_reloc): Likewise, was _bfd_mips_elf_got16_reloc.
4400         (mips_elf_gprel32_reloc): Likewise, was _bfd_mips_elf_gprel32_reloc.
4401         (mips_elf32_rtype_to_howto): Rename from mips_rtype_to_howto. Changed
4402         interface to allow selection of the right REL or RELA howto table.
4403         (mips_elf32_object_p): Rename from _bfd_mips_elf_object_p and made
4404         static. Let it refuse n32 objects.
4405         (elf32_mips_grok_prstatus): Rename from _bfd_elf32_mips_grok_prstatus.
4406         (elf32_mips_grok_psinfo): Rename from _bfd_elf32_mips_grok_psinfo.
4407         (elf32_mips_discard_info): Rename from _bfd_elf32_mips_discard_info.
4408         (elf32_mips_ignore_discarded_relocs): Rename from
4409         _bfd_elf32_mips_ignore_discarded_relocs.
4410         (elf32_mips_write_section): Rename from _bfd_elf32_mips_write_section.
4411         (elf32_mips_irix_compat): New function, replaces IRIX_COMPAT.
4412         (elf_mips_howto_table_rela): Remove.
4413         * elf64-mips.c: Moved most code to elfxx-mips.c.
4414         (bfd_elf64_bfd_reloc_type_lookup): Make static.
4415         (mips_elf64_rtype_to_howto): New function.
4416         (mips_elf64_object_p): Likewise.
4417         (elf64_mips_irix_compat): Likewise.
4418         * elfxx-mips.c: New file containing common code merged together from
4419         elf32-mips.c and elf64-mips.c.
4420         * elfxx-mips.h: New file containing MIPS specific prototypes from
4421         elf-bfd.h.
4422         * elfxx-target.h: Add handling for elf_backend_mips_irix_compat and
4423         elf_backend_mips_rtype_to_howto.
4424
4425 2002-04-04  Alan Modra  <amodra@bigpond.net.au>
4426
4427         * srec.c (MAXCHUNK, Chunk): Revise comments.
4428         (srec_write_record): Correct buffer size.
4429         (srec_write_header): Do without intermediate buffer.
4430         (srec_write_section): Validate Chunk.
4431         (srec_write_terminator): Pass NULL instead of dummy buffer.
4432         (srec_write_symbols): Pass file and symbol names directly to
4433         bfd_bwrite so sprintf won't overflow buffer.
4434
4435 2002-04-03  Jakub Jelinek  <jakub@redhat.com>
4436
4437         * elf32-sparc.c (elf32_sparc_relocate_section): Don't emit dynamic
4438         PC relative relocs against hidden symbols.
4439         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
4440
4441 2002-04-03  Alan Modra  <amodra@bigpond.net.au>
4442
4443         * elf.c (_bfd_elf_make_section_from_shdr): When setting section
4444         LMAs, loop over segments until p_vaddr and p_memsz specify an
4445         extent enclosing the section.
4446
4447 2002-04-02  Nick Clifton  <nickc@cambridge.redhat.com>
4448
4449         * ihex.c (ihex_write_object_contents): Do not allow records to
4450         cross a 64K boundary - wrap if necessary.
4451
4452 2002-04-01  Nathan Williams  <nathanw@wasabisystems.com>
4453
4454         * elf.c (elfcore_netbsd_get_lwpid): Fix off-by-one error
4455         which caused the returned LWP ID to always be 0.
4456
4457 2002-04-01  Richard Henderson  <rth@redhat.com>
4458
4459         * elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
4460         (elf32_sparc_relocate_section): Use it to figure out when to
4461         initialize .got entries.
4462         * elf64-sparc.c: Similarly.
4463
4464 2002-03-28  Alan Modra  <amodra@bigpond.net.au>
4465
4466         * linker.c (link_action): Ignore duplicate warning syms.
4467         (_bfd_generic_link_write_global_symbol): Follow warning symbol link.
4468         * elflink.h (elf_adjust_dynstr_offsets): Likewise.
4469         (elf_adjust_dynamic_symbol): Likewise.
4470         (elf_export_symbol): Likewise.
4471         (elf_link_find_version_dependencies): Likewise.
4472         (elf_link_assign_sym_version): Likewise.
4473         (elf_link_sec_merge_syms): Likewise.
4474         (elf_link_output_extsym): Likewise.
4475         (elf_gc_sweep_symbol): Likewise.
4476         (elf_gc_propagate_vtable_entries_used): Likewise.
4477         (elf_gc_smash_unused_vtentry_relocs): Likewise.
4478         (elf_gc_allocate_got_offsets): Likewise.
4479         (elf_collect_hash_codes): Likewise.
4480         * elflink.c (elf_link_renumber_hash_table_dynsyms): Likewise.
4481         * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
4482         (elf_hppa_remark_useless_dynamic_symbols): Likewise.
4483         * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
4484         * elf32-arm.h (elf32_arm_discard_copies): Likewise.
4485         * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Likewise.
4486         (elf_cris_discard_excess_dso_dynamics): Likewise.
4487         * elf32-hppa.c (clobber_millicode_symbols): Likewise.
4488         (mark_PIC_calls): Likewise.
4489         (allocate_plt_static): Likewise.
4490         (allocate_dynrelocs): Likewise.
4491         (readonly_dynrelocs): Likewise.
4492         * elf32-i386.c (allocate_dynrelocs): Likewise.
4493         (readonly_dynrelocs): Likewise.
4494         * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
4495         * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
4496         * elf32-mips.c (mips_elf_output_extsym): Likewise.
4497         (mips_elf_sort_hash_table_f): Likewise.
4498         (mips_elf_check_mips16_stubs): Likewise.
4499         * elf32-s390.c (allocate_dynrelocs): Likewise.
4500         (readonly_dynrelocs): Likewise.
4501         * elf32-sh.c (sh_elf_discard_copies): Likewise.
4502         * elf32-xstormy16.c (xstormy16_relax_plt_check): Likewise.
4503         (xstormy16_relax_plt_realloc): Likewise.
4504         * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
4505         (elf64_alpha_output_extsym): Likewise.
4506         * elf64-hppa.c (elf64_hppa_mark_exported_functions): Likewise.
4507         * elf64-mips.c (mips_elf64_sort_hash_table_f): Likewise.
4508         (mips_elf64_check_mips16_stubs): Likewise.
4509         (mips_elf64_output_extsym): Likewise.
4510         * elf64-ppc.c (func_desc_adjust): Likewise.
4511         (allocate_dynrelocs): Likewise.
4512         (readonly_dynrelocs): Likewise.
4513         * elf64-s390.c (allocate_dynrelocs): Likewise.
4514         (readonly_dynrelocs): Likewise.
4515         * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
4516         * elf64-x86-64.c (allocate_dynrelocs): Likewise.
4517         (readonly_dynrelocs): Likewise.
4518         * elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise.
4519         * aoutx.h (aout_link_write_other_symbol): Likewise.
4520         * cofflink.c (_bfd_coff_write_task_globals): Likewise.
4521         (_bfd_coff_write_global_sym): Likewise.
4522         * i386linux.c (linux_tally_symbols): Likewise.
4523         * m68klinux.c (linux_tally_symbols): Likewise.
4524         * sparclinux.c (linux_tally_symbols): Likewise.
4525         * pdp11.c (aout_link_write_other_symbol): Likewise.
4526         * sunos.c (sunos_scan_dynamic_symbol): Likewise.
4527         * xcofflink.c (xcoff_build_ldsyms): Likewise.
4528         (xcoff_write_global_symbol): Likewise.
4529
4530         * cofflink.c (_bfd_coff_final_link): Formatting.
4531         * cpu-mips.c (mips_compatible): Make static, prototype.
4532         * elf32-i386.c (elf_i386_check_relocs): Formatting.
4533         * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
4534         * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
4535         * elf64-mips.c (mips_elf64_sort_hash_table): Likewise.
4536         (mips_elf64_final_link): Likewise.
4537         * elflink.h (elf_link_find_version_dependencies): Remove duplicate
4538         prototype.
4539
4540 2002-03-27  Nick Clifton  <nickc@cambridge.redhat.com>
4541
4542         * coff-arm.c (SWAP_IN_RELOC_OFFSET): Define.
4543         (SWAP_OUT_RELOC_OFFSET): Define.
4544
4545 2002-03-27  Gregory Steuck <greg@nest.cx>
4546
4547         * elf.c (_bfd_elf_get_symtab_upper_bound): Leave space for
4548         terminating NULL if empty symbol table.
4549         (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
4550
4551 2002-03-26  H.J. Lu  (hjl@gnu.org)
4552
4553         * elflink.h (elf_link_input_bfd): Revert the last change since
4554         the gcc exception handling isn't fixed yet.
4555
4556 2002-03-26  H.J. Lu  (hjl@gnu.org)
4557
4558         * elflink.h (elf_link_input_bfd): Complain about relocations
4559         against local symbols in discarded sections.
4560
4561 2002-03-26  Alan Modra  <amodra@bigpond.net.au>
4562
4563         * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
4564
4565 2002-03-23  Alan Modra  <amodra@bigpond.net.au>
4566
4567         * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
4568         section file offset for !SEC_LOAD sections.
4569
4570 2002-03-21  Richard Earnshaw  <rearnsha@arm.com>
4571
4572         * elf32-arm.h (elf32_arm_final_link_relocate <case R_ARM_GOTOFF>,
4573         <case R_ARM_GOT>): Handle relocations to Thumb functions.
4574
4575 2002-03-21  Alan Modra  <amodra@bigpond.net.au>
4576
4577         * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Prototype.
4578         Whitespace changes.
4579         * archive.c: Update copyright date.
4580         * bfd-in2.h: Regenerate.
4581         * libbfd.h: Regenerate.
4582         * Makefile.am: Run "make dep-am"
4583         * Makefile.in: Regenerate.
4584         * po/SRC-POTFILES.in: Regenerate.
4585
4586 2002-03-20  Daniel Jacobowitz  <drow@mvista.com>
4587
4588         * dwarf2.c (struct funcinfo): Move up.
4589         (lookup_address_in_function_table): New argument function_ptr.
4590         Set it.
4591         (lookup_address_in_line_table): New argument function.  If function
4592         is non-NULL, use it to handle ``addr'' before the first line note of
4593         the function.
4594         (comp_unit_find_nearest_line): Update and swap calls to
4595         lookup_address_in_function_table and lookup_address_in_line_table.
4596         * syms.c (_bfd_stab_section_find_nearest_line): Use the first
4597         N_SLINE encountered if we see an N_FUN before any N_SLINE.
4598
4599 2002-03-20  Tom Rix  <trix@redhat.com>
4600
4601         * coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from
4602         _bfd_xcoff_generic_stat_arch_elt.  Fix format check.
4603         * coff64-rs6000.c :  Use _bfd_xcoff_stat_arch_elt.
4604
4605 2002-03-19  Tom Rix  <trix@redhat.com>
4606
4607         * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through all
4608         dynamic objects in archives.
4609
4610 2002-03-19  Hans-Peter Nilsson  <hp@bitrange.com>
4611
4612         * elflink.h (NAME(bfd_elf,record_link_assignment)): Don't set
4613         STT_NOTYPE symbols to STT_OBJECT.
4614
4615 2002-03-18  Jan Hubicka  <jh@suse.cz>
4616
4617         * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
4618
4619 2002-03-18  Tom Rix  <trix@redhat.com>
4620
4621         * aix5ppc.core.c : New file for AIX 5 64 bit core support.
4622         * bfd-in.h : Add bfd_xcoff_ar_archive_set_magic declaration.
4623         * coff-rs6000 (do_pad) : New function for archive padding.
4624         (do_copy) : New function for object file copying in archives.
4625         (do_shared_object_padding) : New function for padding shared
4626         objects to their text section alignment in archives.
4627         (bfd_xcoff_ar_achive_set_magic) : Stub.
4628         (xcoff_write_armap_big) : Use do_copy and do_pad.
4629         (xcoff_write_archive_contents_big) : Use do_shared_object_padding,
4630         do_copy and do_pad.
4631         * coff64-rs6000.c (xcoff64_write_ojbect_contents) : Use
4632         bfd_xcoff_magic_number.
4633         (xcoff64_bad_format_hook) : New function for _bfd_bad_format_hook
4634         fop.
4635         (xcoff_backend_data_r) : Use xcoff64_bad_format_hook.
4636         (bfd_xcoff_aix5_backend_data) : New Aix 5 backend data.
4637         (aix5coff64_vec) : New Aix 5 target aix5coff64-rs6000.
4638         * rs6000-core.c : Update copyright date.
4639         * xcofflink.c (bfd_xcoff_size_dynamic_sections): Check for NULL
4640         csectpp.
4641         * coffcode.h (coff_new_section_hook) : Use new accessor macros.
4642         (coff_set_arch_mach_hook) : Add Aix 5 U64_TOCMAGIC magic #.
4643         (coff_set_flags) : Use bfd_xcoff_magic_number.
4644         * libxcoff.h (bfd_xcoff_is_xcoff64): Add U64_TOCMAGIC.
4645         * configure.in : Add powerpc-*-aix5 and rs6000-*-aix5 support.
4646         * Makefile.am : Same.
4647         * config.bfd : Same.
4648         * targets.c : Same.
4649         * configure : Regnerate.
4650         * Makefile.in : Same.
4651         * bfd-in2.h : Same.
4652
4653 2002-03-18  Nick Clifton  <nickc@cambridge.redhat.com>
4654
4655         * po/fr.po: Updated version.
4656
4657 2002-03-18  Alan Modra  <amodra@bigpond.net.au>
4658
4659         * libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success.
4660         * libbfd.h: Regenerate.
4661         * archive.c (coff_write_armap): Pass on failures from
4662         bfd_write_bigendian_4byte_int.
4663
4664 2002-03-14  H.J. Lu <hjl@gnu.org>
4665
4666         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the BFD
4667         error to bfd_error_nonrepresentable_section for reinit_array
4668         section in DSO.
4669
4670 2002-03-14  Nick Clifton  <nickc@cambridge.redhat.com>
4671
4672         * coffcode.h (coff_slurp_symbol_table): When adding BSF_WEAK flag,
4673         OR it in rather than replacing previously selected flags.
4674
4675         * elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15.
4676         (TARGET_LITTLE_SYM): Set ar_max_namelen to 15.
4677
4678 2002-03-14  Alan Modra  <amodra@bigpond.net.au>
4679
4680         * cpu-mips.c (mips_compatible): New.  Don't check bits_per_word.
4681         (N): Use the above.
4682         * elflink.h (elf_bfd_final_link): Revert last change.  Instead,
4683         ensure reloc size matches before calling elf_link_input_bfd.
4684         Add an assert to check reloc size when counting output relocs.
4685
4686 2002-03-14  Nick Clifton  <nickc@cambridge.redhat.com>
4687
4688         * mmo.c (mmo_get_loc): Return NULL rather than false.
4689
4690 2002-03-13  Nick Clifton  <nickc@cambridge.redhat.com>
4691
4692         * po/fr.po: Updated version.
4693
4694 2002-03-13  Alan Modra  <amodra@bigpond.net.au>
4695
4696         * archures.c (bfd_default_compatible): Test bits_per_word.
4697         * cpu-i386.c (i386_compatible): Remove.  Replace occurrences with
4698         bfd_default_compatible.
4699         * cpu-i370.c (i370_compatible): Likewise.
4700         * cpu-sparc.c (sparc_compatible): Likewise.
4701         * cpu-h8300.c (compatible): Test in->arch == out->arch.
4702
4703         * elflink.h: Formatting fixes.
4704         (elf_link_output_extsym): Merge undefined and undef weak cases.
4705
4706         * elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd
4707         when word size of input matches output word size.
4708
4709 2002-03-12  Andreas Jaeger  <aj@suse.de>
4710
4711         * cpu-i386.c (i386_compatible): New.  Use it instead of
4712         bfd_default_compatible.
4713
4714 2002-03-07  H.J. Lu  (hjl@gnu.org)
4715
4716         * coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type
4717         as the type for bfd_reloc_val.
4718
4719 2002-03-05  John David Anglin  <dave@hiauly1.hia.nrc.ca>
4720
4721         * elf-hppa.h (elf_hppa_is_dynamic_loader_symbol): New function.
4722         (elf_hppa_relocate_section): Ignore undefined dynamic loader symbols.
4723         (elf_hppa_final_link_relocate): Correct relocations for indirect
4724         references to local data through the DLT.  Fix .opd creation for
4725         local symbols using R_PARISC_LTOFF_FPTR32 and R_PARISC_FPTR64
4726         relocations.  Use e_lsel selector for R_PARISC_DLTIND21L,
4727         R_PARISC_LTOFF_FPTR21L and R_PARISC_LTOFF_TP21L as per
4728         "Processor-Specific ELF for PA_RISC, Version 1.43" document.
4729         Similarly, use e_rsel for DLT and LTOFF 'R' relocations.
4730         * elf32-hppa.c (final_link_relocate): Revise relocation selectors
4731         as per "Processor-Specific ELF for PA_RISC, Version 1.43" document.
4732
4733 2002-03-05  Jakub Jelinek  <jakub@redhat.com>
4734
4735         * merge.c (_bfd_merge_sections): Don't segfault if there
4736         is nothing to merge due to GC.
4737
4738 2002-03-05  Alan Modra  <amodra@bigpond.net.au>
4739
4740         * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep
4741         symbols that have been forced local.
4742
4743         * elflink.h (elf_bfd_final_link): Call elf_link_output_extsym
4744         to output forced local syms for non-shared link.
4745         (elf_link_output_extsym): Tweak condition for calling backend
4746         adjust_dynamic_symbol so that previous behaviour is kept.
4747         Whitespace changes throughout file.
4748
4749 2002-03-04  H.J. Lu <hjl@gnu.org>
4750
4751         * elf.c (bfd_section_from_shdr): Handle special sections,
4752         .init_array, .fini_array and .preinit_array.
4753         (elf_fake_sections): Likewise.
4754
4755         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Create the
4756         DT entry only if the section is in output for .init_array,
4757         .fini_array and .preinit_array. Complain about .preinit_array
4758         section in DSO.
4759         (elf_bfd_final_link): Warn zero size for .init_array,
4760         .fini_array and .preinit_array sections.
4761
4762         * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Remove
4763         SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY.
4764         (elfNN_ia64_fake_sections): Remove .init_array, .fini_array and
4765         .preinit_array.
4766
4767 2002-03-04  Alan Modra  <amodra@bigpond.net.au>
4768
4769         * configure.in (WIN32LIBADD): Don't eval PICFLAG assignment.
4770         * configure: Regenerate.
4771
4772 2002-03-02  Tom Rix  <trix@redhat.com>
4773
4774         * coff64-rs6000.c (xcoff64_howto_table): Replace howto types with
4775         symbolic equiv.
4776         * coff-rs6000.c (xcoff_howto_table): Same.
4777
4778 2002-03-01  David Mosberger  <davidm@hpl.hp.com>
4779
4780         * elflink.h (size_dynamic_sections): If section named
4781         ".preinit_array" exists, create DT_PREINIT_ARRAY and
4782         DT_PREINIT_ARRAYSZ entries in dynamic table.  Analogously for
4783         ".init_array" and ".fini_array".
4784         (elf_bfd_final_link): Handle DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ,
4785         DT_FINI_ARRAYSZ, DT_PREINIT_ARRAY, DT_INIT_ARRAY, and
4786         DT_FINI_ARRAY.
4787
4788 2002-02-26  Andrew Macleod  <amacleod@cygnus.com>
4789
4790         * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local
4791         dynsyms.
4792
4793 2002-02-25  Alan Modra  <amodra@bigpond.net.au>
4794
4795         * elf64-hppa.h: Update copyright date.
4796
4797         * elf64-ppc.c (ppc64_elf_check_relocs): Warning fix.
4798         (ppc64_elf_relocate_section): Don't generate power4 style branch
4799         hints for *_BRTAKEN and *_BRNTAKEN relocs.
4800
4801 2002-02-22  Jakub Jelinek  <jakub@redhat.com>
4802
4803         * elf64-sh64.c (sh_elf64_relocate_section): Fix a typo from my
4804         last patch.
4805         * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
4806
4807 2002-02-21  Andreas Jaeger  <aj@suse.de>
4808
4809         * elf64-x86-64.c: Major rework that introduces all recent changes
4810         to the x86-64 backend.  Get a closer match to elf32-i386.
4811         (struct elf64_x86_64_dyn_relocs): Rename from
4812         elf64_x86_64_pcrel_relocs_copied, add additional fields.  Change
4813         all users.
4814         (struct elf64_x86_64_link_hash_table): Add short cuts to some
4815         sections.
4816         (link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc,
4817         remove casts, initialize new hash members.
4818         (create_got_section): New.
4819         (elf64_x86_64_create_dynamic_sections): New.
4820         (elf64_x86_64_copy_indirect_symbol): New.
4821         (elf64_x86_64_check_relocs): Don't allocate space for dynamic
4822         relocs, .got or .relgot here but do it in allocate_dynrelocs.
4823         Reference count possible .plt and .got entries.  Don't test input
4824         section SEC_READONLY here to try to avoid copy relocs, and keep
4825         dyn_relocs regardless of ELF_LINK_NON_GOT_REF.  Don't set
4826         DF_TEXTREL here.  Delay setting of variables until needed.  Cache
4827         pointer to "sreloc" section in elf_section_data. Tweak condition
4828         under which .got created.  Report files with bad relocation
4829         section names.
4830         (elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
4831         Reference count possible .plt entries.  Don't deallocate .got and
4832         .relgot space here.
4833         (elf64_x86_64_adjust_dynamic_symbol): Handle nocopyreloc.  Don't
4834         do copy reloc processing for weakdefs.  Remove redundant casts and
4835         aborts.  Delay setting of vars until needed.  Move creation of
4836         dynamic symbols and allocation of .plt and .rela.plt to
4837         allocate_dynrelocs.  Replace BFD_ASSERT with abort.
4838         (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
4839         (allocate_dynrelocs): New.
4840         (readonly_dynrelocs): New.
4841         (elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs.
4842         Allocate space for dyn relocs.  Replace BFD_ASSERT with abort.
4843         Zero out the dynamic allocated content space.
4844         (elf64_x86_64_discard_copies): Removed.
4845         (elf64_x86_64_relocate_section): Make use of dynamic section
4846         short-cuts.  Localise vars, and delay setting.  Better error
4847         reporting, replace BFD_ASSERT with abort.  Check
4848         ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the
4849         regular object file and tread the weak definition as the normal
4850         one.  Don't discard relocs for undefweak or undefined symbols and
4851         check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy
4852         relocs.
4853         (elf64_x86_64_finish_dynamic_symbol): Don't copy relocs for
4854         symbols that have been forced local.  Use same test to decide if
4855         we can use a relative reloc for got as relocate_section.  Expand
4856         SHN_UNDEF comment.  Move expressions out of function calls.
4857         Replace BFD_ASSERT with abort.
4858         (bfd_elf64_bfd_final_link): Removed.
4859         (elf_backend_copy_indirect_symbol): Define.
4860
4861 2002-02-20  Tom Rix  <trix@redhat.com>
4862
4863         * coff-rs6000.c (xcoff_howto_table): Add 16 bit R_BA.
4864         (_bfd_xcoff_reloc_type_lookup): Use it.
4865         * coff64-rs6000.c (xcoff64_howto_table): Same.
4866         (xcoff64_reloc_type_lookup): Same.
4867
4868 2002-02-20  Peter Schauer  <pes@regent.e-technik.tu-muenchen.de>
4869
4870         * osf-core.c (osf_core_vec):  OSF/1 (Digital Unix) core files are
4871         little endian.
4872
4873 2002-02-19  Martin Schwidefsky  <schwidefsky@de.ibm.com>
4874
4875         * archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31.
4876         (bfd_mach_s390_esame): Rename to bfd_mach_s390_64.
4877         * bfd-in2.h: Regenerate.
4878         * cpu-s390.c (arch_info_struct): Use renamed architecture defines.
4879         Replace architecture name "s390" with "s390:31-bit" and "s390:esame"
4880         with "s390:64-bit".
4881         * elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations.
4882         (elf_s390_reloc_type_lookup): Likewise.
4883         (elf_s390_check_relocs): Likewise.
4884         (elf_s390_gc_sweep_hook): Likewise.
4885         (elf_s390_relocate_section): Likewise.
4886         (elf_s390_object_p): Use renamed architecture define.
4887         * elf64-s390.c (elf_s390_object_p): Use renamed architecture define.
4888
4889 2002-02-19  Frank Ch. Eigler  <fche@redhat.com>
4890
4891         * syms.c (stt[]): Sorted.  Added .init/.fini -> "t" mapping.
4892
4893 2002-02-19  Jakub Jelinek  <jakub@redhat.com>
4894
4895         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
4896         absptr -> pcrel optimization for shared libs.
4897         Only create minimal .eh_frame_hdr if absptr FDE encoding in shared
4898         library cannot be converted to pcrel.
4899         (_bfd_elf_eh_frame_section_offset): Return -2 if making absptr
4900         relative.
4901         * elf32-i386.c (elf_i386_relocate_section): If
4902         _bfd_elf_section_offset returned -2, skip, but make sure the
4903         relocation is installed.
4904         * elf32-arm.h (elf32_arm_final_link_relocate): Likewise.
4905         * elf32-cris.c (cris_elf_relocate_section): Likewise.
4906         * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
4907         * elf32-i370.c (i370_elf_relocate_section): Likewise.
4908         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
4909         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
4910         * elf32-s390.c (elf_s390_relocate_section): Likewise.
4911         * elf32-sh.c (sh_elf_relocate_section): Likewise.
4912         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
4913         * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
4914         * elf64-s390.c (elf_s390_relocate_section): Likewise.
4915         * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
4916         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
4917         * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
4918         * elf64-alpha.c (elf64_alpha_relocate_section): Handle
4919         _bfd_elf_section_offset returning -2 the same way as -1.
4920         * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
4921         * elf32-mips.c (mips_elf_create_dynamic_relocation): Add FIXME
4922         and BFD_ASSERT.
4923         * elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise.
4924
4925 2002-02-18  Tom Rix  <trix@redhat.com>
4926
4927         * xcofflink.c (bfd_xcoff_link_gernate_rtinit): Add -brtl support.
4928         (bfd_xcoff_size_dynamic_sections): Same.
4929         * bfd-in.h (bfd_xcoff_link_generate_rtinit): Same.
4930         (bfd_xcoff_size_dynamic_sections): Same.
4931         * coff-rs6000.c (xcoff_generate_rtinit): Same.
4932         * coff-rs646000.c (xcoff64_generate_rtinit): Same.
4933         * libxcoff.h (struct xcoff_backend_data_rec): Same.
4934         * xcofflink.c (xcoff_build_ldsyms, xcoff_link_add_symbols): Clean.
4935         * bfd-in2.h: Regenerate.
4936
4937 2002-02-18  Alan Modra  <amodra@bigpond.net.au>
4938
4939         * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define.
4940         (struct ppc_link_hash_table): Add sfpr.
4941         (ppc64_elf_link_hash_table_create): Init it.
4942         (ppc64_elf_create_dynamic_sections): Split creation of .stub and
4943         .glink out to..
4944         (create_linkage_sections): ..here.  Make .sfpr too.
4945         (ppc64_elf_check_relocs): Call create_linkage_sections, and set
4946         dynobj early.
4947         (MIN_SAVE_FPR, MAX_SAVE_FPR): Define.
4948         (ppc64_elf_func_desc_adjust): Look for missing ._savef* and
4949         ._restf* functions, and create as needed.
4950         (func_desc_adjust): Only force_local for shared libs.
4951
4952 2002-02-18  David O'Brien  <obrien@FreeBSD.org>
4953
4954         * configure.in: Bump version number post 2.12 branching.
4955         * configure: Regenerate.
4956
4957 2002-02-17  Hans-Peter Nilsson  <hp@bitrange.com>
4958
4959         * mmo.c: Correct and improve comments.
4960         (mmo_write_chunk): Store trailing byte in bfd buffer; don't
4961         zero-pad.  Use input to fill up non-empty bfd buffer.
4962         (mmo_flush_chunk): New function.
4963         (mmo_write_loc_chunk): Add parameter last_vmap, all callers
4964         changed.  Don't emit location specifier if VMA is same as
4965         *LAST_VMAP after omitting leading zero contents.  Call
4966         mmo_flush_chunk before emitting location specifier.
4967         (mmo_write_loc_chunk_list): Call mmo_flush_chunk when finished
4968         with mmo_write_loc_chunk calls.
4969         (mmo_internal_write_section): Call mmo_flush_chunk after
4970         mmo_write_chunk.
4971         (mmo_write_symbols_and_terminator): Move :Main to first position
4972         in symbol array.  Add faked one if it does not exist if there are
4973         other symbols.  Don't add it if there are no symbols at all.  Move
4974         out test for value of :Main from symbol loop.  Rename table
4975         fakemain to maintable and variable mainsym to fakemain.
4976
4977 2002-02-15  Richard Henderson  <rth@redhat.com>
4978
4979         * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target
4980         section with no got matches any got.  Simplify error generaion.
4981
4982 2002-02-15  Alan Modra  <amodra@bigpond.net.au>
4983
4984         Support arbitrary length fill patterns.
4985         * linker.c (bfd_new_link_order): Zero all fields with bfd_zalloc.
4986         (_bfd_default_link_order): Remove bfd_fill_link_order code.
4987         Call default_data_link_order.
4988         (default_fill_link_order): Delete.
4989         (default_data_link_order): New function.
4990         * elf32-mips.c (_bfd_mips_elf_final_link): Replace occurrences
4991         of bfd_fill_link_order with bfd_data_link_order.
4992         * elf64-alpha.c (elf64_alpha_final_link): Likewise.
4993         * elf64-mips.c (mips_elf64_final_link): Likewise.
4994
4995         * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value.
4996         Correct value returned in "end" for "0x<non-hex>".
4997
4998 2002-02-14  Nick Clifton  <nickc@cambridge.redhat.com>
4999
5000         * cpu-arm.c (processors): Replace 'arch' field with 'mach'.
5001         (scan): Test against 'mach' field in info structure.
5002
5003 2002-02-14  Alan Modra  <amodra@bigpond.net.au>
5004
5005         * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
5006
5007 2002-02-14  Matt Fredette  <fredette@netbsd.org>
5008
5009         * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
5010         EF_M68000.
5011
5012 2002-02-13  Nick Clifton  <nickc@cambridge.redhat.com>
5013
5014         * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on
5015         non-zero physical addresses when adjusting the LMAs of new
5016         sections.
5017
5018 2002-02-12  John David Anglin  <dave@hiauly1.hia.nrc.ca>
5019
5020         * elf-hppa.h (elf_hppa_reloc_final_type): New function stripped
5021         from _bfd_elf_hppa_gen_reloc_type.
5022         (_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype.
5023         * elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype.
5024         * elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h.
5025         * elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype.
5026
5027 2002-02-12  Alexandre Oliva  <aoliva@redhat.com>
5028
5029         * elf-m10300.c (mn10300_elf_relax_section): Skip section before
5030         loading its contents if there's nothing to do in it.
5031
5032 2002-02-12  Alan Modra  <amodra@bigpond.net.au>
5033
5034         * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for crossing
5035         64k boundary.
5036
5037         * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Add dynamic
5038         DT_PPC64_OPD and DT_PPC64_OPDSZ tags.
5039         (ppc64_elf_finish_dynamic_sections): Set values for them.
5040
5041 2002-02-11  Michael Snyder  <msnyder@redhat.com>
5042
5043         * elf-bfd.h (elfcore_write_lwpstatus): Add prototype.
5044         * elf.c (elfcore_grok_pstatus): Add prototype.
5045         (elfcore_grok_lwpstatus): Add prototype.
5046         (elfcore_write_lwpstatus): New function.
5047         (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy.
5048
5049 2002-02-11  Alexandre Oliva  <aoliva@redhat.com>
5050
5051         * elf32-sh.c: Added missing prototypes.
5052         * elf32-sh64.c: Likewise.
5053         (sh_elf_align_loads): Mark unused args as such.
5054         * elf64-sh64.c: Added missing prototypes.
5055         (struct elf_sh64_link_hash_entry): Fix typo.
5056         (sh_elf64_relocate_section): Fix info argument passed to
5057         _bfd_elf_section_offset.
5058
5059 2002-02-11  Alan Modra  <amodra@bigpond.net.au>
5060
5061         * Makefile.am: "make dep-am".
5062         * Makefile.in: Regenerate.
5063         * aclocal.m4: Regenerate.
5064         * config.in: Regenerate.
5065         * configure: Regenerate.
5066
5067 2002-02-10  Daniel Jacobowitz  <drow@mvista.com>
5068
5069         * coff-rs6000.c (xcoff_generate_rtinit): Silence uninitialized
5070         variable warnings.
5071         * elf32-sh.c (sh_elf_relax_section): Silence signed/unsigned
5072         comparison warning.
5073         * trad-core.c (trad_unix_core_file_p): Silence pointer/integer
5074         cast warnings for the common case.
5075
5076 2002-02-10  Hans-Peter Nilsson  <hp@bitrange.com>
5077
5078         * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64
5079         vectors.
5080         (sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64
5081         vectors.
5082
5083 2002-02-09  Richard Henderson  <rth@redhat.com>
5084
5085         * elf64-alpha.c (elf64_alpha_howto): Add R_ALPHA_BRSGP.
5086         (elf64_alpha_reloc_map, elf64_alpha_check_relocs): Likewise.
5087         (elf64_alpha_relocate_section): Likewise.
5088         * reloc.c (BFD_RELOC_ALPHA_BRSGP): New.
5089         * bfd-in2.h, libbfd.h: Rebuild.
5090
5091 2002-02-09  Hans-Peter Nilsson  <hp@bitrange.com>
5092
5093         * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs): Check
5094         that base-plus-offset reloc accounting is consistent.
5095         (mmix_elf_relax_section): Keep base-plus-offset reloc accounting
5096         up to date for undefined symbols.
5097
5098 2002-02-08  Eric Christopher  <echristo@redhat.com>
5099
5100         From Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
5101
5102         * elf32-mips.c (_bfd_mips_elf_fake_sections): Don't create .rela
5103         sections for the O32 ABI.
5104
5105 2002-02-08  Chris Demetriou  <cgd@broadcom.com>
5106
5107         * elf32-arm.h: Fix formatting of _("...").
5108         * elf32-d10v.c: Likewise.
5109         * elf32-m68k.c: Likewise.
5110         * elf32-mips.c: Likewise.
5111
5112 2002-02-08  Ivan Guzvinec <ivang@opencores.org>
5113
5114         * coff-or32.c: Fix compile time warning messages.
5115
5116 2002-02-08  Alexandre Oliva  <aoliva@redhat.com>
5117
5118         Contribute sh64-elf.
5119         2002-01-23  Alexandre Oliva  <aoliva@redhat.com>
5120         * reloc.c (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
5121         R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
5122         R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
5123         R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
5124         R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
5125         R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
5126         R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
5127         R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, R_SH_GOTPLT10BY8,
5128         R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, R_SH_RELATIVE64):
5129         New relocs.
5130         * libbfd.h, bfd-in2.h: Rebuilt.
5131         * elf32-sh.c (sh_elf_howto_table): Define new relocs.
5132         (sh_reloc_map): Map them.
5133         (PLT_ENTRY_SIZE, elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
5134         elf_sh_plt_entry_be, elf_sh_plt_entry_le, elf_sh_pic_plt_entry_be,
5135         elf_sh_pic_plt_entry_le, elf_sh_plt0_entry, elf_sh_plt_entry,
5136         elf_sh_pic_plt_entry, elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
5137         elf_sh_plt0_gotplt_offset, elf_sh_plt_temp_offset,
5138         elf_sh_plt_symbol_offset, elf_sh_plt_reloc_offset,
5139         movi_shori_putval) [INCLUDE_SHMEDIA]: New.
5140         (elf_sh_link_hash_entry) [INCLUDE_SHMEDIA]: Add
5141         datalabel_got_offset.
5142         (sh_elf_link_hash_newfunc): Initialize it.
5143         (sh_elf_relocate_section): Augment the scope of
5144         seen_stt_datalabel.  Introduce GOTPLT support.  Extend GOTPC, PLT,
5145         GOT and GOTOFF handling to new SHmedia relocation types.  Support
5146         GOT_BIAS.
5147         (sh_elf_check_relocs): Likewise.
5148         (sh_elf_finish_dynamic_symbol) [TARGET_SHMEDIA]: Set up values in
5149         PLT entries using movi_shori_putval.  Support GOT_BIAS.
5150         (sh_elf_finish_dynamic_sections): Likewise.
5151         * elf32-sh64.c (shmedia_prepare_reloc): Do not add addend to
5152         relocation, it's now done by the caller.
5153         (GOT_BIAS): New.
5154         * elf64-sh64.c (GOT_BIAS, PLT_ENTRY_SIZE, elf_sh64_sizeof_plt,
5155         elf_sh64_plt_plt0_offset, elf_sh64_plt0_gotplt_offset,
5156         elf_sh64_plt_temp_offset, elf_sh64_plt_symbol_offset,
5157         elf_sh64_plt_reloc_offset, ELF_DYNAMIC_INTERPRETER,
5158         elf_sh64_pcrel_relocs_copied, elf_sh64_link_hash_entry,
5159         elf_sh64_link_hash_table, sh64_elf64_link_hash_traverse,
5160         sh64_elf64_hash_table): New.
5161         (sh_elf64_howto_table): Introduce new relocs.
5162         (sh_elf64_info_to_howto): Accept new PIC relocs.
5163         (sh_elf64_relocate_section): Augment the scope of
5164         seen_stt_datalabel.  Support new PIC relocs.
5165         (sh_elf64_check_relocs): Support new PIC relocs.
5166         (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le,
5167         elf_sh64_plt_entry_be, elf_sh64_plt_entry_le,
5168         elf_sh64_pic_plt_entry_be, elf_sh64_pic_plt_entry_le,
5169         elf_sh64_plt0_entry, elf_sh64_plt_entry, elf_sh64_pic_plt_entry,
5170         sh64_elf64_link_hash_newfunc, sh64_elf64_link_hash_table_create,
5171         movi_shori_putval, movi_3shori_putval,
5172         sh64_elf64_create_dynamic_sections,
5173         sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies,
5174         sh64_elf64_size_dynamic_sections,
5175         sh64_elf64_finish_dynamic_symbol,
5176         sh64_elf64_finish_dynamic_sections): New.
5177         (elf_backend_create_dynamic-sections,
5178         bfd_elf64_bfd_link_hash_table_create,
5179         elf_backend_adjust_dynamic_symbol,
5180         elf_backend_size_dynamic_sections,
5181         elf_backend_finish_dynamic_symbol,
5182         elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
5183         elf_backend_plt_readonly, elf_backend_want_plt_sym,
5184         elf_backend_got_header_size, elf_backend_plt_header_size):
5185         Define.
5186         2001-05-16  Alexandre Oliva  <aoliva@redhat.com>
5187         * elf32-sh.c: Renumbered and renamed some SH5 relocations to
5188         match official numbers and names; moved unmaching ones to the
5189         range 0xf2-0xff.
5190         * elf32-sh64.c, elf64-sh64.c: Likewise.
5191         2001-03-12  DJ Delorie  <dj@redhat.com>
5192         * elf32-sh.c (sh_elf_relax_section): Don't relax SHmedia
5193         sections.
5194         2001-03-12  DJ Delorie  <dj@redhat.com>
5195         * elf32-sh64.c (shmedia_prepare_reloc): Validate relocs that must
5196         be aligned.
5197         * elf64-sh64.c (sh_elf64_relocate_section): Ditto.
5198         2001-01-14  Hans-Peter Nilsson  <hpn@cygnus.com>
5199         * elf32-sh64.c (bfd_elf32_bfd_copy_private_section_data): Define.
5200         (sh64_elf_fake_sections): Set type to SHT_SH5_CR_SORTED for a
5201         .cranges section with SEC_SORT_ENTRIES set.
5202         (sh64_backend_section_from_shdr): Set SEC_SORT_ENTRIES on an
5203         incoming sorted .cranges section.
5204         (sh64_bfd_elf_copy_private_section_data): New.
5205         (sh64_elf_final_write_processing): Only sort .cranges and modify
5206         start address if called by linker.
5207         2001-01-08  Ben Elliston  <bje@redhat.com>
5208         * elf32-sh64.c (sh64_elf_final_write_processing): Activate
5209         Hans-Peter Nilsson's set bit 0 patch from       2001-01-06.
5210         * elf64-sh64.c (sh64_elf64_final_write_processing): Ditto.
5211         2001-01-06  Hans-Peter Nilsson  <hpn@cygnus.com>
5212         * elf64-sh64.c (sh_elf64_howto_table): No open brace at start of
5213         line.  Add comments before all entries.
5214         <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct and clarify describing
5215         comment.
5216         (sh_elf64_reloc): Correct head comment.
5217         (sh_elf64_relocate_section): Correct spacing.
5218         <relocating for a local symbol>: Do not honour STO_SH5_ISA32;
5219         instead call reloc_dangerous callback.
5220         <case R_SH_SHMEDIA_CODE>: New case.
5221         (sh_elf64_gc_mark_hook): Correct spacing.
5222         (sh_elf64_check_relocs): Ditto.
5223         * elf32-sh64.c (shmedia_prepare_reloc) <case R_SH_SHMEDIA_CODE>:
5224         New case.
5225         * elf32-sh.c: Correct #endif comments for #ifndef-wrapped
5226         functions.
5227         (sh_elf_howto_table) <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct,
5228         clarify describing comment.  Add comments before all entries.
5229         (sh_elf_relocate_section) <relocating for a local symbol>: Do not
5230         honour STO_SH5_ISA32; instead call reloc_dangerous callback.
5231         2001-01-06  Hans-Peter Nilsson  <hpn@cygnus.com>
5232         Sort .cranges section in final link.  Prepare to set bit 0 on
5233         entry address.
5234         * elf32-sh64.c (struct sh64_find_section_vma_data): New.
5235         (sh64_elf_link_output_symbol_hook): Fix typo in prototype.
5236         (sh64_elf_set_mach_from_flags): Set SEC_DEBUGGING on incoming
5237         .cranges section.
5238         (sh64_backend_section_from_shdr): New, to recognize
5239         SHT_SH5_CR_SORTED on incoming .cranges section.
5240         (elf_backend_section_from_shdr): Define.
5241         (sh64_elf_final_write_processing): Sort outgoing .cranges
5242         section.  (New, temporarily disabled:) Set bit 0 on entry address
5243         according to ISA type.
5244         (sh64_find_section_for_address): New.
5245         (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb,
5246         crange_bsearch_cmpl): Move here from opcodes/sh64-dis.c.
5247         (sh64_address_in_cranges): Move here from opcodes/sh64-dis.c.  Use
5248         bfd_malloc, not xmalloc.
5249         (sh64_get_contents_type): Move here from opcodes/sh64-dis.c.  Make
5250         global.
5251         * elf32-sh64.c (sh64_elf64_final_write_processing): New, (but
5252         temporarily disabled) setting bit 0 on entry address.
5253         (elf_backend_final_write_processing): Define.
5254         2001-01-05  Hans-Peter Nilsson  <hpn@cygnus.com>
5255         * elf32-sh.c (sh_elf_howto_table) <R_SH_PT_16>: Adjust fields to
5256         be a proper relocation for PTA and PTB rather than a marker.
5257         <R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
5258         R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
5259         R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
5260         R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
5261         R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL>:
5262         Zero src_mask.
5263         * elf64-sh64.c: Ditto.
5264         (sh_elf64_relocate_section) <case R_SH_PT_16>: New case.
5265         * elf32-sh64.c: Include opcodes/sh64-opc.h
5266         (shmedia_prepare_reloc): Take a bfd_link_info pointer as first
5267         argument.  Drop const qualifiers from "bfd *" and "bfd_byte *"
5268         parameters.  No unused parameters.  Caller changed.
5269         <case R_SH_PT_16>: New case.
5270         * Makefile.am (elf32-sh64.lo): Add dependency on sh64-opc.h.
5271         * Makefile.in: Regenerate.
5272         2000-12-30  Hans-Peter Nilsson  <hpn@cygnus.com>
5273         * elf64-sh64.c (sh64_elf64_fake_sections): Set SHF_SH5_ISA32 for
5274         all code sections.
5275         (sh_elf64_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
5276         (sh64_elf_merge_private_data): Ditto.
5277         * elf32-sh64.c (sh64_elf_fake_sections): Use sh64_elf_section_data
5278         to access stored section flags.
5279         (sh64_elf_final_write_processing): Return immediately unless
5280         called by linker.  Use sh64_elf_section_data (cranges) to get size
5281         of linker-generated cranges entries.
5282         (sh64_elf_copy_private_data): Add missing "return true".
5283         (sh64_elf_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
5284         (sh_elf64_merge_private_data): Ditto.
5285         2000-12-19  Hans-Peter Nilsson  <hpn@cygnus.com>
5286         * elf64-sh64.c (sh64_elf64_fake_sections): New, copy of
5287         elf64-sh64.c:sh64_elf_fake_sections.
5288         (elf_backend_fake_sections): Define as sh64_elf64_fake_sections.
5289         2000-12-18  Hans-Peter Nilsson  <hpn@cygnus.com>
5290         * elf32-sh64.c (sh64_elf_copy_private_data_internal): Delete.
5291         (sh64_elf_final_write_processing): New.
5292         (elf_backend_final_write_processing): Define.
5293         (sh64_elf_fake_sections): Get header flags from tdata field.
5294         (sh64_elf_copy_private_data): Do not call
5295         sh64_elf_copy_private_data_internal, just copy e_flags field.
5296         (sh64_elf_merge_private_data): Do not call
5297         sh64_elf_copy_private_data_internal.
5298         2000-12-12  Hans-Peter Nilsson  <hpn@cygnus.com>
5299         Remove EF_SH64_ABI64, let ELF size make difference.
5300         Remove SH64-specific BFD section flag.
5301         * elf32-sh64.c (sh64_elf_fake_sections): Recognize section as
5302         containing SHmedia through elf_section_data (asect)->tdata
5303         non-zero, not using a BFD section flag.
5304         (sh64_elf_set_mach_from_flags): Don't recognize EF_SH64_ABI64.
5305         (sh64_elf_merge_private_data): Similar.
5306         (elf_backend_section_flags): Don't define.
5307         (sh64_elf_backend_section_flags): Delete.
5308         * elf64-sh64.c (sh_elf64_set_mach_from_flags): Recognize EF_SH64,
5309         not EF_SH64_ABI64.
5310         (sh_elf64_merge_private_data): Similar.
5311         * section.c (Section flags definitions): Don't define
5312         SEC_SH_ISA_SHMEDIA.
5313         (bfd-in2.h): Regenerate.
5314         2000-12-09  Hans-Peter Nilsson  <hpn@cygnus.com>
5315         Make DataLabel references work with partial linking.
5316         * elf32-sh64.c: Fix formatting.
5317         (sh64_elf_link_output_symbol_hook): New.
5318         (elf_backend_link_output_symbol_hook): Define to
5319         sh64_elf_link_output_symbol_hook.
5320         (sh64_elf_add_symbol_hook): Make DataLabel symbol just global
5321         undefined if partial linking.  Adjust sanity check.
5322         * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): New.
5323         (elf_backend_link_output_symbol_hook): Define to
5324         sh64_elf64_link_output_symbol_hook.
5325         (sh64_elf64_add_symbol_hook): Make DataLabel symbol just global
5326         undefined if partial linking.  Adjust sanity check.
5327         2000-12-07  Hans-Peter Nilsson  <hpn@cygnus.com>
5328         Implement semantics for inter-file DataLabel references.
5329         * elf64-sh64.c (DATALABEL_SUFFIX): Define.
5330         (sh64_elf64_add_symbol_hook): New.
5331         (sh_elf64_relocate_section): If passing an indirect symbol with
5332         st_type STT_DATALABEL on the way to a symbol with st_other
5333         STO_SH5_ISA32, do not bitor 1 to the relocation.
5334         (elf_backend_add_symbol_hook): Define to
5335         sh64_elf64_add_symbol_hook.
5336         * elf64-sh32.c: Tweak comments.
5337         (DATALABEL_SUFFIX): Define.
5338         (sh64_elf_add_symbol_hook): New.
5339         (elf_backend_add_symbol_hook): Define to sh64_elf_add_symbol_hook.
5340         * elf32-sh.c (sh_elf_relocate_section): If passing an indirect
5341         symbol with st_type STT_DATALABEL on the way to a symbol with
5342         st_other STO_SH5_ISA32, do not bitor 1 to the relocation.
5343         2000-12-05  Hans-Peter Nilsson  <hpn@cygnus.com>
5344         Pass through STT_DATALABEL.
5345         * elf32-sh64.c (sh64_elf_get_symbol_type): New.
5346         (elf_backend_get_symbol_type): Define.
5347         * elf64-sh64.c (sh64_elf64_get_symbol_type): New.
5348         (elf_backend_get_symbol_type): Define.
5349         2000-11-30  Hans-Peter Nilsson  <hpn@cygnus.com>
5350         * elf32-sh64.c: Tweak comments.
5351         (sh64_elf_copy_private_data_internal): Add prototype.
5352         (bfd_elf32_bfd_set_private_flags): Define.
5353         (sh64_elf_copy_private_data_internal): Compare machine name, not
5354         textual BFD target name, to check whether to copy section flag
5355         SHF_SH5_ISA32.
5356         (sh64_elf_merge_private_data): Validize bfd_get_arch_size.
5357         Tweak section-contents-type-mismatch message.
5358         (shmedia_prepare_reloc): Add ATTRIBUTE_UNUSED markers.
5359         Validize reloc-types.
5360         * elf64-sh64.c: New file.
5361         * targets.c (bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec): Declare.
5362         * Makefile.am (BFD64_BACKENDS): Add elf64-sh64.lo.
5363         (BFD64_BACKENDS_CFILES): Add elf64-sh64.c.
5364         Regenerate dependencies.
5365         * Makefile.in: Regenerate.
5366         * config.bfd (sh64-*-elf*): Add bfd_elf64_sh64_vec and
5367         bfd_elf64_sh64l_vec.
5368         * configure.in: Handle bfd_elf64_sh64_vec and
5369         bfd_elf64_sh64l_vec.
5370         * configure: Regenerate.
5371         * po/POTFILES.in: Regenerate.
5372         * po/bfd.pot: Regenerate.
5373         2000-11-29  Hans-Peter Nilsson  <hpn@cygnus.com>
5374         * elf32-sh64.c (sh64_elf_set_mach_from_flags): Do not recognize
5375         anything else but EF_SH64 and EF_SH64_ABI64.
5376         (sh64_elf_merge_private_data): Emit error for anything else but
5377         EF_SH64 and EF_SH64_ABI64.
5378         * config.bfd: Remove bfd_elf32_shblin_vec and bfd_elf32_shlin_vec
5379         from targ_selvecs.
5380         * configure.in: Add cofflink.lo to bfd_elf32_sh64_vec and
5381         bfd_elf32_sh64l_vec as a temporary measure.
5382         * configure: Regenerate.
5383         2000-11-27  Hans-Peter Nilsson  <hpn@cygnus.com>
5384         * cpu-sh.c (arch_info_struct): Include sh5 item
5385         unconditionalized.
5386         * config.bfd (sh64-*-elf*): Do not set targ_cflags.
5387         Add targ_selvecs bfd_elf32_sh_vec, bfd_elf32_shl_vec,
5388         bfd_elf32_shblin_vec and bfd_elf32_shlin_vec.
5389         * elf32-sh64.c: Tweak comments.
5390         (sh64_elf_set_mach_from_flags): Recognize all machine flags that
5391         are proper subsets of SH64 as bfd_mach_sh5.  Add EF_SH64_ABI64.
5392         (sh64_elf_copy_private_data_internal): Wrap long line.
5393         (sh64_elf_merge_private_data): Rewrite to allow objects from
5394         SH64 subsets to be linked together.
5395         (INCLUDE_SHMEDIA): Define.
5396         * elf32-sh.c (sh_elf_relocate_section) <local symbol>:
5397         Parenthesize plus-expression inside or-expression.
5398         <global symbol>: Ditto.
5399         (sh_elf_set_mach_from_flags): Remove code refusing
5400         deleted EF_SH64_32BIT_ABI flag.
5401         2000-11-26  Hans-Peter Nilsson  <hpn@cygnus.com>
5402         * elf32-sh.c (sh_elf_howto_table) <R_SH_IMM_LOW16_PCREL,
5403         R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16_PCREL,
5404         R_SH_IMM_HI16_PCREL, R_SH_64_PCREL>: Set pcrel_offset to true.
5405         (sh_elf_relocate_section) <local symbol>: Or 1 in
5406         calculation of relocation if sym->st_other & STO_SH5_ISA32.
5407         <global symbol>: Ditto if h->other & STO_SH5_ISA32.
5408         * elf32-sh64.c (shmedia_prepare_reloc): Add rel->r_addend to
5409         relocation.
5410         2000-11-24  Hans-Peter Nilsson  <hpn@cygnus.com>
5411         * Makefile.am (BFD32_BACKENDS): Add elf32-sh64.lo.
5412         (BFD32_BACKENDS_CFILES): Add elf32-sh64.c.
5413         Regenerate dependencies.
5414         * Makefile.in: Regenerate.
5415         * archures.c: Add bfd_mach_sh5.
5416         * config.bfd: Map targ_cpu sh* to bfd_sh_arch.
5417         Handle sh64-*-elf*.  Set targ_cflags to -DINCLUDE_SHMEDIA.
5418         * configure.in: Handle bfd_elf32_sh64_vec and bfd_elf32_sh64l_vec.
5419         * configure: Regenerate.
5420         * reloc.c (BFD_RELOC_SH_SHMEDIA_CODE, BFD_RELOC_SH_IMMU5,
5421         BFD_RELOC_SH_IMMS6, BFD_RELOC_SH_IMMS6BY32, BFD_RELOC_SH_IMMU6,
5422         BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
5423         BFD_RELOC_SH_IMMS10BY4, BFD_RELOC_SH_IMMS10BY8,
5424         BFD_RELOC_SH_IMMS16, BFD_RELOC_SH_IMMU16, BFD_RELOC_SH_IMM_LOW16,
5425         BFD_RELOC_SH_IMM_LOW16_PCREL, BFD_RELOC_SH_IMM_MEDLOW16,
5426         BFD_RELOC_SH_IMM_MEDLOW16_PCREL, BFD_RELOC_SH_IMM_MEDHI16,
5427         BFD_RELOC_SH_IMM_MEDHI16_PCREL, BFD_RELOC_SH_IMM_HI16,
5428         BFD_RELOC_SH_IMM_HI16_PCREL, BFD_RELOC_SH_PT_16): New relocations.
5429         * cpu-sh.c [INCLUDE_SHMEDIA] (arch_info_struct): Define and link
5430         in item for SH5.
5431         * elf32-sh.c [INCLUDE_SHMEDIA] (sh_elf_howto_table): Add howto items
5432         for SHmedia relocs.
5433         [INCLUDE_SHMEDIA] (sh_rel): Add mappings for SHmedia relocs.
5434         [INCLUDE_SHMEDIA] (sh_elf_relocate_section) [default]: Call
5435         shmedia_prepare_reloc, goto final_link_relocate if it returns
5436         non-zero, else fail as before.
5437         (sh_elf_set_mach_from_flags): Provide function only if not defined
5438         as macro.  Do not recognize objects with EF_SH64_32BIT_ABI set.
5439         (sh_elf_set_private_flags): Provide function only if not defined
5440         as a macro.
5441         (sh_elf_copy_private_data): Similar.
5442         (sh_elf_merge_private_data): Similar.
5443         * section.c (SEC_SH_ISA_SHMEDIA): New.
5444         * targets.c (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec): Declare.
5445         * elf32-sh64.c: New file.
5446         * libbfd.h: Regenerate.
5447         * bfd-in2.h: Regenerate.
5448         * po/POTFILES.in: Regenerate.
5449         * po/bfd.pot: Regenerate.
5450         * bfd-in2.h: Regenerate.
5451         * libbfd.h: Regenerate.
5452
5453 2002-02-07  Daniel Jacobowitz  <drow@mvista.com>
5454
5455         * bfd-in.h: Update <stdbool.h> check to only see if <stdbool.h> has
5456         been included, not drag it in.
5457         * bfd-in2.h: Regenerate.
5458
5459 2002-02-06  H.J. Lu  (hjl@gnu.org)
5460
5461         * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
5462         the mach and ISA fields if necessary.
5463
5464 2002-02-06  Nick Clifton  <nickc@cambridge.redhat.com>
5465
5466         * coffcode.h (coff_set_arch_mach_hook): Select the highest known
5467         ARM architecture when an F_ARM_5 flag is detected, since we cannot
5468         be sure exactly which architecture this represents.
5469
5470 2002-02-05  Nick Clifton  <nickc@redhat.com>
5471
5472         * po/tr.po: Updated translation.
5473
5474 2002-02-05  Alan Modra  <amodra@bigpond.net.au>
5475
5476         From Jimi X <jimix@watson.ibm.com>
5477         * archures (bfd_mach_ppc64): Define.
5478         (bfd_powerpc_arch): Rename to bfd_powerpc_archs.
5479         (bfd_powerpc_arch): Define.
5480         * bfd-in2.h: Regenerate.
5481         * cpu-powerpc.c (arch_info_struct): Rename to bfd_powerpc_archs.
5482         (bfd_powerpc_arch): Move to tail of bfd_powerpc_archs.
5483         (bfd_powerpc_archs): Add default powerpc64 arch.
5484
5485 2002-02-05  Alan Modra  <amodra@bigpond.net.au>
5486
5487         * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Check for relocs
5488         against section syms in readonly sections.  Don't do the global
5489         sym check if we find one.
5490         * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
5491         * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
5492         * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
5493         * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
5494         (elf_s390_grok_prstatus): Add missing prototype.
5495
5496 2002-02-04  Hans-Peter Nilsson  <hp@bitrange.com>
5497
5498         * elf64-mmix.c (mmix_dump_bpo_gregs): New function.
5499         (mmix_elf_check_common_relocs) <case R_MMIX_BASE_PLUS_OFFSET>:
5500         Call bfd_get_section_by_name only once.  Initialize
5501         bpodata->n_bpo_relocs_this_section.
5502         (_bfd_mmix_prepare_linker_allocated_gregs): Remove comment
5503         referring to DSOs.
5504         (bpo_reloc_request_sort_fn): Don't use difference of values as
5505         return-value.
5506
5507 2002-02-02  David O'Brien  <obrien@FreeBSD>
5508
5509         * configure.in: Tweak the FreeBSD 4.x recognition more.  Only treat
5510         version 4.5 and later the same as 5-CURRENT.
5511         * configure: Re-generate.
5512
5513 2002-02-02  Jason Thorpe  <thorpej@wasabisystems.com>
5514
5515         * config.bfd (hppa*-*-netbsd*): New target.
5516
5517 2002-01-31  Philipp Thomas  <pthomas@suse.de>
5518
5519         * coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR
5520         to front of message. Unify messages with elf32-arm.h. Use
5521         commas where neccessary.
5522         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase
5523         ERROR in messages. Unify messages with coff-arm.c. Correct
5524         VFP/FPA error message.
5525         (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and
5526         APCS-32 for translation.
5527
5528 2002-02-01  Hans-Peter Nilsson  <hp@bitrange.com>
5529
5530         Perform on-demand global register allocation from
5531         R_MMIX_BASE_PLUS_OFFSET relocs.
5532         * elf64-mmix.c (struct bpo_reloc_section_info, struct
5533         bpo_reloc_request, struct bpo_greg_section_info): New.
5534         (mmix_elf_check_common_relocs, mmix_elf_gc_sweep_hook,
5535         bpo_reloc_request_sort_fn, mmix_elf_relax_section,
5536         _bfd_mmix_check_all_relocs,
5537         _bfd_mmix_prepare_linker_allocated_gregs,
5538         _bfd_mmix_finalize_linker_allocated_gregs): New functions.
5539         (elf_mmix_howto_table): Correct src_mask for most relocs.
5540         (mmix_elf_perform_relocation) <case R_MMIX_BASE_PLUS_OFFSET>: New
5541         case.
5542         (mmix_final_link_relocate) <case R_MMIX_BASE_PLUS_OFFSET>: New
5543         case.  Fix typo in comment.  New label do_mmix_reloc.
5544         (mmix_elf_check_relocs): Abuse bfd_link_info member base_file to
5545         store first object file with a base-plus-offset reloc.  Call
5546         mmix_elf_check_common_relocs for the part common with mmo.
5547         (mmix_elf_final_link): Write out linker-allocated register
5548         contents section.
5549         (elf_backend_gc_sweep_hook): Define.
5550         (bfd_elf64_bfd_relax_section): Define.
5551
5552         * mmo.c: Don't include <ctype.h>
5553         (mmo_init): Correct init-once logic.
5554
5555 2002-02-01  Tom Rix  <trix@redhat.com>
5556
5557         * config.bfd: Conditionally support <aiaff> for pre AIX 4.3.
5558
5559 2002-02-01  Alan Modra  <amodra@bigpond.net.au>
5560
5561         * Makefile.am: Run "make dep-am"
5562         * Makefile.in: Regenerate.
5563
5564 2002-01-31  David O'Brien  <obrien@FreeBSD>
5565
5566         * configure.in: Recognize the differences in core files from FreeBSD
5567         4.{0,1} and later versions of 4.x.  This treats 4.2+ the same as
5568         5-CURRENT.
5569         * configure: Regenerate.
5570
5571 2002-01-31  Ivan Guzvinec  <ivang@opencores.org>
5572
5573         * coff-or32.c: New file.
5574         * cpu-or32.c: New file.
5575         * elf32-or32.c: New file.
5576         * archures.c: Add support for or32.
5577         * targets.c: Add support for or32.
5578         * bfd-in2.h: Regenerate.
5579         * coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
5580         coff_write_object_contents): Add support for or32.
5581         * config.bfd: Add target.
5582         * configure.in: Add support for or32.
5583         * configure: Regenerate.
5584         * Makefile.am: Add support for or32.
5585         * Makefile.in: Regenerate.
5586         * po/SRC-POTFILES.in: Add or32 files.
5587         * po/bfd.pot: Regenerate.
5588
5589 2002-01-31  Nick Clifton  <nickc@cambridge.redhat.com>
5590             Don Lindsay  <lindsayd@cisco.com>
5591
5592         * elf32-mips.c (mips_elf_calculate_relocation): Replace 'return
5593         false' with a return of a bfd_reloc_ error code.
5594
5595 2002-01-31  Hans-Peter Nilsson  <hp@axis.com>
5596
5597         * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
5598         unexport unreferenced symbols when --export-dynamic.  Call
5599         _bfd_elf_strtab_delref when unexporting.
5600
5601 2002-01-30  Daniel Jacobowitz  <drow@mvista.com>
5602
5603         * bfd-in.h: Include <stdbool.h> if it is available.
5604         * bfd-in2.h: Regenerated.
5605
5606 2002-01-31  Alan Modra  <amodra@bigpond.net.au>
5607
5608         * elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
5609         not go via the plt.
5610
5611 2002-01-30  Nick Clifton  <nickc@cambridge.redhat.com>
5612
5613         * archures.c: Tidy up formatting of embedded comments.
5614         * bfd.c: Tidy up formatting of embedded comments.
5615         * bfd-in.h: Fix formatting of comments.
5616         * reloc.c: Tidy up formatting of ordinary & embedded comments.
5617         * section.c: Tidy up formatting of embedded comments.
5618         * syms.c: Tidy up formatting of embedded comments.
5619         * targets.c: Tidy up formatting of embedded comments.
5620
5621         * bfd-in2.h: Regenerate.
5622
5623 2002-01-30  Nick Clifton  <nickc@cambridge.redhat.com>
5624
5625         * vms-tir.c (cmd_name): New function.
5626         (tir_cmd_name): New function.
5627         (etir_sta, etir_sto, etir_opr, etir_stc): Use cmd_name().
5628         (tir_opr, tir_ctl, tir_cmd): use tir_cmd_name().
5629         Fix formatting.
5630
5631         * peXXigen.c (pe_print_idata): Rearrange message to aid in
5632         translation.
5633         (pe_print_pdata):  Rearrange message to aid in translation.
5634
5635         * libbfd.c (warn_deprecated): Rearrange error message to aid in
5636         translation.
5637
5638         * ihex.c (ihex_write_object_contents): Fix spelling typo.
5639
5640         * ieee.c (ieee_slurp_external_symbols): Remove spurious space.
5641
5642         * elf64-sparc.c (sparc64_elf_add_symbol_hook): Rearrange error
5643         message to aid in translation.
5644
5645         * elf64-mmix.c (mmix_final_link_relocate): Rearrange error message
5646         to aid in translation.
5647
5648         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix typo.
5649
5650 2002-01-30  Philipp Thomas  <pthomas@suse.de>
5651
5652         * coff-arm.c, elf32-elf.h: Unify messages.
5653
5654 2002-01-30  Nick Clifton <nickc@redhat.com>
5655
5656         * po/sv.po: Updated translation.
5657
5658 2002-01-30  Philipp Thomas  <pthomas@suse.de>
5659
5660         * dwarf2.c (read_abbrev): Use full section name in error message.
5661         (decode_line_info): Likewise.
5662
5663         * elf.c (_bfd_elf_symbol_from_bfd_symbol): Don't translate debugging
5664         message.
5665
5666 2002-01-30  Alan Modra  <amodra@bigpond.net.au>
5667
5668         * elf64-ppc.c (func_desc_adjust): Only provide missing function
5669         descriptor symbols for undefined function code syms.  Clear
5670         ELF_LINK_NON_ELF so that they can stay weak.
5671
5672 2002-01-29  Chris Demetriou  <cgd@broadcom.com>
5673             Mitch Lichtenberg  <mpl@broadcom.com>
5674
5675         * bfd-in.h (bfd_mips_elf32_create_embedded_relocs): New prototype.
5676         * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): New function
5677         to handle 32-bit ELF embedded reloc (ld --embedded-relocs)
5678         generation.
5679         * bfd-in2.h: Regenerate.
5680
5681 2002-01-29  Chris Demetriou  <cgd@broadcom.com>
5682
5683         * elf32-mips.c: Add additional comments about HI16 relocation
5684         processing.
5685         (_bfd_mips_elf_hi16_reloc): Don't subtract address here for
5686         pc-relative relocations.  (Reverts change made on 2001-10-31.)
5687         (_bfd_mips_elf_lo16_reloc): Subtract address of LO16 part here
5688         for pc-relative relocations.
5689         (mips_elf_calculate_relocation): Add a comment about a kludge
5690         in the R_MIPS_GNU_REL_HI16 handling.
5691         (_bfd_mips_elf_relocate_section): Implement that kludge;
5692         adjust pc-relative HI16 relocation for difference in HI16 and
5693         LO16 addresses, since it can't easily be done in
5694         mips_elf_calculate_relocation.
5695
5696 2002-01-29  Martin Schwidefsky  <schwidefsky@de.ibm.com>
5697
5698         * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32
5699         relocations with PC32 relocations for undefined or weak symbols.
5700         * elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise.
5701         * elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise.
5702
5703 2002-01-28  Jason Thorpe  <thorpej@wasabisystems.com>
5704
5705         * elfcore.h (elf_core_file_p): Improve comment for last change.
5706
5707 2002-01-27  Daniel Jacobowitz  <drow@mvista.com>
5708
5709         * configure: Regenerated.
5710
5711 2002-01-27  Jason Thorpe  <thorpej@wasabisystems.com>
5712
5713         * elfcore.h (elf_core_file_p): Set the machine architecture
5714         before processing the program headers.
5715
5716 2002-01-26  Hans-Peter Nilsson  <hp@bitrange.com>
5717
5718         * configure.in <64-bit configuration>: If using gcc, check and
5719         emit error for egcs-1.1.2.
5720         * configure: Regenerate.
5721
5722 2002-01-26  Egor Duda  <deo@logos-m.ru>
5723
5724         * elf.c (elfcore_grok_win32pstatus): Copy only as much information
5725         as possible to avoid stack corruption.
5726
5727 2002-01-26  Richard Henderson  <rth@redhat.com>
5728
5729         * elf64-alpha.c (elf64_alpha_check_relocs): Don't set reltext
5730         for non-allocated sections.
5731
5732 2002-01-25  Mark Kettenis  <kettenis@gnu.org>
5733
5734         * elf.c (elfcore_write_prstatus): Make sure we pass the address of
5735         prstat.pr_reg even if it is a struct.
5736
5737 2002-01-25  Steve Ellcey <sje@cup.hp.com>
5738
5739         * elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
5740
5741 2002-01-25  Philipp Thomas  <pthomas@suse.de>
5742
5743         * coffgen.c (coff_print_symbol): Don't mark info message
5744         for translation.
5745
5746 2002-01-25  Nick Clifton <nickc@redhat.com>
5747
5748         * po/fr.po: Updated translation.
5749         * po/es.po: Updated translation.
5750
5751 2002-01-25  Philipp Thomas  <pthomas@suse.de>
5752
5753         * coff-alpha.c (alpha_relocate_section): Unify warning message
5754         for GP relative relocations without GP defined.
5755         * coff-mips.c (mips_relocate_section): Likewise.
5756
5757 2002-01-25  Alan Modra  <amodra@bigpond.net.au>
5758
5759         * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
5760         unsigned overflow when new_offset < old_offset.
5761
5762 2002-01-24  Philipp Thomas  <pthomas@suse.de>
5763
5764         * bfd.c (_bfd_abort): Fix typo.
5765
5766 2002-01-23  Richard Henderson  <rth@redhat.com>
5767
5768         * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
5769         plt entries for undefweak symbols.
5770
5771 2002-01-23  Steve Ellcey <sje@cup.hp.com>
5772
5773         * targets.c (bfd_elf32_ia64_hpux_big_vec): Add to DEFAULT_VECTOR.
5774         (bfd_elf64_ia64_hpux_big_vec): Ditto.
5775         (bfd_elf32_h8300_vec): Ditto.
5776
5777 2002-01-23  Alan Modra  <amodra@bigpond.net.au>
5778
5779         * elf64-ppc.c: Remove stale part of ABI comment.
5780         (NO_OPD_RELOCS): Define.
5781         (ppc64_elf_check_relocs): Use it.
5782         (ppc64_elf_relocate_section): Here too.
5783         (build_one_stub): Don't point function syms at the stub.  Instead,
5784         hijack plt.offset.
5785         (ppc64_elf_relocate_section): Check whether REL24 relocs should
5786         really go to the stub.  Make all dynamic relocs in opd against
5787         locals.
5788         (ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
5789         plt.offset.
5790
5791 2002-01-22  Richard Henderson  <rth@redhat.com>
5792
5793         * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp.
5794
5795 2002-01-22  Alan Modra  <amodra@bigpond.net.au>
5796
5797         * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
5798         TOC_BASE_OFF adjustment.
5799
5800         * Makefile.am: Run "make dep-am".
5801         * Makefile.in: Regenerate.
5802         * po/SRC-POTFILES.in: Regenerate.
5803
5804 2002-01-22  John David Anglin  <dave@hiauly1.hia.nrc.ca>
5805
5806         * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
5807         host defines.
5808
5809 2002-01-21  Hans-Peter Nilsson  <hp@axis.com>
5810
5811         * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
5812         Check for and emit error if sgot is NULL at this point.
5813
5814 2002-01-21  Jason Thorpe  <thorpej@wasabisystems.com>
5815
5816         * config.bfd (ia64*-*-netbsd*): New target.
5817
5818 2002-01-21  Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
5819
5820         * som.c (som_write_space_strings): Comment typo fix.
5821
5822 2002-01-21  Alan Modra  <amodra@bigpond.net.au>
5823
5824         * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
5825         is_func_descriptor fields.
5826         (link_hash_newfunc): Init them.
5827         (ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
5828         dot are candidates for plt entries.  When processing .opd relocs,
5829         set function descriptor strings to point inside function code
5830         string, and set new ppc_link_hash_entry fields.
5831         (ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
5832         (ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
5833         function descriptors.  It's now done in..
5834         (func_desc_adjust): New.
5835         (ppc64_elf_func_desc_adjust): New.
5836         (define elf_backend_always_size_sections): Define.
5837         (ppc64_elf_hide_symbol): New.
5838         (define elf_backend_hide_symbol): Define.
5839         (allocate_dynrelocs): Remove code looking up function descriptors
5840         as that has been done earlier.
5841         (ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
5842         table.
5843         (ppc64_elf_finish_dynamic_symbol): Likewise.  Remove code looking
5844         up function descriptor.
5845         (build_one_stub): Look up the function code sym.  Check for
5846         invalid plt offsets.
5847         (ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
5848         Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
5849
5850         * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
5851         boolean param.
5852         (_bfd_elf_link_hash_hide_symbol): Likewise.
5853         * elflink.h (elf_link_add_object_symbols): Adjust call to
5854         elf_backend_hide_symbol.
5855         (elf_fix_symbol_flags): Likewise.
5856         (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
5857         than bfd_alloc.
5858         * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
5859         Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
5860         * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
5861         (clobber_millicode_symbols): Adjust to suit new hide_symbol.
5862         * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
5863         and adjust to suit.
5864         * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
5865         _bfd_elf_link_hash_hide_symbol rather than duplicating code.
5866         * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
5867
5868 2002-01-18  Alan Modra  <amodra@bigpond.net.au>
5869
5870         * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
5871         dynamic function descriptor symbol, not the associated function
5872         symbol.
5873
5874 2002-01-17  Eric Christopher  <echristo@redhat.com>
5875
5876         * elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
5877
5878 2002-01-17  Nick Clifton  <nickc@cambridge.redhat.com>
5879
5880         * po/bfd.pot: Regenerate.
5881         * po/fr.po: Regenerate.
5882
5883 2002-01-17  Alan Modra  <amodra@bigpond.net.au>
5884
5885         * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
5886         Remove "Elf_Internal_Shdr *" param.
5887         (_bfd_mips_elf_section_from_bfd_section): Ditto.
5888         * elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
5889         * elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
5890         * elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
5891         * elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
5892         * elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
5893         * elf.c (_bfd_elf_section_from_bfd_section): Allow backend
5894         function to override special sections.  Remove hdr arg from
5895         backend call, and don't loop.
5896
5897 2002-01-16  Eric Christopher  <echristo@redhat.com>
5898
5899         * elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
5900         on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
5901         relocations requiring gp0 and gp.
5902
5903 2002-01-16  Richard Earnshaw  <rearnsha@arm.com>
5904
5905         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
5906         EF_ARM_VFP_FLOAT.
5907         (elf32_arm_print_private_bfd_data): Likewise.
5908
5909 2002-01-16  Nick Clifton  <nickc@cambridge.redhat.com>
5910
5911         * po/tr.po: Import new version.
5912
5913 2002-01-16  Alan Modra  <amodra@bigpond.net.au>
5914
5915         * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
5916         (ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
5917         (ORI_R0_R0_0): Correct.
5918
5919 2002-01-16  Alan Modra  <amodra@bigpond.net.au>
5920
5921         * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
5922         when plt_not_loaded.
5923         * elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
5924         clear .plt SEC_CODE here.  Create .stub and correct .glink flags.
5925         (PLT_INITIAL_ENTRY_SIZE): Set to 24.
5926         (ppc64_elf_glink_code): Delete.
5927         (PPC64_ELF_GLINK_SIZE): Delete.
5928         (ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
5929         BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
5930         ORI_R0_R0_0): Define.
5931         (PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
5932         (struct ppc_link_hash_table): Add sstub and plt_overflow.
5933         (ppc64_elf_link_hash_table_create): Init them.
5934         (ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
5935         Don't copy to shared lib.
5936         (ppc64_elf_check_relocs): Call bfd_set_error on errors.
5937         (ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
5938         (allocate_dynrelocs <plt>): Don't change function sym here.  Make
5939         room for .stub and .glink code.
5940         (ppc64_elf_size_dynamic_sections): Handle .stub.  Make entry for
5941         DT_PPC64_GLINK.
5942         (ppc64_elf_final_link): Rename to ppc64_elf_set_toc.  Don't call
5943         bfd_elf64_bfd_final_link.
5944         (bfd_elf64_bfd_final_link): Don't define.
5945         (ppc64_elf_size_stubs): New.
5946         (build_plt_stub): New.
5947         (build_one_stub): New.
5948         (ppc64_elf_build_stubs): New.
5949         (ppc64_elf_relocate_section <toc relocs>): Remove assert.
5950         (ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
5951         (ppc64_elf_finish_dynamic_symbol): Don't build stubs here.  Set
5952         DT_PPC64_GLINK entry.  Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
5953         case output sections not separate.  Adjust DT_RELASZ to not
5954         include plt relocs.  Set reserved got entry.  Set got and plt
5955         entry size.
5956         (elf_backend_got_header_size): Set to 8.
5957         * elf64-ppc.h: New file.
5958
5959 2002-01-16  Alan Modra  <amodra@bigpond.net.au>
5960
5961         * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
5962         sections, use bfd_section_list_remove.
5963         * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
5964         * elflink.h (elf_link_add_object_symbols): When removing all
5965         sections, use bfd_section_list_clear.
5966
5967 2002-01-15  Nick Clifton  <nickc@cambridge.redhat.com>
5968
5969         * po/sv.po: New file: Swedish translation.
5970         * configure.in (ALL_LINGUAS): Add sv.
5971         * configure: Regenerate.
5972
5973 2002-01-15  Jakub Jelinek  <jakub@redhat.com>
5974
5975         * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
5976         * elf.c (merge_sections_remove_hook): New function.
5977         (_bfd_elf_merge_sections): Pass it as 3rd argument to
5978         _bfd_merge_sections.
5979         * libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
5980         * libbfd.h: Rebuilt.
5981         * merge.c (_bfd_merge_sections): Add remove_hook argument.
5982         Call remove_hook if a SEC_EXCLUDE section is encountered.
5983
5984 2002-01-15  Nick Clifton  <nickc@cambridge.redhat.com>
5985
5986         * elf32-xstormy16.c (xstormy16_reloc_map): Add new field 'table'.
5987         (xstormy16_reloc_map): Initialise new field with correct howto
5988         table.
5989         (xstormy16_reloc_type_lookup): Use 'table' field to locate correct
5990         howto entry.
5991
5992 2002-01-10  Michael Snyder  <msnyder@redhat.com>
5993
5994         * elf.c (elfcore_write_prstatus): Use long instead of pid_t;
5995         (elfcore_write_pstatus): Use long instead of pid_t;
5996         * elf-bfd.h: Change prototypes to use long instead of pid_t;
5997
5998 2002-01-09  Jason Thorpe  <thorpej@wasabisystems.com>
5999
6000         * elf.c: Update copyright years.
6001         (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
6002         and NT_NETBSDCORE_FIRSTMACH.  Improve a comment.
6003
6004 2002-01-08  Michael Snyder  <msnyder@redhat.com>
6005
6006         Add capability to write corefile note sections, for gdb.
6007         * elf.c (elfcore_write_note): New function.
6008         (elfcore_write_prpsinfo): New function.
6009         (elfcore_write_prstatus): New function.
6010         (elfcore_write_pstatus): New function.
6011         (elfcore_write_prfpreg): New function.
6012         (elfcore_write_prxfpreg): New function.
6013         * elf-bfd.h: Add prototypes for above functions.
6014
6015 2002-01-08  Alexandre Oliva  <aoliva@redhat.com>
6016
6017         * elf.c (elf_fake_sections): Propagate errors from
6018         elf_backend_fake_section.
6019
6020 2002-01-07  Jason Thorpe  <thorpej@wasabisystems.com>
6021
6022         * Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
6023         (BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
6024         (elf32-sh-nbsd.lo): New rule.
6025         * Makefile.in: Regenerate.
6026         * config.bfd (sh*le-*-netbsdelf*): New target.
6027         (sh*-*-netbsdelf*): New target.
6028         * configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
6029         (bfd_elf32_shnbsd_vec): New vector.
6030         (bfd_elf32_shlnbsd_vec): New vector.
6031         * configure: Regenerate.
6032         * elf32-sh-nbsd.c: New file.
6033         * targets.c: Update copyright years.
6034         (_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
6035         bfd_elf32_shnbsd_vec.
6036
6037 2002-01-07  Aldy Hernandez  <aldyh@redhat.com>
6038
6039         * coff-rs6000.c (READ20): Use bfd_scan_vma.
6040
6041 2002-01-07  Geoffrey Keating  <geoffk@redhat.com>
6042
6043         * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
6044         of a symbol in a section that will be deleted.
6045
6046 2002-01-07  Nick Clifton  <nickc@cambridge.redhat.com>
6047
6048         * po/es.po: New file: Spanish translation.
6049         * configure.in (ALL_LINGUAS): Add es.
6050         * configure: Regenerate.
6051
6052 2002-01-06  Steve Ellcey  <sje@cup.hp.com>
6053
6054         * elfxx-ia64.c (is_unwind_section_name): Add target vector as
6055         argument so we can handle HP-UX specially.
6056         (elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
6057         (elfNN_hpux_backend_section_from_bfd_section): New for support
6058         of SHN_IA_64_ANSI_COMMON.
6059         (elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
6060         (is_unwind_section_name): Add special HP-UX support.
6061         (elfNN_ia64_section_from_shdr): Add support for more sections.
6062         (elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
6063         add support for more sections.
6064         (elfNN_ia64_additional_program_headers): Modify
6065         is_unwind_section_name call.
6066         (elfNN_ia64_modify_segment_map): Remove assumption that there is
6067         only one unwind section in segment.
6068
6069 2002-01-06  Alan Modra  <amodra@bigpond.net.au>
6070
6071         * syms.c (_bfd_generic_make_empty_symbol): New function.
6072         * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
6073         _bfd_generic_make_empty_symbol.
6074         * libbfd.h: Regenerate.
6075         * bfd-in2.h: Regenerate.
6076         * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
6077         (hppabsd_core_get_symtab_upper_bound): Don't define.
6078         (hppabsd_core_get_symtab): Likewise.
6079         (hppabsd_core_print_symbol): Likewise.
6080         (hppabsd_core_get_symbol_info): Likewise.
6081         (hppabsd_core_bfd_is_local_label_name): Likewise.
6082         (hppabsd_core_get_lineno): Likewise.
6083         (hppabsd_core_find_nearest_line): Likewise.
6084         (hppabsd_core_bfd_make_debug_symbol): Likewise.
6085         (hppabsd_core_read_minisymbols): Likewise.
6086         (hppabsd_core_minisymbol_to_symbol): Likewise.
6087         (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
6088         Formatting fixes.
6089         * hpux-core.c: Similarly.
6090         * irix-core.c: Similarly.
6091         * osf-core.c: Similarly.
6092         * sco5-core.c: Similarly.
6093         * binary.c (binary_make_empty_symbol): Remove function, define as
6094         _bfd_generic_make_empty_symbol.
6095         * ihex.c (ihex_make_empty_symbol): Likewise.
6096         * mmo.c (mmo_make_empty_symbol): Likewise.
6097         * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
6098         * srec.c (srec_make_empty_symbol): Likewise.
6099         * versados.c (versados_make_empty_symbol): Likewise.
6100         * vms.c (_bfd_vms_make_empty_symbol): Remove.
6101         (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
6102         * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
6103         rather than _bfd_vms_make_empty_symbol.
6104         * vms-misc.c (new_symbol): Likewise.
6105
6106 2002-01-05  Alan Modra  <amodra@bigpond.net.au>
6107
6108         * section.c (bfd_section_init): Remove unnecessary initialisations.
6109         (bfd_section_list_clear): New function.
6110         (bfd_section_list_remove, bfd_section_list_insert): New macros.
6111         (_bfd_strip_section_from_output): Use them.
6112         * coffcode.h (coff_set_alignment_hook): Likewise.
6113         * elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
6114         * elf64-mips.c (mips_elf64_final_link): Likewise.
6115         * elf64-mmix.c (mmix_elf_final_link): Likewise.
6116         * sunos.c (sunos_add_dynamic_symbols): Likewise.
6117         * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
6118         * bfd-in2.h: Regenerate.
6119
6120         * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
6121         rather than doing our own section handling.  Clean up after errors
6122         with bfd_release and bfd_section_list_clear.  Handle unexpected
6123         flags.
6124         * aoutf1.h (sunos4_core_file_p): Likewise.
6125         * aix386-core.c (aix386_core_file_p): Likewise.
6126         * cisco-core.c (cisco_core_file_validate): Likewise.
6127         * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
6128         * trad-core.c (trad_unix_core_file_p): Likewise.
6129
6130         * hppabsd-core.c (hppabsd_core_core_file_p):  Clean up after errors
6131         with bfd_release and bfd_section_list_clear.
6132         * hpux-core.c (hpux_core_core_file_p): Likewise.
6133         * irix-core.c (irix_core_core_file_p): Likewise.
6134         * lynx-core.c (lynx_core_file_p): Likewise.
6135         * osf-core.c (osf_core_core_file_p): Likewise.
6136         * rs6000-core.c (rs6000coff_core_p): Likewise.
6137         * sco5-core.c (sco5_core_file_p): Likewise.
6138
6139         * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
6140         sign extension adjustments without conditionals.
6141
6142 2002-01-04  Jakub Jelinek  <jakub@redhat.com>
6143
6144         * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
6145         CIE at .eh_frame start is removed due to no FDEs referencing it.
6146
6147 2002-01-04  Jason Thorpe  <thorpej@wasabisystems.com>
6148
6149         * config.bfd (x86_64-*-netbsd*): New target.
6150         * configure.in (x86_64-*-netbsd*): Set COREFILE
6151         to netbsd-core.lo.
6152         * configure: Regenerated.
6153
6154 2002-01-03  Tom Rix  <trix@redhat.com>
6155
6156         * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
6157         for recent bfd_make_section_anyway change.
6158
6159 2002-01-03  Nick Clifton  <nickc@cambridge.redhat.com>
6160
6161         * elf32-arm.h (elf32_arm_final_link_relocate): Handle
6162         R_ARM_THM_PC11 reloc.
6163
6164 2002-01-02  Nick Clifton  <nickc@cambridge.redhat.com>
6165
6166         * configure.in (LINGUAS): Add ja.
6167         * configure: Regenerate.
6168         * po/ja.po: Import from translation project's web site.
6169
6170 2002-01-02  Nick Clifton  <nickc@cambridge.redhat.com>
6171
6172         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
6173         messages to ease translation into other languages.
6174
6175 For older changes see ChangeLog-0001
6176 \f
6177 Local Variables:
6178 mode: change-log
6179 left-margin: 8
6180 fill-column: 74
6181 version-control: never
6182 End: