Revert update of version number
[external/binutils.git] / bfd / ChangeLog
1 2003-05-05  Alan Modra  <amodra@bigpond.net.au>
2
3         * elf32-i386.c (allocate_dynrelocs): For undef weak syms with
4         non-default visibility, a) don't make them dynamic, b) discard
5         space for dynamic relocs.
6         * elf64-x86-64.c (allocate_dynrelocs): Likewise.
7
8         * elf32-ppc.c (allocate_dynrelocs): For undef weak syms with
9         non-default visibility, a) don't allocate plt entries, b) don't
10         allocate .got relocs, c) discard dyn rel space,
11         (ppc_elf_relocate_section): d) don't generate .got relocs, e)
12         don't generate dynamic relocs.
13         * elf64-ppc.c (allocate_dynrelocs): As above.
14         (ppc64_elf_relocate_section): As above.
15
16 2003-05-05  Andreas Jaeger  <aj@suse.de>
17
18         * elf64-x86-64.c (allocate_dynrelocs): Don't allocate dynamic
19         relocation entries for weak undefined symbols with non-default
20         visibility.
21         (elf64_x86_64_relocate_section): Initialize the GOT entries and
22         skip R_386_32/R_386_PC32 for weak undefined symbols with
23         non-default visibility.
24
25 2003-05-04  H.J. Lu <hjl@gnu.org>
26
27         * elf32-i386.c (allocate_dynrelocs): Don't allocate dynamic
28         relocation entries for weak undefined symbols with non-default
29         visibility.
30         (elf_i386_relocate_section): Initialize the GOT entries and
31         skip R_386_32/R_386_PC32 for weak undefined symbols with
32         non-default visibility.
33  
34         * elfxx-ia64.c (allocate_fptr): Don't allocate function
35         descriptors for weak undefined symbols with non-default
36         visibility.
37         (allocate_dynrel_entries): Don't allocate relocation entries
38         for symbols resolved to 0.
39         (set_got_entry): Don't install dynamic relocation for weak
40         undefined symbols with non-default visibility.
41         (set_pltoff_entry): Likewise.
42
43         * elflink.h (elf_fix_symbol_flags): Hide weak undefined symbols
44         with non-default visibility.
45         (elf_link_output_extsym): Don't make weak undefined symbols
46         with non-default visibility dynamic.
47
48 2003-05-04  H.J. Lu <hjl@gnu.org>
49
50         * elflink.h (elf_merge_symbol): Correctly handle weak definiton.
51
52 2003-05-04  H.J. Lu <hjl@gnu.org>
53
54         * elflink.h (elf_merge_symbol): Don't record a hidden/internal
55         symbol dynamic. Check indirection when removing the old
56         definition for symbols with non-default visibility.
57         (elf_add_default_symbol): Skip when told by elf_merge_symbol.
58
59 2003-05-02  Nick Clifton  <nickc@redhat.com>
60
61         * elf32-xstormy16.c (xstormy16_elf_howto_table): Make the
62         R_XSTORMY16_8 and R_XSTORMY16_16 relocs detect and complain about
63         unsigned overflow.
64
65 2003-05-02  Andreas Jaeger  <aj@suse.de>
66
67         * elf64-x86-64.c (elf_x86_64_copy_indirect_symbol): Don't copy
68         ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
69         (ELIMINATE_COPY_RELOCS): Define as one.  Use throughout.
70         (elf_x86_64_adjust_dynamic_symbol): For weak symbols, copy
71         ELF_LINK_NON_GOT_REF from weakdef.
72
73 2003-05-02  Charles Lepple <clepple@ghz.cc>
74             Nick Clifton <nickc@redhat.com>
75
76         * acinclude.m4: Fix name of --enable-install-libbfd switch.
77         * aclocal.m4: Regenerate.
78         * configure: Regenerate.
79         * Makefile.in: Regenerate.
80
81 2003-05-01  Alan Modra  <amodra@bigpond.net.au>
82
83         * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Test whether the
84         weakdef sym has already been adjusted before treating it specially.
85         * elf32-i386.c (elf_i386_copy_indirect_symbol): Don't copy
86         ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
87         * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
88         (ppc64_elf_check_relocs): Set ELF_LINK_NON_GOT_REF.
89
90 2003-04-28  H.J. Lu <hjl@gnu.org>
91
92         * elfxx-ia64.c (elfNN_ia64_relax_section): Relax ldxmov during
93         the relax finalize pass.
94
95         * section.c (struct sec): Add need_finalize_relax and remove
96         flag11.
97         (STD_SECTION): Update struct sec initializer.
98         * bfd-in2.h: Regenerated.
99
100 2003-04-28  H.J. Lu <hjl@gnu.org>
101
102         * elflink.h (elf_merge_symbol): Call elf_backend_copy_indirect_symbol
103         to copy any information related to dynamic linking when we flip
104         the indirection.
105
106 2003-04-27  H.J. Lu <hjl@gnu.org>
107
108         * elf-bfd.h (ELF_LINK_DYNAMIC_DEF): New.
109         (ELF_LINK_DYNAMIC_WEAK): New.
110
111         * elflink.h (elf_merge_symbol): Add one argument to indicate if
112         a symbol should be skipped. Ignore definitions in dynamic
113         objects for symbols with non-default visibility.
114         (elf_add_default_symbol): Adjusted.
115         (elf_link_add_object_symbols): Check if a symbol should be
116         skipped. Don't merge the visibility field with the one from
117         a dynamic object.
118         (elf_link_check_versioned_symbol): Use undef_bfd.
119         (elf_link_output_extsym): Warn if a forced local symbol is
120         referenced from dynamic objects. Make non-weak undefined symbol
121         with non-default visibility a fatal error.
122
123 2003-04-27  Daniel Jacobowitz  <drow@mvista.com>
124
125         * configure.in: Bump version on HEAD to 2.14.90.
126         * configure: Regenerated.
127
128 2003-04-26  Stephane Carrez  <stcarrez@nerim.fr>
129
130         PR savannah/3331:
131         * elf32-m68hc11.c (m68hc11_elf_relax_section): Clear prev_insn_group
132         when we couldn't relax something.
133
134 2003-04-25  Alan Modra  <amodra@bigpond.net.au>
135
136         * elflink.h (elf_merge_symbol): When we find a regular definition
137         for an indirect symbol, flip the indirection so that the old
138         direct symbol now points to the new definition.
139
140 2003-04-24  Roland McGrath  <roland@redhat.com>
141
142         * elf.c (bfd_section_from_phdr): Map PT_GNU_EH_FRAME to "eh_frame_hdr".
143
144 2003-04-24  Alan Modra  <amodra@bigpond.net.au>
145
146         * elf32-ppc.c: Formatting and comment fixes.
147         (ELIMINATE_COPY_RELOCS): Move before ppc_elf_copy_indirect_symbol.
148         (ppc_elf_copy_indirect_symbol): Copy flags here for weakdefs.
149
150 2003-04-24 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
151
152         * archures.c (bfd_mach_h8300hn, bfd_mach_h8300sn): Added.
153         * bfd-in2.h: Rebuilt.
154         * coff-h8300.c (BADMAG): Add check for H8300HNBADMAG & H8300SNBADMAG.
155         * coffcode.h (coff_set_arch_mach_hook): Add case for H8300HNMAGIC
156         & H8300SNMAGIC.
157         (coff_set_flags): Add case for bfd_mach_h8300hn & bfd_mach_h8300sn.
158         * cpu-h8300.c (h8300_scan): Handle h8300hn, h8300sn.
159         (h8300sn_info_struct, h8300hn_info_struct): New.
160         * elf32-h8300.c (elf32_h8_mach): Handle case for h8300hn & h8300sn
161         (elf32_h8_final_write_processing): Likewise.
162
163 2003-04-23  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
164
165         * elf32-sh.c (tpoff): New.
166         (struct elf_sh_dyn_relocs): Remove tls_tpoff32.
167         (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
168         (allocate_dynrelocs): Don't make unnecessary dynamic TLS
169         relocations.  Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses.
170         (sh_elf_relocate_section): Likewise. Remove unnecessary tests.
171         (dtpoff_base): Fix wrong indentation.
172         (sh_elf_check_relocs): Don't set DF_STATIC_TLS flag with non-TLS
173         relocations.  Don't set tls_tpoff32 flag.  Don't make unnecessary
174         R_SH_TLS_TPOFF32 relocations.
175
176 2003-04-23  J"orn Rennecke <joern.rennecke@superh.com>
177
178         * archures.c (enum bfd_architecture): Amend comment to refer to SuperH.
179         * cpu-sh.c: Likewise.
180         * elf32-sh.c: Likewise.
181         * reloc.c (bfd_reloc_code_real): Likewise.
182         * elf32-sh64-com.c: Change comment to refer to SuperH.
183         * elf32-sh64.c: Likewise.
184         * elf64-sh64.c: Likewise.
185         * bfd-in2.h (enum bfd_architecture): Regenerate.
186
187 2003-04-23  Alan Modra  <amodra@bigpond.net.au>
188
189         From Julien LEMOINE <speedblue@debian.org>
190         * elf32-i386.c (elf_i386_info_to_howto): Delete.
191         (elf_info_to_howto): Define as elf_i386_info_to_howto_rel.
192
193 2003-04-22  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.com>
194
195         * archures.c: Replace references to Mitsubishi M32R with references
196         to Renesas M32R.
197         * relocs.c: Likewise.
198         * bfd-in2.h: Regenerate.
199
200 2003-04-21  Richard Henderson  <rth@redhat.com>
201
202         * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Return false for an
203         executable when a symbol is defined both regular and dynamic.
204
205 2003-04-21  Stephane Carrez  <stcarrez@nerim.fr>
206
207         * Makefile.am (BFD32_BACKENDS): Add elf32-m68hc1x.lo.
208         (elf32-m68hc1x.lo): Update dependencies
209         * configure.in: Add elf32-m68hc1x.lo.
210         * configure: Rebuild.
211         * Makefile.in: Rebuild.
212
213 2003-04-21  Stephane Carrez  <stcarrez@nerim.fr>
214
215         * elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
216         (m68hc11_elf_hash_table_create): New function.
217         (elf32_m68hc11_link_hash_table_free): New function.
218         (stub_hash_newfunc): New function.
219         (m68hc11_add_stub): New function.
220         (elf32_m68hc11_add_symbol_hook): New function.
221         (elf32_m68hc11_setup_section_lists): New function.
222         (elf32_m68hc11_next_input_section): New function.
223         (elf32_m68hc11_size_stubs): New function.
224         (elf32_m68hc11_build_stubs): New function.
225         (m68hc11_get_relocation_value): New function.
226         (elf32_m68hc11_relocate_section): Call the above to redirect
227         some relocations to the trampoline code.
228         (m68hc11_elf_export_one_stub): New function.
229         (m68hc11_elf_set_symbol): New function.
230         (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse.
231         (m68hc11_elf_get_bank_parameters): Get parameters only when the info
232         is not yet initialized.
233
234         * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
235         (elf32_m68hc11_stub_hash_entry): New struct.
236         (m68hc11_page_info): Add trampoline handler address.
237         (m68hc11_elf_link_hash_table): Add stubs generation members.
238         (elf32_m68hc11_add_symbol_hook): Declare.
239         (elf32_m68hc11_setup_section_lists): Declare.
240         (elf32_m68hc11_size_stubs): Declare.
241         (elf32_m68hc11_build_stubs): Declare.
242
243         * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c.
244         (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise.
245         (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto.
246         (_bfd_m68hc11_elf_set_private_flags): Ditto.
247         (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto.
248         (_bfd_m68hc11_elf_print_private_bfd_data): Ditto.
249         (bfd_elf32_bfd_link_hash_table_create): Define.
250         (elf_backend_add_symbol_hook): Define.
251         (m68hc11_elf_bfd_link_hash_table_create): New function.
252         (m68hc11_elf_build_one_stub): New function.
253         (m68hc11_elf_size_one_stub): New function.
254         (m68hc11_elf_bfd_link_hash_table_create): Install the above.
255         (bfd_elf32_bfd_link_hash_table_create): Define.
256
257         * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove.
258         (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked.
259         (m68hc12_phys_addr): Ditto.
260         (m68hc12_phys_page): Ditto.
261         (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c.
262         (elf32_m68hc11_gc_mark_hook): Likewise.
263         (elf32_m68hc11_gc_sweep_hook): Likewise.
264         (elf32_m68hc11_check_relocs): Likewise.
265         (elf32_m68hc11_relocate_section): Likewise.
266         (_bfd_m68hc12_elf_set_private_flags): Likewise.
267         (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise.
268         (_bfd_m68hc12_elf_print_private_bfd_data): Likewise.
269         (m68hc12_elf_build_one_stub): New function.
270         (m68hc12_elf_size_one_stub): New function.
271         (m68hc12_elf_bfd_link_hash_table_create): New function, use the above.
272         (elf_backend_add_symbol_hook): Define.
273         (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
274
275 2003-04-18  Nick Clifton  <nickc@redhat.com>
276
277         * format.c (bfd_check_format_matches): Only check associated
278         vector if the matching_vector has been created.
279
280 2003-04-15  Alexandre Oliva  <aoliva@redhat.com>
281
282         * dwarf2.c (_bfd_dwarf2_find_nearest_line): Fix typo in
283         2003-04-09's change.
284
285 2003-04-15  Brian Ford  <ford@vss.fsi.com>
286
287         * peicode.h (coff_swap_scnhdr_in): If a section holds
288         uninitialized data and is from an object file or from an
289         executable image that has not initialized the s_size field, or if
290         the physical size is padded, use the virtual size (stored in
291         s_paddr) instead.
292
293 2003-04-15  H.J. Lu <hjl@gnu.org>
294
295         * elflink.h (elf_link_add_object_symbols): Properly report
296         filename for alignment reduction.
297
298 2003-04-15  Rohit Kumar Srivastava <rohits@kpitcummins.com>
299
300         * archures.c: Replace occurrances of 'Hitachi' with 'Renesas'.
301         * reloc.c: Likewise.
302         * coff-h8300.c: Likewise.
303         * coff-h8500.c: Likewise.
304         * coff-sh.c: Likewise.
305         * cpu-h8300.c: Likewise.
306         * cpu-sh.c: Likewise.
307         * elf32-h8300.c: Likewise.
308         * elf32-sh.c: Likewise.
309         * elf32-sh64-com.c: Likewise.
310         * elf32-sh64.c: Likewise.
311         * elf64-sh64.c: Likewise.
312         * bfd-in2.h: Regenerate.
313
314 2003-04-14  H.J. Lu <hjl@gnu.org>
315
316         * elflink.h (elf_link_add_object_symbols): Maintain maximum
317         alignment for common symbols. Warn reducing alignment for
318         common symbols. Report old filename when symbol size changes.
319
320 2003-04-12  Alexandre Oliva  <aoliva@redhat.com>
321
322         * elfxx-mips.c (mips_elf_calculate_relocation): Adjust two other
323         occurrences of the same test changed in the previous patch.
324         Optimize.
325
326 2003-04-11  Alexandre Oliva  <aoliva@redhat.com>
327
328         * elfxx-mips.c (mips_elf_get_global_gotsym_index): New.
329         (mips_elf_calculate_relocation): Decay GOT_PAGE/GOT_OFST to
330         GOT_DISP/addend only if the symbol got a global GOT entry.
331
332 2003-04-10  Alexandre Oliva  <aoliva@redhat.com>
333
334         * elfxx-mips.c (mips_elf_calculate_relocation): Decay
335         GOT_PAGE/GOT_OFST referencing overridable symbol to
336         GOT_DISP/addend.
337         (_bfd_mips_elf_check_relocs): Handle GOT_PAGE referencing
338         global symbol as GOT_DISP.
339
340 2003-04-10  Bob Wilson  <bob.wilson@acm.org>
341
342         * elf32-xtensa.c (elf_xtensa_relocate_section): Don't continue to the
343         next relocation on an undefined symbol.
344
345 2003-04-09  Richard Henderson  <rth@redhat.com>
346
347         * elf64-alpha.c (elf64_alpha_relocate_section) <R_ALPHA_GPREL32>:
348         Ignore relocations against r_symndx == 0.
349
350 2003-04-09  H.J. Lu <hjl@gnu.org>
351
352         * elf64-alpha.c (elf64_alpha_relocate_section): Don't return
353         FALSE for undefined symbols.
354         * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
355
356 2003-04-09  Alexandre Oliva  <aoliva@redhat.com>
357
358         * dwarf2.c (_bfd_dwarf2_find_nearest_line): Try DWARF3-standard
359         and IRIX-specific shift-to-64-bit 4-byte lengths before following
360         addr_size.
361
362 2003-04-08  Alexandre Oliva  <aoliva@redhat.com>
363
364         * elf32-mips.c (bfd_elf32_bfd_reloc_type_lookup): Detect (ctor)
365         pointer size from ABI, not arch_bits_per_address.
366
367 2003-04-07  Kevin Buettner  <kevinb@redhat.com>
368
369         * elfn32-mips.c (elf32_mips_grok_prstatus): Adjust core file related
370         constants for n32 ABI.
371
372 2003-04-06  Andrew Cagney  <cagney@redhat.com>
373
374         * simple.c (bfd_simple_get_relocated_section_contents): Disable
375         free that leads to GDB vs BFD memory corruption.
376
377 2003-04-04  Stephane Carrez  <stcarrez@nerim.fr>
378
379         * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Also adjust
380         symbols that mark the end of the section.
381         (m68hc11_elf_relax_section): Use R_M68HC11_PCREL_8 relocs when
382         converting to a relative branch so that the offset is computed after
383         the relaxation; also relocate a jsr into a bsr if possible but don't
384         relax them if they are to a far symbol as we need to call the
385         trampoline code.
386         (elf_m68hc11_howto_table): Set pcrel_offset to true.
387
388 2003-04-04  Svein E. Seldal  <Svein.Seldal@solidas.com>
389
390         * archures.c: Namespace cleanup. Rename bfd_mach_c3x to
391         bfd_mach_tic3x and bfd_mach_c4x to bfd_mach_tic4x
392         * bfd-in2.h: Regenerate
393         * coff-tic4x.c: Namespace cleanup. Replace s/c4x/tic4x/
394         * cpu-tic4x.c: Ditto
395
396 2003-04-03  Nick Clifton  <nickc@redhat.com>
397
398         * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Compute ps and ss
399         differently for object files and executables.
400         * peicode.h (coff_swap_scnhdr_in): Only set the s_size field
401         for object files or for executables who have not already
402         initialised the field.
403         * libpei.h (bfd_pe_executable_p): New macro.  Return true if
404         the PE format bfd is an executable.
405
406 2003-04-03  Alan Modra  <amodra@bigpond.net.au>
407
408         * elf32-ppc.c (ppc_elf_check_relocs): Don't use SYMBOL_REFERENCES_LOCAL
409         here as it's too early to reliably determine locality.
410         (ppc_elf_gc_sweep_hook): Likewise.
411         (SYMBOL_REFERENCES_LOCAL): Expand comment.
412
413 2003-04-02  Bob Wilson  <bob.wilson@acm.org>
414
415         * xtensa-modules.c: Remove comment indicating that this is a
416         generated file.
417
418 2003-04-02  Alan Modra  <amodra@bigpond.net.au>
419
420         * elfxx-mips.c (_bfd_mips_elf_hide_symbol): Test for NULL dynobj.
421
422 2003-04-01  Bob Wilson  <bob.wilson@acm.org>
423
424         * Makefile.am (ALL_MACHINES): Add cpu-xtensa.lo.
425         (ALL_MACHINES_CFILES): Add cpu-xtensa.c.
426         (BFD32_BACKENDS): Add elf32-xtensa.lo, xtensa-isa.lo, and
427         xtensa-modules.lo.
428         (BFD32_BACKENDS_CFILES): Add elf32-xtensa.c, xtensa-isa.c, and
429         xtensa-modules.c.
430         (cpu-xtensa.lo): New target.
431         (elf32-xtensa.lo): Likewise.
432         (xtensa-isa.lo): Likewise.
433         (xtensa-modules.lo): Likewise.
434         * Makefile.in: Regenerate.
435         * archures.c (bfd_architecture): Add bfd_{arch,mach}_xtensa.
436         (bfd_archures_list): Add bfd_xtensa_arch.
437         * config.bfd: Handle xtensa-*-*.
438         * configure.in: Handle bfd_elf32_xtensa_{le,be}_vec.
439         * configure: Regenerate.
440         * reloc.c: Add BFD_RELOC_XTENSA_{RTLD,GLOB_DAT,JMP_SLOT,RELATIVE,
441         PLT,OP0,OP1,OP2,ASM_EXPAND,ASM_SIMPLIFY}.
442         * targets.c (bfd_elf32_xtensa_be_vec): Declare.
443         (bfd_elf32_xtensa_le_vec): Likewise.
444         (bfd_target_vector): Add bfd_elf32_xtensa_{be,le}_vec.
445         * cpu-xtensa.c: New file.
446         * elf32-xtensa.c: Likewise.
447         * xtensa-isa.c: Likewise.
448         * xtensa-modules.c: Likewise.
449         * libbfd.h: Regenerate.
450         * bfd-in2.h: Likewise.
451
452 2003-04-01  Nick Clifton  <nickc@redhat.com>
453
454         * archures.c (bfd_mach_arm_unknown): Define.
455         * bfd-in.h (bfd_arm_merge_machines, bfd_arm+update_notes,
456         bfd_arm_get_mach_from_notes): Prototype.
457         * bfd-in2.h: Regenerate.
458         * coff-arm.c (coff_arm_merge_private_bfd_data): Call
459         bfd_arm_merge_machines.
460         (coff_arm_final_link_postscript): Call bfd_arm_update_notes.
461         * coffcode.h (coff_set_arch_mach_hook): Call
462         bfd_arm_get_mach_from_notes.
463         * coffgen.c (coff_real_object_p): Revert previous delta.
464         * cpu_arm.c (arm_check_note): New function.  Examine a note in a
465         .note section.
466         (bfd_arm_merge_machines): New function: Handle the merging of ARM
467         binaries compiled for different architectures..
468         (bfd_arm_update_notes): New function: Update an ARM note section.
469         (bfd_arm_get_mach_from_notes): New function: Extract a bfd machine
470         number from an ARM note section.
471         * elf32-arm.h (elf32_arm_object_p): Use
472         bfd_arm_get_mach_from_notes.
473         (elf32_arm_merge_private_bfd_data): Use bfd_arm_merge_machines.
474         (elf32_arm_final_write_processing): Use bfd_arm_update_notes.
475
476 2003-04-01  Ben Elliston  <bje@wasabisystems.com>
477
478         * dwarf2.c (read_attribute_value): Correct typo in comment.
479
480 2003-04-01  Nick Clifton  <nickc@redhat.com>
481
482         * dwarf2.c (concat_filename): Use bfd_malloc() and strdup()
483         instead of concat().
484         (decode_line_info): Only free filename if it is not NULL.
485         (add_line_info): Make a copy of the filename when storing it into
486         the info structure.
487
488 2003-03-31  Andreas Schwab  <schwab@suse.de>
489             Daniel Jacobowitz  <drow@mvista.com>
490
491         * simple.c (bfd_simple_get_relocated_section_contents): Add
492         parameter symbol_table.  Optionally use it instead of the symbol
493         table from the bfd.  Save and restore output offsets and output
494         sections  around bfd_get_relocated_section_contents.  Fix a memory
495         leak.
496         (simple_save_output_info, simple_restore_output_info): New
497         functions.
498         * bfd-in2.h: Regenerate.
499         * dwarf2.c (read_abbrevs): Use
500         bfd_simple_get_relocated_section_contents instead of
501         bfd_get_section_contents.
502         (decode_line_info): Likewise.
503         (_bfd_dwarf2_find_nearest_line): Likewise.  Don't call
504         find_rela_addend.
505         (find_rela_addend): Remove.
506         * elfxx-ia64.c (elfNN_ia64_reloc): Weaken sanity check for
507         debugging sections.
508         (elfNN_ia64_hash_table_create): Create the hash table with malloc,
509         not bfd_zalloc.
510
511 2003-03-31  David Heine  <dlheine@suif.stanford.edu>
512
513         * aoutx.h (aout_link_hash_table_create): Use bfd_malloc instead of
514         bfd_alloc.
515         * dwarf2.c (concat_filename): Always allocate space for the
516         returned filename.
517         (decode_line_info): Free the allocated filename returned by
518         concat_filename.
519         * elf-eh-frame.c (bfd_elf_write_section_eh_frame): Fix memory leaks.
520         * elf.c (copy_private_bfd_data): Likewise.
521         (_bfd_elf_slurp_version_tables): Fix bug freeing contents pointer.
522         * elflink.h (elf_link_sort_relocs): Fix memory leak.
523         * format.c (bfd_check_format_matches): Likewise.
524         * linker.c (bfd_generic_final_link): Likewise.
525         * opncls.c (find_separate_debug_info): Likewise.
526         * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
527
528 2003-03-28  H.J. Lu <hjl@gnu.org>
529
530         * elflink.h (elf_link_add_object_symbols): Correctly combine
531         visibilities.
532
533 2003-03-27  Jakub Jelinek  <jakub@redhat.com>
534
535         * elfxx-ia64.c (elfNN_ia64_relax_section): Reset self_dtpmod_offset
536         to -1 before recomputing got offsets.
537
538 2003-03-26  Andreas Schwab  <schwab@suse.de>
539
540         * elf32-m68k.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
541         (elf_m68k_relocate_section): Use it to correctly handle symbols
542         forced to be local.
543         (elf_m68k_finish_dynamic_symbol): Emit RELATIVE reloc for got
544         entries for symbols that are forced to be local.
545
546 2003-03-25  Alexandre Oliva  <aoliva@redhat.com>
547
548         * elfxx-mips.c (_bfd_mips_relax_section): New function.
549         * elfxx-mips.h (_bfd_mips_relax_section): Declare.
550         * elfn32-mips.c, elf64-mips.c: Use it.
551
552 2003-03-25  Stan Cox   <scox@redhat.com>
553             Nick Clifton  <nickc@redhat.com>
554
555         Contribute support for Intel's iWMMXt chip - an ARM variant:
556
557         * archures.c: Add bfd_mach_arm_iWMMXt.
558         * reloc.c: Add BFD_RELOC_ARM_CP_OFF_IMM_S2.
559         * bfd-in2.h: Regenerate.
560         * libbfd.h: Regenerate.
561         * coff-arm.c (coff_arm_merge_private_bfd_data): Allow iWMMXt
562         object files to be linked with XScale ones.
563         (coff_arm_final_link_postscript): Update note section.
564         * coffcode.h (coff_set_arch_mach_hook): Handle note section.
565         * coffgen.c (coff_real_object_p): Call bfd_coff_set_arch_mach_hook
566         after identifying a coff binary.
567         * cpu-arm.c (processors): Add iWMMXt.
568         (arch_inf): Likewise.
569         * elf32-arm.h (arm_object_p): Handle note section.
570         (elf32_arm_merge_private_bfd_data):  Allow iWMMXt object files to
571         be linked with XScale ones.
572         (elf32_arm_section_flags): New function: Set flags on note section.
573         (elf32_arm_final_write_processing): Handle note section.
574
575 2003-03-21  DJ Delorie  <dj@redhat.com>
576
577         * elf32-xstormy16.c (elf32_xstormy16_relocate_section): Call
578         _bfd_elf_rela_local_sym.
579
580 2003-03-20  H.J. Lu <hjl@gnu.org>
581
582         * elfxx-ia64.c (elfNN_ia64_relax_section): Don't try relax for
583         non-ELF outputs.
584
585 2003-03-20  Nick Clifton  <nickc@redhat.com>
586
587         * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Initialise $idata2 and
588         $idata5 in case bfd_coff_final_link is not called.
589
590 2003-03-19  Jakub Jelinek  <jakub@redhat.com>
591
592         * elf64-sparc.c (struct sparc64_elf_section_data): Add reloc_count
593         field.
594         (canon_reloc_count): Define.
595         (sparc64_elf_slurp_one_reloc_table, sparc64_elf_slurp_reloc_table,
596         sparc64_elf_canonicalize_dynamic_reloc): Use it instead of
597         reloc_count.
598         (sparc64_elf_canonicalize_reloc): New routine.
599         (bfd_elf64_canonicalize_reloc): Define.
600
601 2003-03-18  Jakub Jelinek  <jakub@redhat.com>
602
603         * elfxx-ia64.c (elfNN_ia64_relax_section): Handle relaxation
604         againt mergeable sections.  Take r_addend into account when caching
605         trampolines.
606
607 2003-03-18  Richard Henderson  <rth@redhat.com>
608
609         * elfxx-ia64.c (get_dyn_sym_info): Return NULL gracefully for
610         local symbols that have no dyninfo.
611
612 2003-03-14  Gene Smith  <gene.smith@siemens.com>
613
614         * ieee.c (ieee_write_expression): Handle the case where symbol is
615         NULL.
616         General formatting improvements.
617
618 2003-03-13  Nick Clifton  <nickc@redhat.com>
619
620         * configure.in (LINGUAS): Add zh_CN.
621         * configure: Regenerate.
622         * po/zh_CN.po: New file.
623
624 2003-03-13  Elias Athanasopoulos  <elathan@phys.uoa.gr>
625
626         * aout-cris.c (BYTES_IN_WORD): Don't define.
627         aout-encap.c: Likewise.
628         aout-ns32k.c: Likewise.
629         aout-tic30.c: Likewise.
630         hp300bsd.c: Likewise.
631         i386aout.c: Likewise.
632         i386dynix.c: Likewise.
633         i386linux.c: Likewise.
634         i386lynx.c: Likewise.
635         i386mach3.c: Likewise.
636         m68k4knetbsd.c: Likewise.
637         m68klinux.c: Likewise.
638         m68klynx.c: Likewise.
639         m68knetbsd.c: Likewise.
640         m88kmach3.c: Likewise.
641         mipsbsd.c: Likewise.
642         newsos3.c: Likewise.
643         sparclinux.c: Likewise.
644         sparclynx.c: Likewise.
645         sparcnetbsd.c: Likewise.
646         vaxbsd.c: Likewise. Fix comment formatting.
647
648 2003-03-12  Alexandre Oliva  <aoliva@redhat.com>
649
650         * Reverted 2003-03-02's patch.
651
652         * elfxx-target.h (bfd_elfNN_canonicalize_reloc): Make it
653         overridable.
654         * elf64-mips.c (mips_elf64_canonicalize_reloc,
655         mips_elf64_get_dynamic_reloc_upper_bound,
656         mips_elf64_canonicalize_dynamic_reloc): New, adapted from elf.c.
657         (bfd_elf64_get_canonicalize_reloc,
658         bfd_elf64_get_dynamic_reloc_upper_bound,
659         bfd_elf64_canonicalize_dynamic_reloc): Define.
660         (mips_elf64_slurp_reloc_table): Support dynamic.
661         (mips_elf64_slurp_one_reloc_table): Adjust.
662
663 2003-03-12  Nick Clifton  <nickc@redhat.com>
664
665         * xsym.c (bfd_sym_fetch_type_information_table_entry): Change
666         'index' to 'offset' in test for zero value.
667
668 2003-03-11  Alexandre Oliva  <aoliva@redhat.com>
669
670         * elfxx-mips.c (mips_elf_create_dynamic_relocation): Do not create
671         dynamic relocations pointing to local or section symbols, use the
672         NULL symbol instead.  Document the choice to not emit an
673         additional R_MIPS_64 relocation.
674
675 2003-03-11  Alan Modra  <amodra@bigpond.net.au>
676
677         * elf32-ppc.c (ppc_elf_relocate_section): Subtract tls seg vma from
678         zero index dynamic tls relocs generated for the GOT.  Tidy code.
679         Set "relocation" to 1 on DTPMOD32 relocs.  Optimize HA adjustment.
680         * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
681
682 2003-03-07  Alan Modra  <amodra@bigpond.net.au>
683
684         * elf32-ppc.c (ppc_elf_relocate_section): Don't look for a nop after
685         a tls_get_addr call.
686
687         * elf32-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
688         (ppc_elf_adjust_dynamic_symbol): For weak symbols, copy
689         ELF_LINK_NON_GOT_REF from weakdef.
690         * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
691         (ppc64_elf_adjust_dynamic_symbol): For weak symbols, copy
692         ELF_LINK_NON_GOT_REF from weakdef.
693         * elf32-i386.c (ELIMINATE_COPY_RELOCS): Define as one.  Use throughout.
694         (elf_i386_adjust_dynamic_symbol): For weak symbols, copy
695         ELF_LINK_NON_GOT_REF from weakdef.
696
697 2003-03-06  Jakub Jelinek <jakub@redhat.com>
698         Andrew Haley  <aph@redhat.com>
699
700         * elflink.h (elf_bfd_discard_info): Don't process eh frames if
701         output is relocateable.
702
703 2003-03-06  Steven Konopa <skonopa@kgo.csc.com>
704
705         * som.c (som_fixup_formats): Correct formats for R_AUX_UNWIND and
706         R_COMMENT.
707
708 2003-03-06  Alan Modra  <amodra@bigpond.net.au>
709
710         * elf32-ppc.c (ppc_elf_create_linker_section): Don't capitalize
711         error messages.
712         (ELIMINATE_COPY_RELOCS): Define to zero.
713         (ppc_elf_relocate_section): Don't deref htab->tls_sec when calculating
714         TLSLD relocs.  Report reloc types on a number of errors.  Optimize
715         LOCAL24PC check for non-local syms.  Don't capitalize error messages.
716         * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define to zero.
717         (ppc64_elf_relocate_section): Don't deref htab->tls_sec when
718         calculating TLSLD relocs.  Report reloc types on a number of errors.
719         Don't capitalize error messages.
720
721 2003-03-03  H.J. Lu <hjl@gnu.org>
722
723         * elfxx-ia64.c (USE_BRL): Removed.
724         (oor_ip): Removed.
725
726 2003-03-03  J"orn Rennecke <joern.rennecke@superh.com>
727
728         * elf32-sh.c (sh_elf_howto_tab): Make R_SH_IND12W into an ordinary
729         relocation (no special function), and make it non-partial_inplace.
730         (sh_elf_relax_section): When creating a bsr, use a consistent value
731         no matter if the symbol is extern or not;  set addend to -4.
732         Don't swap load / non-load instructions for SH4.
733         (sh_elf_relax_delete_bytes): In R_SH_IND12W case, check the offset
734         rather than if the symbol is external to determine if adjusting the
735         offset makes sense.  Adjust the addend too if appropriate.
736         (sh_elf_relocate_section): In R_SH_IND12W, don't fiddle with the
737         relocation.
738
739 2003-03-03  Nick Clifton  <nickc@redhat.com>
740
741         * po/da.po: Installed latest translation.
742
743 2003-03-02  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
744
745         * elf32-mips.c (elf_mips_howto_table_rel): Change definition of
746         R_MIPS_PC16 to rightshift 2.
747         (elf_reloc_map mips_reloc_map): Map to rightshifted BFD reloc.
748         (bfd_elf32_bfd_reloc_type_lookup): Support
749         BFD_RELOC_MIPSEMB_16_PCREL_S2.
750         * elf64-mips.c (mips_elf64_howto_table_rel): Change definition of
751         R_MIPS_PC16 to rightshift 2.
752         (mips_elf64_howto_table_rela): Likewise.
753         (mips_reloc_map): Map to rightshifted BFD reloc.
754         * elfn32-mips.c: The same as in elf64-mips.c.
755         * elfxx-mips.c (mips_elf_got_for_ibfd): Typo in comment.
756         (mips_elf_calculate_relocation): Handle rightshifted addends for
757         R_MIPS_PC16.
758         * reloc.c (BFD_RELOC_MIPSEMB_16_PCREL_S2): New BFD relocation for
759         MIPS Embedded PIC. Remove superfluous empty COMMENT.
760         * libbfd.h: Regenerate.
761         * bfd-in2.h: Regenerate.
762
763 2003-02-28  Richard Henderson  <rth@redhat.com>
764
765         * elfxx-ia64.c (elfNN_ia64_relax_section): Correct bounds
766         for ltoff22x relaxation.
767
768 2003-03-01  Alan Modra  <amodra@bigpond.net.au>
769
770         * bfd-in.h (_bfd): Don't define.
771         * bfd.c: Rename occurrences of "struct _bfd" to "struct bfd".
772         * syms.c: Likewise.
773         * bfd-in2.h: Regenerate.
774
775 2003-02-27  Richard Henderson  <rth@redhat.com>
776
777         * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add want_gotx;
778         (elfNN_ia64_check_relocs): Set it.
779         (allocate_global_data_got): Check it.
780         (allocate_local_got): Likewise.
781         (allocate_dynrel_entries): Likewise.
782         (elfNN_ia64_relax_ldxmov): New.
783         (elfNN_ia64_relax_section): Handle LTOFF22X, LDXMOV.
784         (elfNN_ia64_choose_gp): Split out from ...
785         (elfNN_ia64_final_link): ... here.
786
787 2003-02-27  Andrew Cagney  <cagney@redhat.com>
788
789         * bfd.c (struct bfd): Rename "struct _bfd".
790         * bfd-in.h: Update copyright.
791         (struct bfd): Rename "struct _bfd".
792         (_bfd): Define for backward compatibility.
793         * bfd-in2.h: Regenerate.
794
795 2003-02-25  Alan Modra  <amodra@bigpond.net.au>
796
797         * elflink.h (elf_bfd_final_link): Apportion reloc counts to rel_hdr
798         and rel_hdr2 when initially counting input relocs rather than after
799         creating output reloc sections.
800         (elf_link_read_relocs_from_section): Don't abort with wrong reloc
801         sizes.
802
803         * Makefile.am: Run "make dep-am".
804         * Makefile.in: Regenerate.
805
806 2003-02-24  Kris Warkentin  <kewarken@qnx.com>
807
808         * elf.c (elfcore_read_notes): Add check for QNX style core file.
809         (elfcore_grog_nto_note): New function.
810         (elfcore_grog_nto_gregs): New function.
811         (elfcore_grog_nto_status): New function.
812
813 2003-02-24  Alan Modra  <amodra@bigpond.net.au>
814
815         * elflink.c (_bfd_elf_create_got_section): Check existing .got
816         section flags before concluding that we've already been called.
817         Don't use register keyword.
818         (_bfd_elf_create_dynamic_sections): Don't use register keyword.
819         (_bfd_elf_create_linker_section): Formatting.
820
821 2003-02-20  jmc  <jmc@prioris.mini.pw.edu.pl>
822
823         * coff-h8300.c: Fix typo: intial -> initial.
824         * coff-ppc.c: Likewise.
825
826 2003-02-20  Alan Modra  <amodra@bigpond.net.au>
827
828         * elf32-ppc.c: Formatting.
829         (allocate_dynrelocs): LD and GD relocs against the same sym need
830         separate GOT entries.
831         (ppc_elf_relocate_section): Correct GOT handling for multiple GOT
832         entries per symbol.
833
834 2003-02-19  Alan Modra  <amodra@bigpond.net.au>
835
836         * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Simplify dynamic reloc
837         removal.  Localize vars.  Remove unnecessary dynobj test.
838         * elf32-i386 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead
839         of INFO.
840         (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
841         and optimize.
842         (elf_i386_relocate_section): Likewise.
843         (elf_i386_gc_sweep_hook): Simplify dyn reloc removal.  Localize vars.
844         * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
845         * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
846         * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
847         * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
848         * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise.  Remove
849         local_dynrel for section too.  Don't touch HIPLT22, LOPLT10, PCPLT32
850         or PCPLT10 relocs.  Don't subtract twice on PLT32 relocs.
851         Formatting.
852
853         * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define.
854         (ppc64_elf_check_relocs): Use it.  Correct comment.  Move SEC_ALLOC
855         test.
856         (ppc64_elf_adjust_dynamic_symbol): Use ELIMINATE_COPY_RELOCS.
857         (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
858         (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
859         and optimize.  Use ELIMINATE_COPY_RELOCS.
860         (ppc64_elf_relocate_section): Likewise.
861
862         * elf32-ppc.c (struct ppc_elf_dyn_relocs): Add pc_count field.
863         (ppc_elf_copy_indirect_symbol): Copy pc_count field.
864         (ELIMINATE_COPY_RELOCS): Define.
865         (ppc_elf_adjust_dynamic_symbol): Convert copy relocs to dynamic.
866         (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
867         (MUST_BE_DYN_RELOC): Define.
868         (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
869         and optimize.  Trim dyn_relocs.
870         (ppc_elf_check_relocs): Don't generate dyn_relocs when we know they'll
871         not be used.  Do generate dyn_relocs for copy reloc avoidance.  Keep
872         track of pc_rel dyn relocs.
873         (ppc_elf_relocate_section): Remove "will_become_local".  Adjust
874         WILL_CALL_FINISH_DYNAMIC_SYMBOL use.  Trim dyn relocs as per
875         allocate_dynrelocs.  Don't recalculate "sec".
876
877 2003-02-18  Alan Modra  <amodra@bigpond.net.au>
878
879         * elf32-ppc.c (ppc_elf_relocate_section): Remove unnecessary test.
880         * elf64-ppc.c (ppc64_elf_tls_optimize): Decrement tlsld_got.refcount
881         on invalid LD relocs.
882         (allocate_dynrelocs): Invalid LD relocs don't use tlsld_got entry.
883         (ppc64_elf_relocate_section): Unify new handling of LD relocs and
884         tlsld_got entry.  Use IS_PPC64_TLS_RELOC.
885
886         * elf32-ppc.h: New file.
887         * elf32-ppc.c: Include elf32-ppc.h.
888         (NOP, CROR_151515, CROR_313131, TP_OFFSET, DTP_OFFSET): Define.
889         (struct ppc_elf_link_hash_entry): Rename "root" to "elf".  Adjust uses.
890         Add "tls_mask" field.
891         (TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL, TLS_TLS, TLS_TPRELGD): Define.
892         (struct ppc_elf_link_hash_table): Rename "root" to "elf".  Adjust uses.
893         Add got, relgot, plt, relplt, dynbss, relbss, dynsbss, relsbss,
894         sdata, sdata2, tls_sec, tls_get_addr, tlsld_got fields.
895         Make use of htab shortcuts throughout file.
896         (ppc_elf_link_hash_newfunc): Init tls_mask field.
897         (ppc_elf_link_hash_table_create): Init new fields.
898         (ppc_elf_copy_indirect_symbol): Copy tls_mask.
899         (ppc_elf_howto_raw): Add tls relocs.
900         (ppc_elf_reloc_type_lookup): Handle them.
901         (ppc_elf_unhandled_reloc): New function.
902         (ppc_elf_create_got): Stash got section pointer in hash table,
903         return status.  Make .rela.got too.
904         (ppc_elf_create_dynamic_sections): Stash section pointers in htab.
905         (ppc_elf_adjust_dynamic_symbol): Only set up copy relocs when
906         NON_GOT_REF set.  Don't allocate space in .plt here..
907         (allocate_dynrelocs): ..do so here instead, properly ref-counting and
908         not allocating plt entries unnecessarily.  Allocate got entries here.
909         (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
910         (ppc_elf_size_dynamic_sections): Allocate local got entries.  Pass
911         "info" during allocate_dynrelocs hash traversal.  Use htab section
912         shortcuts rather than searching for named sections.  Get rid of
913         "plt" and "strip" booleans.
914         (update_local_sym_info, bad_shared_reloc): New functions.
915         (ppc_elf_check_relocs): Handle TLS relocs.  Move .rela.got creation to
916         ppc_elf_create_got.  Don't mark got or plt reloc syms dynamic, do so
917         in allocate_dynreloc.  Use update_local_sym_info and bad_shared_reloc.
918         Disallow R_PPC_EMB_RELSDA, R_PPC_EMB_NADDR32, R_PPC_EMB_NADDR16,
919         R_PPC_EMB_NADDR16_LO, R_PPC_EMB_NADDR16_HI and R_PPC_EMB_NADDR16_HA
920         in shared libs.  R_PPC_PLTREL32 is a plt reloc too.  Refcount all
921         relocs that might use a plt entry.  Set NON_GOT_REF too.
922         Enumerate all do-nothing relocs.
923         (ppc_elf_gc_sweep_hook): Simplify removal of dynrelocs.  Handle
924         tls relocs and all plt relocs.
925         (ppc_elf_tls_setup, ppc_elf_tls_optimize): New functions.
926         (ppc_elf_finish_dynamic_symbol): Don't build got entries here.
927         (ppc_elf_finish_dynamic_sections): Rewrite tag code using htab
928         shortcuts.
929         (ppc_elf_relocate_section): Tidy.  Handle TLS relocs.  Use
930         bfd_elf_local_sym_name.  Simplify unresolved reloc code.  Build got
931         entries and got relocs here.  Warn on non-zero got reloc addend.
932         Split out branch taken/not taken reloc code into a separate switch
933         and correct offset calculation. Allow BRTAKEN/BRNTAKEN dynamic relocs.
934         Split out HA reloc adjustments to separate switch statement.  Don't
935         warn on reloc overflow if we've already warned about undefined.
936         Don't rebuild sym name when reporting errors.  Report all possible
937         errors from _bfd_final_link_relocate.
938         (bfd_elf32_bfd_final_link): Don't define.
939
940 2003-02-18  Alan Modra  <amodra@bigpond.net.au>
941
942         * elf64-ppc.c (ppc64_elf_relocate_section): Don't init "r".  Don't
943         rebuild sym name when reporting errors.
944
945 2003-02-17  Nick Clifton  <nickc@redhat.com>
946
947         * elflink.h (elf_link_output_extsym): Only check
948         allow_shlib_undefined for shared libraries.
949         * elf32-i386.c (elf_i386_relocate_section): Remove bogus check
950         of allow_shlib_undefined.
951         * elf32-cris.c (cris_elf_relocate_section): Likewise.
952         * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
953         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
954         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
955         * elf32-s390.c (elf_s390_relocate_section): Likewise.
956         * elf32-sh.c (sh_elf_relocate_section): Likewise.
957         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
958         * elf32-vax.c (elf_vax_relocate_section): Likewise.
959         * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
960         * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
961         * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
962         * elf64-s390.c (elf_s390_relocate_section): Likewise.
963         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
964         * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
965         * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
966         * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
967
968 2003-02-17  Nick Clifton  <nickc@redhat.com>
969
970         * elf.c (SEGMENT_AFTER_SEGMENT): Add third parameter - the
971         address field to use in the comparison.
972         (SEGMENT_OVERLAPS): Check that LMAs overlap as well.
973
974 2003-02-14  Bob Wilson  <bob.wilson@acm.org>
975
976         * elfcore.h (elf_core_file_p): Compare alternate machine codes for ELF
977         backends when checking if the generic ELF target should be used.
978
979         * syms.c (_bfd_stab_section_find_nearest_line): For line number stabs
980         outside of functions, treat values as absolute addresses.
981
982         * bfd.c: Change embedded documentation to use consistent indentation
983         and to split up long lines.  Change informal style of description
984         for functions lacking real documentation.
985         * coffcode.h: Break up long lines in embedded documentation.
986         * format.c: Likewise.
987         * targets.c: Likewise.
988         * libcoff.h: Regenerate.
989         * bfd-in2.h: Regenerate.
990
991 2003-02-14  Alan Modra  <amodra@bigpond.net.au>
992
993         * elf64-ppc.c (ppc64_elf_link_hash_table_create): Init tls_get_addr.
994         (ppc64_elf_copy_indirect_symbol): Merge tls_mask too.
995         (ppc64_elf_gc_sweep_hook): Simplify removal of dyn_relocs.
996         (allocate_dynrelocs): Don't treat undefined and undefweak specially.
997         (ppc_size_one_stub): Fix warning, and tighten plt entry check.
998         (group_sections): Don't share a stub section if stubs are for a large
999         section.  Adjust comment.
1000         (ppc64_elf_size_stubs): Roughly double the size left for stubs if
1001         !stubs_always_before_branch.
1002         (ppc64_elf_relocate_section): Initialize tlsld GOT entry once.  Don't
1003         treat undefined and undefweak specially when processing dyn relocs.
1004
1005 2003-02-13  Jakub Jelinek  <jakub@redhat.com>
1006
1007         * elflink.h (elf_link_add_object_symbols): Handle .symver x, x@FOO.
1008
1009 2003-02-13  Nick Clifton  <nickc@redhat.com>
1010
1011         * elf32-arm.h (elf32_thumb_to_arm_stub): Include section VMAs
1012         in computation of offset to insert into BL instruction.
1013
1014 2003-02-11  Uwe Stieber  <uwe@wwws.de>
1015
1016         * config.bfd: Add support for kaOS as cross build target system.
1017
1018 2003-02-11  Alan Modra  <amodra@bigpond.net.au>
1019
1020         * elf64-ppc.c (ppc64_elf_check_relocs): Match versioned
1021         .__tls_get_addr too.
1022         (ppc64_elf_tls_setup): Ensure cached tls_get_addr is not indirect.
1023
1024 2003-02-10  Kaz kojima  <kkojima@rr.iij4u.or.jp>
1025
1026         * elf32-sh.c (elf_sh_dyn_relocs): Add tls_tpoff32 field.
1027         (elf_sh_link_hash_entry): Remove tls_tpoff32 field.
1028         (sh_elf_link_hash_newfunc): Remove the initialization of
1029         tls_tpoff32 field.
1030         (allocate_dynrelocs): Keep dyn_relocs if it includes the entry
1031         for which tls_tpoff32 flag is set.
1032         (sh_elf_relocate_section): Covert to LE only if the dyn_relocs
1033         of the symbol includes the entry matched with the input_section
1034         and having tls_tpoff32 flag on.  When linking statically, set
1035         symbol index of R_SH_TLS_TPOFF32 relocation to zero if the symbol
1036         is defined in this executable.
1037         (sh_elf_check_relocs): Set tls_tpoff32 flag appropriately.
1038
1039 2003-02-10  Jakub Jelinek  <jakub@redhat.com>
1040
1041         * elf32-s390.c (elf_s390_size_dynamic_sections): Set relocs to TRUE
1042         even if there is just non-empty .rela.plt.
1043
1044 2003-02-10  Nick Clifton  <nickc@redhat.com>
1045
1046         * archures.c (bfd_mach_arm_ep9312): Define.
1047         * bfd-in2.h: Regenerate.
1048         * cpu-arm.c (processors[]): Add ep9312.
1049         (bfd_arm_arch): Add ep9312.
1050         * elf32-arm.h (elf32_arm_merge_private_data): Update error
1051         messages and add test for Maverick floating point support.
1052         (elf32_arm_print_private_bfd_data): Handle
1053         EF_ARM_MAVERICK_FLOAT flag.
1054         (elf32_arm_object_p): New function.
1055         (elf_backend_object_p): Define.
1056
1057 2003-02-10  Alan Modra  <amodra@bigpond.net.au>
1058
1059         * elf64-ppc.c: Rename assorted occurrences of tls_type and similar
1060         variables, structure fields or function params to tls_mask or
1061         similar to better reflect usage.
1062         (struct got_entry): Comment.
1063         (struct ppc_link_hash_entry):  Expand comment, and renumber TLS_*.
1064         (get_tls_mask): Rename from get_tls_type.
1065
1066 2003-02-09  Alan Modra  <amodra@bigpond.net.au>
1067
1068         * elf64-ppc.c (TLS_GD_LD): Don't define..
1069         (TLS_GD): ..define this instead and update all uses.
1070         (TLS_TPRELGD): Define.
1071         (ppc64_elf_link_hash_table_create): Tweak initialization of
1072         init_refcount and init_offset.
1073         (ppc64_elf_check_relocs): Add one extra element to t_symndx array.
1074         Mark second slot of GD or LD toc entries.
1075         (get_tls_type): Return an int.  Distinguish toc GD and LD entries
1076         from other tls types.
1077         (ppc64_elf_tls_setup): New function, split out from..
1078         (ppc64_elf_tls_optimize): ..here.  Don't optimize when symbols are
1079         defined in a dynamic object.  Fix LD optimization.  Don't set TLS_TPREL
1080         on GD->IE optimization, use TLS_TPRELGD instead.  Use get_tls_type
1081         return value to properly decide whether toc GD and LD entries can
1082         optimize away __tls_get_addr call.  Check next reloc after DTPMOD64
1083         to determine GD or LD rather than looking at TLS_LD flag.  Don't
1084         attempt to adjust got entry tls_type here..
1085         (allocate_dynrelocs): ..instead, adjust got entry tls_type here, and
1086         look for possible merges.
1087         (ppc64_elf_size_dynamic_sections): Adjust local got entries for
1088         optimization.
1089         (ppc64_elf_size_stubs): Tweak __tls_get_addr fudge.
1090         (ppc64_elf_relocate_section): Rename some vars to better reflect usage.
1091         Make use of return value from get_tls_type to properly detect GD and
1092         LD optimizations.  Split tlsld/gd hi/ha from lo/ds case.  Don't
1093         handle tls_get_addr removal when looking at REL24 relocs, do it when
1094         looking at the previous reloc.  Check reloc after DTPMOD64 to determine
1095         GD or LD.
1096         * elf64-ppc.h (ppc64_elf_tls_setup): Declare.
1097
1098 2003-02-08  Alan Modra  <amodra@bigpond.net.au>
1099
1100         * elf32-hppa.c (group_sections): Don't share a stub section if
1101         stubs are for a large section.
1102
1103         * elf32-hppa.c (elf32_hppa_size_stubs): Double the size left for
1104         stubs if !stubs_always_before_branch.
1105
1106 2003-02-07  Nick Clifton  <nickc@redhat.com>
1107
1108         * elf.c (swap_out_syms): Generate an error message if an
1109         equivalent output section cannot be found for a symbol.
1110
1111 2003-02-07  Jakub Jelinek  <jakub@redhat.com>
1112
1113         * elf64-alpha.c (elf64_alpha_relax_section): Don't crash if
1114         local_got_entries is NULL.
1115
1116 2003-02-06  Andreas Schwab  <schwab@suse.de>
1117
1118         * elf-eh-frame.c (get_DW_EH_PE_signed): Define.
1119         (read_value): Add parameter is_signed, use signed extraction if
1120         the value is signed.
1121         (_bfd_elf_write_section_eh_frame): Pass signed flag of the
1122         encoding to read_value.
1123
1124 2003-02-06  Alan Modra  <amodra@bigpond.net.au>
1125
1126         * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy got and
1127         plt info when called to transfer weak sym info.
1128
1129 2003-02-05  Alan Modra  <amodra@bigpond.net.au>
1130
1131         * reloc.c: Add PPC and PPC64 TLS relocs.
1132         * libbfd.h: Regenerate.
1133         * bfd-in2.h: Regenerate.
1134         * elf64-ppc.c (TP_OFFSET, DTP_OFFSET): Declare.
1135         (ppc64_elf_howto_raw): Add TLS howto's.  Adjust R_PPC64_NONE to be
1136         against a 32 bit field.
1137         (ppc64_elf_reloc_type_lookup): Handle TLS relocs.
1138         (_ppc64_elf_section_data): Add t_symndx and comments.
1139         (ppc64_elf_section_data): Use elf_section_data macro.
1140         (ppc64_elf_new_section_hook): American spelling.
1141         (struct got_entry, struct plt_entry): New.
1142         (MUST_BE_DYN_RELOC): Rename from IS_ABSOLUTE_RELOC.
1143         (struct ppc_stub_hash_entry): Add "addend" field.
1144         (struct ppc_link_hash_entry): Add "tls_type".
1145         (TLS_TLS, TLS_GD_LD, TLS_LD, TLS_TPREL, TLS_DTPREL,
1146         TLS_EXPLICIT): Define.
1147         (struct ppc_link_hash_table): Add tls_sec, tls_get_addr, tlsld_got.
1148         (link_hash_newfunc): Init new fields.
1149         (ppc64_elf_link_hash_table_create): Likewise.  Set init_refcount and
1150         init_offset to NULL.
1151         (ppc64_elf_copy_indirect_symbol): Copy got and plt info.  Don't call
1152         _bfd_elf_link_hash_copy_indirect, rather insert relevant code from
1153         there.
1154         (update_local_sym_info, update_plt_info): New functions.
1155         (ppc64_elf_check_relocs): Use them.  Handle TLS relocs.  Adjust GOT
1156         handling to use got.glist rather than got.refcount.  Likewise for PLT.
1157         (ppc64_elf_gc_sweep_hook): Handle TLS relocs, new GOT and PLT lists.
1158         (func_desc_adjust): Adjust for new PLT list.
1159         (ppc64_elf_adjust_dynamic_symbol): Likewise.
1160         (get_sym_h, get_tls_type): New functions.
1161         (ppc64_elf_edit_opd): Remove unused variable.  Use get_sym_h.
1162         (ppc64_elf_tls_optimize): New function.
1163         (allocate_dynrelocs): Adjust for new PLT and GOT lists.  Allocate
1164         TLS relocs.
1165         (ppc64_elf_size_dynamic_sections): Likewise.
1166         (ppc_type_of_stub): Adjust for new PLT list.
1167         (ppc_build_one_stub): Likewise.
1168         (ppc64_elf_size_stubs): Likewise.  Use get_sym_h.  Treat __tls_get_addr
1169         calls specially.
1170         (ppc64_elf_relocate_section): Adjust for new GOT and PLT lists.  Handle
1171         TLS relocs.  Report local syms using bfd_elf_local_sym_name.  Don't
1172         init GOT entries that have a reloc.  Generate GOT relocs here..
1173         (ppc64_elf_finish_dynamic_symbol): ..not here.  Adjust for PLT list.
1174         * elf64-ppc.h (ppc64_elf_tls_optimize): Declare.
1175
1176 2003-02-04  Andreas Schwab  <schwab@suse.de>
1177
1178         * elf32-m68k.c (elf_m68k_hash_entry): Define.
1179         (elf_m68k_link_hash_traverse): Remove.
1180         (elf_m68k_link_hash_newfunc): Use struct bfd_hash_entry and
1181         elf_m68k_hash_entry instead of struct elf_m68k_link_hash_entry to
1182         reduce casting.
1183         (elf_m68k_check_relocs): Use elf_m68k_hash_entry instead of
1184         casting.
1185         (elf_m68k_size_dynamic_sections): Use elf_link_hash_traverse
1186         instead of elf_m68k_link_hash_traverse.
1187         (elf_m68k_discard_copies): Change first parameter to pointer to
1188         struct elf_link_hash_entry and use elf_m68k_hash_entry when struct
1189         elf_m68k_link_hash_entry is needed.
1190
1191 2003-02-04  Alan Modra  <amodra@bigpond.net.au>
1192
1193         * elf-bfd.h (struct got_entry, struct plt_entry): Forward declare.
1194         (struct elf_link_hash_entry): Add "glist" and "plist" fields to
1195         "got" union, and declare as gotplt_union.  Use gotplt_uinion for
1196         "plt" field.
1197         (struct elf_link_hash_table): Make "init_refcount" a gotplt_union.
1198         Add "init_offset" field.
1199         (struct elf_obj_tdata <local_got>): Add "struct got_entry **" to union.
1200         (elf_local_got_ents): Declare.
1201         * elf.c (_bfd_elf_link_hash_newfunc): Adjust initialization of "got"
1202         and "plt".
1203         (_bfd_elf_link_hash_hide_symbol): Use "init_offset".
1204         (_bfd_elf_link_hash_table_init): Set "init_offset".
1205         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set init_refcount
1206         from init_offset.
1207         (elf_adjust_dynamic_symbol): Set plt and got offsets using init_offset.
1208
1209         * elf.c (bfd_elf_local_sym_name): Split out from..
1210         (group_signature): ..here.
1211         * elf-bfd.h (bfd_elf_local_sym_name): Declare.
1212
1213 2003-02-04  Alan Modra  <amodra@bigpond.net.au>
1214
1215         * elf-bfd.h (enum elf_link_info_type): Remove.
1216         (struct bfd_elf_section_data): Move sec_info_type, use_rela_p fields
1217         to struct sec.  Remove linkonce_p field.
1218         (elf_linkonce_p): Delete.
1219         (elf_discarded_section): Update for sec_info_type change.
1220         * section.c (struct sec): Add sec_info_type, use_rela_p, has_tls_reloc,
1221         flag11, flag12, flag13, flag14, flag15, flag16, flag20, flag24.
1222         (ELF_INFO_TYPE_NONE): Define.
1223         (ELF_INFO_TYPE_STABS): Define.
1224         (ELF_INFO_TYPE_MERGE): Define.
1225         (ELF_INFO_TYPE_EH_FRAME): Define.
1226         (ELF_INFO_TYPE_JUST_SYMS): Define.
1227         (STD_SECTION): Update struct sec initializer.
1228         * ecoff.c (bfd_debug_section): Likewise.
1229         * elf.c: Likewise.  Update occurrences of sec_info_type and use_rela_p.
1230         * elflink.h: Likewise.
1231         * elf-eh-frame.c: Likewise.
1232         * elf64-alpha.c: Likewise.
1233         * elfxx-ia64.c: Likewise.
1234         * elfxx-mips.c: Likewise.
1235         * bfd-in2.h: Regenerate.
1236
1237         * elf32-sparc.c (sec_do_relax): Use elf_section_data macro rather than
1238         referring to used_by_bfd.
1239         * elf64-sparc.c (sec_do_relax): Likewise.
1240         * elf64-mmix.c (mmix_elf_section_data): Likewise.
1241         * elfxx-mips.c (mips_elf_section_data): Likewise.
1242         * ieee.c (ieee_slurp_section_data): Use ieee_per_section macro.
1243         (ieee_get_section_contents): Likewise.
1244         (ieee_new_section_hook): Formatting.
1245         (ieee_canonicalize_reloc): Remove commented out code.
1246         * mmo.c (mmo_section_data): Define.  Use throughout file.
1247         * oasys.c (oasys_get_section_contents): Use oasys_per_section macro.
1248
1249 2003-01-31  Graydon Hoare <graydon@redhat.com>
1250
1251         * Makefile.am (opncls.lo): Add dependency upon libiberty.h.
1252         * Makefile.in: Regenerate.
1253         * opncls.c (calc_crc32, get_debug_link_info,
1254         seperate_debug_file_exists, find_seperate_debug_file): New
1255         internal functions.
1256         (bfd_follow_gnu_debuglink): New function.  Follow the pointer
1257         contained inside a .gnu_debuglink section.
1258         * bfd-in2.h: Regenerate.
1259
1260 2003-01-29  Alexandre Oliva  <aoliva@redhat.com>
1261
1262         * elfxx-mips.c (mips_elf_got_entry_hash): Don't dereference
1263         entry->abfd when it's NULL.
1264
1265 2003-01-27  Alexandre Oliva  <aoliva@redhat.com>
1266
1267         * elfxx-mips.c (mips_elf_create_dynamic_relocation): Handle
1268         _bfd_elf_section_offset returning -2 the same way as -1.
1269
1270         * elfxx-mips.c (mips_elf_multi_got): New function.
1271         (struct mips_got_entry): Make symndx and gotidx signed.  Moved
1272         addend into union along with address and link hash entry.
1273         (struct mips_got_info): Added bfd2got and next.
1274         (struct mips_elf_hash_sort_data): Added max_unref_got_dynindx.
1275         (mips_elf_got_section, mips_elf_create_got_section): Use
1276         SEC_EXCLUDE bit to tell whether we really need the got
1277         section.  Take boolean arguments to disregard an excluded
1278         section, or to create it as excluded.  Adjust all callers.
1279         Use mips_elf_got_section all over.
1280         (mips_elf_local_got_index, mips_elf_got_page,
1281         mips_elf_got16_entry): Take input bfd as argument, and pass it
1282         on to mips_elf_create_local_got_entry.
1283         (mips_elf_global_got_index, mips_elf_create_local_got_entry):
1284         Take input bfd as argument, and manage entries in the
1285         appropriate GOT.
1286         (mips_elf_got_offset_from_index): Take input bfd as argument,
1287         and use it to adjust the GP offset of the bfd.
1288         (mips_elf_sort_hash_table, mips_elf_sort_hash_table_f): Move
1289         unreferenced GOT entries of global symbols to the end.
1290         (mips_elf_record_global_got_symbol): Take input bfd as
1291         argument.  Add entries to the master GOT hash table.
1292         (struct mips_elf_bfd2got_hash): New.
1293         (struct mips_elf_got_per_bfd_arg): New.
1294         (struct mips_elf_set_global_got_offset_arg): New.
1295         (mips_elf_hash_bfd_vma, mips_elf_multi_got_entry_hash,
1296         mips_elf_multi_got_entry_eq, mips_elf_bfd2got_entry_hash,
1297         mips_elf_bfd2got_entry_eq, mips_elf_make_got_per_bfd,
1298         mips_elf_merge_gots, mips_elf_set_global_got_offset,
1299         mips_elf_resolve_final_got_entry,
1300         mips_elf_resolve_final_got_entries, mips_elf_adjust_gp,
1301         mips_elf_got_for_ibfd): New functions.
1302         (ELF_MIPS_GP_OFFSET): Don't depend on SGI_COMPAT.
1303         (MIPS_ELF_GOT_MAX_SIZE): New macro.
1304         (STUB_LW): Generate 64-bit stub regardless of SGI_COMPAT.
1305         (mips_elf_got_entry_hash): Take new fields into account.  Use
1306         mips_elf_hash_bfd_vma.
1307         (mips_elf_got_entry_eq): Take new fields into account.
1308         (mips_elf_create_got_section): Initialize new fields.
1309         (mips_elf_calculate_relocation): Pass input_bfd to functions
1310         that now take it.  Adjust gp for the input_bfd.
1311         (mips_elf_allocate_dynamic_relocation,
1312         mips_elf_create_dynamic_relocation,
1313         _bfd_mips_elf_create_dynamic_sections): Use...
1314         (mips_elf_rel_dyn_section): New function.  Borrow code from...
1315         (_bfd_mips_elf_check_relocs): Pass input_bfd to functions that
1316         now take it.  Create the got section if needed, even if
1317         excluded, before recording a global got symbol.  Move some
1318         code to...
1319         (mips_elf_record_local_got_symbol): New fn.
1320         (_bfd_mips_elf_size_dynamic_sections): Disable combreloc.
1321         Compute multi-got global entries offsets.  Move GOT code to...
1322         (_bfd_mips_elf_always_size_sections): Call mips_elf_multi_got
1323         if the GOT is too big.
1324         (_bfd_mips_elf_finish_dynamic_symbol): Set got entry of
1325         undefweak symbol to zero.  Generate dynamic relocations for
1326         non-primary GOT entries for global symbols.
1327         (_bfd_mips_elf_finish_dynamic_sections): Handle multi-got
1328         case.  Generate dynamic relocations for local got entries.
1329         Sort dynamic relocations on N64 too, using...
1330         (sort_dynamic_relocs_64): New fns.
1331         (_bfd_mips_elf_hide_symbol): Adjust multi-got counters.
1332         (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_XGOT.
1333
1334 2003-01-27  Alexandre Oliva  <aoliva@redhat.com>
1335
1336         * bfd.c (struct _bfd): Added id field.
1337         * opncls.c (_bfd_id_counter): New static variable.
1338         (_bfd_new_bfd): Use it.
1339         * bfd-in2.h: Rebuilt.
1340
1341 2003-01-25  Alan Modra  <amodra@bigpond.net.au>
1342
1343         * elf32-sparc.c (bfd_elf32_new_section_hook): Define.
1344
1345 2003-01-25  Jakub Jelinek  <jakub@redhat.com>
1346
1347         * elf32-sparc.c (_bfd_sparc_elf_howto_table): Add TLS relocs.
1348         (elf32_sparc_rev32_howto): New variable.
1349         (sparc_reloc_map): Add TLS relocs.
1350         (elf32_sparc_reloc_type_lookup, elf32_sparc_info_to_howto):
1351         Handle REV32.
1352         (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc, elf32_sparc_mkobject):
1353         New functions.
1354         (struct elf32_sparc_dyn_relocs, struct elf32_sparc_link_hash_entry,
1355         struct elf32_sparc_link_hash_table):
1356         New structures.
1357         (elf32_sparc_tdata, elf32_sparc_local_got_tls_type,
1358         elf32_sparc_hash_table): Define.
1359         (link_hash_newfunc, elf32_sparc_link_hash_table_create,
1360         create_got_section, elf32_sparc_create_dynamic_sections,
1361         elf32_sparc_copy_indirect_symbol, elf32_sparc_tls_transition): New
1362         functions.
1363         (elf32_sparc_check_relocs): Handle TLS relocs.  Add dynamic reloc
1364         reference counting.
1365         (elf32_sparc_gc_sweep_hook): Likewise.
1366         (elf32_sparc_adjust_dynamic_symbol): Likewise.
1367         (elf32_sparc_size_dynamic_sections): Likewise.
1368         (elf32_sparc_relocate_section): Likewise.
1369         (allocate_dynrelocs, readonly_dynrelocs, dtpoff_base, tpoff):
1370         New functions.
1371         (elf32_sparc_object_p): Allocate backend private object data.
1372         (bfd_elf32_bfd_link_hash_table_create,
1373         elf_backend_copy_indirect_symbol, bfd_elf32_mkobject,
1374         elf_backend_can_refcount): Define.
1375         (elf_backend_create_dynamic_sections): Define to
1376         elf32_sparc_create_dynamic_sections.
1377         * reloc.c: Add SPARC TLS relocs.
1378         * bfd-in2.h, libbfd.h: Rebuilt.
1379         * elf64-sparc.c (sparc64_elf_howto_table): Add TLS relocs.
1380         (sparc_reloc_map): Likewise.
1381
1382 2003-01-24  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1383
1384         * bfd-in2.h: Regenerate.
1385         * elf32-s390.c (elf_s390_mkobject, elf_s390_tls_transition,
1386         s390_tls_reloc, dtpoff_base, tpoff, invalid_tls_insn): New functions.
1387         (elf_howto_table): Add TLS relocs.
1388         (elf_s390_reloc_type_lookup): Likewise.
1389         (elf_s390_link_hash_entry): Add tls_type.
1390         (elf_s390_hash_entry, elf_s390_obj_tdata, elf_s390_local_got_tls_type):
1391         New macros.
1392         (elf_s390_link_hash_table): Add tls_ldm_got.
1393         (link_hash_newfunc): Initialize tls_type.
1394         (elf_s390_link_hash_table_create): Initialize refcount of tls_ldm_got.
1395         (elf_s390_copy_indirect_symbol): Copy tls_type information.
1396         (elf_s390_check_relocs): Support TLS relocs.
1397         (elf_s390_gc_sweep_hook): Likewise.
1398         (allocate_dynrelocs): Likewise.
1399         (elf_s390_size_dynamic_sections): Likewise.
1400         (elf_s390_relocate_section): Likewise.
1401         (elf_s390_finish_dynamic_symbol): Likewise.
1402         (bfd_elf32_mkobject): Define for TLS.
1403         * elf64-s390.c: Same changes as for elf32-s390.c.
1404         * libbfd.h: Regenerate.
1405         * reloc.c: Add s390 TLS relocations.
1406
1407 2003-01-24  Charles Lepple  <clepple@ghz.cc>
1408
1409         * aclocal.m4: Fix name of --enable-install-libbfd switch.
1410
1411 2003-01-23  Nick Clifton  <nickc@redhat.com>
1412
1413         * Add sh2e support:
1414
1415         2002-04-02  Elena Zannoni  <ezannoni@redhat.com>
1416
1417                 * archures.c (bfd_mach_sh2e): Added.
1418                 * bfd-in2.h: Rebuilt.
1419                 * cpu-sh.c (arch_info_struct): Added SH2e.
1420                 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle EF_SH2E.
1421
1422 2003-01-23  Alan Modra  <amodra@bigpond.net.au>
1423
1424         * elf-bfd.h (struct bfd_elf_section_data): Remove tdata.  Change
1425         dynindx to an int.  Rearrange for better packing.
1426         * elf.c (_bfd_elf_new_section_hook): Don't alloc if already done.
1427         * elf32-mips.c (bfd_elf32_new_section_hook): Define.
1428         * elf32-sh64.h: New.  Split out from include/elf/sh.h.
1429         (struct _sh64_elf_section_data): New struct.
1430         (sh64_elf_section_data): Don't dereference sh64_info (was tdata).
1431         * elf32-sh64-com.c: Include elf32-sh64.h.
1432         * elf32-sh64.c: Likewise.
1433         (sh64_elf_new_section_hook): New function.
1434         (bfd_elf32_new_section_hook): Define.
1435         (sh64_elf_fake_sections): Adjust for sh64_elf_section_data change.
1436         (sh64_bfd_elf_copy_private_section_data): Likewise.
1437         (sh64_elf_final_write_processing): Likewise.
1438         * elf32-sparc.c (struct elf32_sparc_section_data): New.
1439         (elf32_sparc_new_section_hook): New function.
1440         (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
1441         (sec_do_relax): Define.
1442         (elf32_sparc_relax_section): Adjust to use sec_do_relax.
1443         (elf32_sparc_relocate_section): Likewise.
1444         * elf64-mips.c (bfd_elf64_new_section_hook): Define.
1445         * elf64-mmix.c (struct _mmix_elf_section_data): New.
1446         (mmix_elf_section_data): Define.  Use throughout file.
1447         (mmix_elf_new_section_hook): New function.
1448         (bfd_elf64_new_section_hook): Define.
1449         * elf64-ppc.c (struct _ppc64_elf_section_data): New.
1450         (ppc64_elf_section_data): Define.  Use throughout.
1451         (ppc64_elf_new_section_hook): New function.
1452         (bfd_elf64_new_section_hook): Define.
1453         * elf64-sparc.c (struct sparc64_elf_section_data): New.
1454         (sparc64_elf_new_section_hook): New function.
1455         (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
1456         (sec_do_relax): Define.
1457         (sparc64_elf_relax_section): Adjust to use sec_do_relax.
1458         (sparc64_elf_relocate_section): Likewise.
1459         (bfd_elf64_new_section_hook): Define.
1460         * elfn32-mips.c (bfd_elf32_new_section_hook): Define.
1461         * elfxx-mips.c (struct _mips_elf_section_data): New.
1462         (mips_elf_section_data): Define.  Use throughout.
1463         (_bfd_mips_elf_new_section_hook): New function.
1464         (mips_elf_create_got_section): Don't alloc used_by_bfd.
1465         * elfxx-mips.h (_bfd_mips_elf_new_section_hook): Declare.
1466         * elfxx-target.h (bfd_elfNN_new_section_hook): Add #ifndef.
1467         * Makefile.am: Run "make dep-am".
1468         * Makefile.in: Regenerate.
1469
1470 2003-01-21  Richard Henderson  <rth@redhat.com>
1471
1472         * elf64-alpha.c (ALPHA_ELF_LINK_HASH_PLT_LOC): New.
1473         (struct alpha_elf_link_hash_entry): Add plt_old_section, plt_old_value.
1474         (elf64_alpha_adjust_dynamic_symbol): Set them.
1475         (elf64_alpha_size_plt_section_1): Reset them when plt entry removed.
1476         (elf64_alpha_relax_tls_get_addr): Handle LDM relocs.  Frob the
1477         symbol index when relaxing LDM to TPREL.
1478         (elf64_alpha_relax_section): Likewise.  Allow relaxation of GD
1479         relocs, even if the target isn't locally defined.
1480         (elf64_alpha_check_relocs): Frob LDM reloc symndx to zero.
1481         (elf64_alpha_relocate_section): Likewise.  Force TP-relative
1482         relocs vs symndx 0 to the tp base.
1483
1484 2003-01-21  Fabio Alemagna  <falemagn@aros.org>
1485
1486         * config.bfd: Handle i[3456]86-*-aros*.
1487
1488 2003-01-21  Andreas Schwab  <schwab@suse.de>
1489
1490         * elf32-ppc.c (struct ppc_elf_dyn_relocs): Define.
1491         (struct ppc_elf_link_hash_entry): Define.
1492         (ppc_elf_hash_entry): New function.
1493         (struct ppc_elf_link_hash_table): Define.
1494         (ppc_elf_hash_table): New function.
1495         (ppc_elf_link_hash_newfunc): New function.
1496         (ppc_elf_link_hash_table_create): New function.
1497         (ppc_elf_copy_indirect_symbol): New function.
1498         (allocate_dynrelocs): New function.
1499         (readonly_dynrelocs): New function.
1500         (ppc_elf_size_dynamic_sections): Allocate space for dynamic
1501         relocs and determine DT_TEXTREL.
1502         (ppc_elf_check_relocs): Don't do that here, just count the
1503         dynamic relocs.
1504         (ppc_elf_gc_sweep_hook): Discard any dynamic relocs against the
1505         removed section.
1506         (bfd_elf32_bfd_link_hash_table_create): Define.
1507         (elf_backend_copy_indirect_symbol): Define.
1508
1509 2003-01-21  Richard Henderson  <rth@redhat.com>
1510
1511         * elf64-alpha.c (alpha_dynamic_entries_for_reloc): GOTTPREL and
1512         TPREL also get a reloc if shared.  Remove SREL support.
1513         (elf64_alpha_emit_dynrel): New.
1514         (elf64_alpha_relocate_section): Use it.  Resolve dynamic TPREL
1515         and GOTTPREL relocs to local symbols against the tp base.
1516         (elf64_alpha_finish_dynamic_symbol): Use elf64_alpha_emit_dynrel.
1517
1518         * elf64-alpha.c (elf64_alpha_relax_got_load): Decrement got
1519         use count before clobbering r_type.
1520         (elf64_alpha_relax_tls_get_addr): Don't use pos[1] if insn
1521         ordering would mean dataflow inspection is necessary.
1522
1523 2003-01-20  Svein E. Seldal  <Svein.Seldal@solidas.com>
1524
1525         * coffcode.h (coff_set_flags): Added get/set arch hooks.
1526
1527 2003-01-20  Fabio Alemagna  <falemagn@aros.org>
1528
1529         * elf32-sh.c: Treat elfNN_bed like other macros defined in
1530           elfxx-target.h and #undef it before #define'ing it.
1531         * elf32-i386.c: Likewise.
1532         * elf32-sh64.c: Likewise.
1533         * elf64-alpha.c: Likewise.
1534         * elf64-sh64.c: Likewise.
1535
1536 2003-01-20  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1537
1538         * bfd-in2.h: Regenerate.
1539         * elf32-s390.c (elf_s390_adjust_gotplt): New prototype.
1540         (elf_howto_table): Rename R_390_GOTOFF to R_390_GOTOFF32. Add
1541         R_390_GOTOFF16, R_390_GOTOFF64, R_390_GOTPLT12, R_390_GOTPLT16,
1542         R_390_GOTPLT32, R_390_GOTPLT64, R_390_GOTPLTENT, R_390_PLTOFF16,
1543         R_390_PLTOFF32 and R_390_PLTOFF64.
1544         (elf_s390_reloc_type_lookup): Likewise.
1545         (struct elf_s390_link_hash_entry): Add gotplt_refcount to keep track
1546         of GOTPLT references to a function.
1547         (link_hash_newfunc): Initialize gotplt_refcount.
1548         (elf_s390_check_relocs): Move allocation of local_got_refcounts array
1549         and creation of the got section out of the main switch. Add support
1550         for the gotoff, gotplt and pltoff relocations.
1551         (elf_s390_gc_sweep_hook): Add reference counting for gotoff, gotplt
1552         and pltoff.
1553         (elf_s390_adjust_gotplt): New function.
1554         (elf_s390_adjust_dynamic_symbol): Adjust gotplt refcount for removed
1555         plt entries.
1556         (allocate_dynrelocs): Add comment.
1557         (elf_s390_relocate_section): Change r_type to unsigned. Add support
1558         for gotoff, gotplt and pltoff relocations.
1559         * elf64-s390.c: Same changes as for elf32-s390.c.
1560         * libbfd.h: Regenerate.
1561         * reloc.c: Add BFD_RELOC_390_GOTOFF64, BFD_RELOC_390_GOTPLT12,
1562         BFD_RELOC_390_GOTPLT16, BFD_RELOC_390_GOTPLT32, BFD_RELOC_390_GOTPLT64,
1563         BFD_RELOC_390_GOTPLTENT, BFD_RELOC_390_PLTOFF16, BFD_RELOC_390_PLTOFF32
1564         and BFD_RELOC_390_PLTOFF64.
1565
1566 2003-01-18  Jakub Jelinek  <jakub@redhat.com>
1567
1568         * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle
1569         R_IA64_TPREL64[LM]SB against non-global symbol properly.
1570
1571 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
1572
1573         * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add
1574         self_dtpmod_done and self_dtpmod_offset.
1575         (allocate_global_data_got): Only use one got entry for all
1576         dtpmod relocs against local symbols.
1577         (allocate_dynrel_entries): Only need .rela.got entry for
1578         dtpmod against global symbol.
1579         (elfNN_ia64_size_dynamic_sections): Initialize self_dtpmod_offset.
1580         Reserve space in .rela.got for the local dtpmod entry.
1581         (set_got_entry): Initialize the common local dtpmod .got entry.
1582         (elfNN_ia64_relocate_section): Handle R_IA_64_DTPREL64LSB
1583         and R_IA_64_DTPREL64MSB.
1584
1585 2003-01-16  Alan Modra  <amodra@bigpond.net.au>
1586
1587         * elf64-ppc.c: Include elf/ppc64.h rather than elf/ppc.h.
1588         (R_PPC_*): Rename all occurrences to R_PPC64_*.
1589         (R_PPC64_ADDR30): Rename all occurrences to R_PPC64_REL30.
1590         (enum elf_ppc_reloc_type): Ditto to enum elf_ppc64_reloc_type.
1591         (ppc64_elf_gc_sweep_hook): Handle R_PPC64_REL30 along with other
1592         relative relocs, not with absolute ones.
1593         * Makefile.am: Run "make dep-am".
1594         * Makefile.in: Regenerate.
1595         * po/SRC-POTFILES.in: Regenerate.
1596
1597 2003-01-15  Andreas Schwab  <schwab@suse.de>
1598
1599         * elf32-ppc.c (ppc_elf_check_relocs): Don't set DF_TEXTREL for a
1600         relocation against a non-allocated readonly section.
1601
1602 2003-01-10  Alan Modra  <amodra@bigpond.net.au>
1603
1604         * elf32-ppc.c (ppc_elf_relocate_section): Adjust addend for GOT16_HA.
1605         * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.  PLTGOT16_HA too.
1606
1607 2002-01-08  Klee Dienes  <kdienes@apple.com>
1608
1609         * Makefile.am (ALL_MACHINES): Use cpu-msp430.lo, not cpu-msp430.c.
1610         (BFD32_BACKENDS): Use elf32-msp430.lo, not elf32-msp430.c.
1611         * Makefile.in: Regenerate.
1612
1613 2003-01-08  Alexandre Oliva  <aoliva@redhat.com>
1614
1615         * elfn32-mips.c (prev_reloc_section): New.
1616         (GET_RELOC_ADDEND): Use it.  Parenthesize macro arguments.
1617         (SET_RELOC_ADDEND): Parenthesize macro argument.
1618
1619 2003-01-07  John David Anglin  <dave.anglin@nrc.gc.ca>
1620
1621         * elf32-hppa.c (final_link_relocate): For all DP relative relocations,
1622         adjust addil instructions if the symbol has no section.
1623
1624 2003-01-07  DJ Delorie  <dj@redhat.com>
1625
1626         * elf32-xstormy16.c (xstormy16_elf_howto_table): Make REL_12 not
1627         partial_inplace.
1628
1629 2003-01-07  Andreas Schwab  <schwab@suse.de>
1630
1631         * elf32-m68k.c (elf_m68k_check_relocs): Don't set DF_TEXTREL for
1632         PC relative relocations.
1633         (elf_m68k_discard_copies): Set it here instead.
1634
1635 2002-01-02  Ben Elliston  <bje@redhat.com>
1636             Jeff Johnston  <jjohnstn@redhat.com>
1637
1638         * Makefile.am (ALL_MACHINES): Add cpu-iq2000.lo.
1639         (ALL_MACHINES_CFILES): Add cpu-iq2000.c.
1640         (BFD32_BACKENDS): Add elf32-iq2000.lo.
1641         (BFD32_BACKENDS_CFILES): Add elf32-iq2000.c.
1642         (cpu-iq2000.lo): New target.
1643         * Makefile.in: Regenerate.
1644         * config.bfd: Handle iq2000-*-elf.
1645         * archures.c (bfd_architecture): Add bfd_{arch,mach}_iq2000.
1646         (bfd_archures_list): Add bfd_iq2000_arch.
1647         * configure.in: Handle bfd_elf32_iq2000_vec.
1648         * configure: Regenerate.
1649         * reloc.c: Add BFD_RELOC_IQ2000_OFFSET_16, BFD_RELOC_IQ2000_OFFSET_21,
1650         and BFD_RELOC_IQ2000_UHI16.
1651         * targets.c (bfd_elf32_iq2000_vec): Declare.
1652         (bfd_target_vector): Add bfd_elf32_iq2000_vec.
1653         * elf.c (prep_headers): Set e_machine to EM_IQ2000.
1654         * cpu-iq2000.c: New file.
1655         * elf32-iq2000.c: Likewise.
1656         * libbfd.h: Regenerate.
1657         * bfd-in2.h: Likewise.
1658
1659 2003-01-02  Richard Sandiford  <rsandifo@redhat.com>
1660
1661         * elfxx-mips.c: Include libiberty.h.
1662         (elf_mips_isa, _bfd_mips_elf_mach_extends_p): Remove.
1663         (mips_set_isa_flags): New function, split out from...
1664         (_bfd_mips_elf_final_write_processing): ...here.  Only call
1665         mips_set_isa_flags if the EF_MIPS_MACH bits are clear.
1666         (mips_mach_extensions): New array.
1667         (mips_32bit_flags_p): New function.
1668         (_bfd_mips_elf_merge_private_bfd_data): Rework architecture checks.
1669         Use mips_32bit_flags_p to check if one binary is 32-bit and the
1670         other is 64-bit.  When adopting IBFD's architecture, adopt the
1671         bfd_mach as well as the flags.
1672
1673 2003-01-02  Nick Kelsey  <nickk@ubicom.com>
1674
1675         * elf32-ip2k.c: Re-work of linker relaxation code for the ip2k to
1676         fix internal errors, fix bad code generation, fix incorrect stabs
1677         information, and improve ability to eliminate redundant page
1678         instructions. Added code to ip2k_final_link_relocate to self-verify
1679         the linker relaxation.  Fix formatting problems.
1680
1681 2002-12-30  Chris Demetriou  <cgd@broadcom.com>
1682
1683         * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mipsisa32r2 case.
1684         * archures.c (bfd_mach_mipsisa32r2): New define.
1685         * bfd-in2.h: Regenerate.
1686         * cpu-mips.c (I_mipsisa32r2): New enum value.
1687         (arch_info_struct): Add entry for I_mipsisa32r2.
1688         * elfxx-mips.c (elf_mips_isa, _bfd_elf_mips_mach)
1689         (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_32R2.
1690         (_bfd_mips_elf_final_write_processing): Add
1691         bfd_mach_mipsisa32r2 case.
1692         (_bfd_mips_elf_merge_private_bfd_data): Handle merging of
1693         binaries marked as using MIPS32 Release 2.
1694
1695 2002-12-30    Dmitry Diky <diwil@mail.ru>
1696
1697         * Makefile.am: Add msp430 target.
1698         * configure.in: Likewise.
1699         * Makefile.in: Regenerate.
1700         * configure: Regenerate.
1701         * archures.c: Add msp430 architecture vector.
1702         * config.bfd: Likewise.
1703         * reloc.c: Add msp430 relocs.
1704         * targets.c: Add msp320 target.
1705         * cpu-msp430.c: New file: msp430 cpu detection.
1706         * elf32-msp430.c: New file: msp430 reloc processing.
1707         * bfd-in2.h: Regenerate.
1708         * libbfd.h: Regenerate.
1709
1710 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
1711
1712         * elf.c (elf_sort_sections): Don't reorder .tbss.
1713         (assign_file_positions_for_segments): Only adjust off/voff
1714         for increased alignment in PT_LOAD or PT_NOTE segment,
1715         but adjust p_filesz for .tbss too.  in PT_LOAD consider
1716         .tbss to have zero memory size.
1717         (copy_private_bfd_data) [SECTION_SIZE]: Define.
1718         [IS_CONTAINED_BY_VMA, IS_CONTAINED_BY_LMA]: Use it.
1719         [INCLUDE_SECTION_IN_SEGMENT]: Only put SHF_TLS sections
1720         into PT_TLS segment.  Never put SHF_TLS sections in
1721         segments other than PT_TLS or PT_LOAD.
1722
1723         * elf64-alpha.c (elf64_alpha_finish_dynamic_sections): Clear .plt
1724         sh_entsize.
1725
1726 2002-12-23  DJ Delorie  <dj@redhat.com>
1727
1728         * coff64-rs6000.c (xcoff64_ppc_relocate_section): Fix logic reversal.
1729
1730 2002-12-23  Alan Modra  <amodra@bigpond.net.au>
1731
1732         * elflink.h (elf_link_output_extsym): Heed strip_discarded.
1733
1734 2002-12-23  Nick Clifton  <nickc@redhat.com>
1735
1736         * archures.c (bfd_arch_get_compatible): Add third parameter
1737         'accept_unknowns'.  Only accept unknown format BFDs if
1738         accept_unknowns is true, or if the format is "binary".
1739         * bfd-in2.h: Regenerate.
1740
1741 2002-12-21  Nick Clifton  <nickc@redhat.com>
1742
1743         * coff-arm.c (coff_arm_relocate_section): Disable WINCE workaround
1744         that subtracted 8 from pc relative relocations.
1745
1746 2002-12-20  Kazu Hirata  <kazu@cs.umass.edu>
1747
1748         * coff-h8300.c: Fix comment typos.
1749         * coffcode.h: Likewise.
1750         * cpu-cris.c: Likewise.
1751         * elf32-vax.c: Likewise.
1752         * genlink.h: Likewise.
1753         * linker.c: Likewise.
1754         * som.c: Likewise.
1755         * tekhex.c: Likewise.
1756         * vms-misc.c: Likewise.
1757
1758 2002-12-20  DJ Delorie  <dj@redhat.com>
1759
1760         * reloc.c: Add BFD_RELOC_XSTORMY16_12.
1761         * libbfd.h: Regenerate.
1762         * bfd-in2.h: Regenerate.
1763         * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_12.
1764         (xstormy16_reloc_map): Add R_XSTORMY16_12.
1765
1766 2002-12-19  Kazu Hirata  <kazu@cs.umass.edu>
1767
1768         * doc/bfdint.texi: Fix typos.
1769
1770 2002-12-20  Paul Eggert  <eggert@twinsun.com>
1771
1772         Port to POSIX 1003.1-2001.
1773         * acinclude.m4 (AM_INSTALL_LIBBFD): Do not rely on "test -o".
1774         * configure.in (build-warnings): Likewise.
1775         (Horrible hacks to build DLLs on Windows): Do not rely on "tail -1".
1776         * aclocal.m4: Regenerate.
1777         * config.in: Regenerate.
1778         * configure: Regenerate.
1779
1780 2002-12-19  Alan Modra  <amodra@bigpond.net.au>
1781
1782         * coff-h8300.c: Include libiberty.h.
1783         (h8300_reloc16_extra_cases): Check the hash table creator before
1784         referencing h8300 specific fields.  Stash the hash table pointer
1785         in a local var.  Comment typo fixes.
1786         (h8300_bfd_link_add_symbols): Likewise.
1787
1788         * bfd/reloc.c (struct reloc_howto_struct): Revise src_mask and
1789         dst_mask comments.
1790         * bfd-in2.h: Regenerate.
1791
1792 2002-12-18  Alan Modra  <amodra@bigpond.net.au>
1793
1794         * elf32-ppc.c (ppc_elf_relocate_section): Reorganize dynamic reloc
1795         code a little.  Comment on dynamic relocs against section symbols.
1796
1797 2002-12-17  Roger Sayle  <roger@eyesopen.com>
1798
1799         * configure.host (ia64-*-hpux*): Support 64 bit targets using
1800         the HP compiler's "long long".
1801
1802 2002-12-16  Andrew MacLeod  <amacleod@redhat.com>
1803
1804         * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_LO16
1805         and R_XSTORMY16_HI16) howto entries.
1806         (xstormy16_reloc_map): Map R_XSTORMY16_{LO,HI}16 to BFD_RELOC_{LO,HI}16.
1807         (xstormy16_info_to_howto_rela): Use R_XSTORMY16_GNU_VTINHERIT to
1808         determine the start of the second reloc table.
1809
1810 2002-12-16  Nathan Tallent  <eraxxon@alumni.rice.edu>
1811
1812         * ecofflink.c: Fix the reading of the debugging information
1813         of Tru64/Alpha binaries that are produced by recent Compaq
1814         compilers.
1815         (mk_fdrtab): Fix error in creating the FDR (file descriptor)
1816         table.
1817         (lookup_line): Because of the strange information sometimes
1818         generated by Compaq's recent compilers, change how the FDR
1819         table is searched so that PDRs (procedure descriptors) are
1820         correctly found.  Note that this change is really more of a hack;
1821         however, I have included extensive documentation as to why
1822         this is the best solution short of an extensive rewrite or
1823         another hack.
1824         (fdrtab_lookup): Add comments to explain the algorithm.
1825
1826 2002-12-12  Alexandre Oliva  <aoliva@redhat.com>
1827
1828         * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Reorder
1829         initializers to match struct declaration.
1830
1831 2002-12-12  Alan Modra  <amodra@bigpond.net.au>
1832
1833         * dwarf2.c (comp_unit_contains_address): Comment typo fix.
1834         * elf.c (get_program_header_size): Likewise.
1835         * elf32-m32r.c (m32r_elf_lo16_reloc): Likewise.
1836         (m32r_elf_generic_reloc): Likewise.
1837         * elf32-ppc.c (ppc_elf_howto_init): Likewise.
1838         * elflink.h (elf_bfd_discard_info): Likewise.
1839
1840 2002-12-12  Alan Modra  <amodra@bigpond.net.au>
1841
1842         * elf32-i386.c (elf_i386_finish_dynamic_sections): Add output_offset
1843         to DT_JMPREL.  Use srelplt input section size for DT_PLTRELSZ and
1844         DT_RELSZ adjustment, not output section.  Avoid writing tags when
1845         unchanged.  Don't assume linker script is sane, adjust DT_REL too.
1846         * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Just use raw
1847         size of srelplt for DT_PLTRELSZ.  Use srelplt input section size for
1848         DT_RELASZ adjustment, not output section.  Avoid writing tags when
1849         unchanged.  Adjust DT_RELA.
1850         * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Tweaks for better
1851         formatting.  Avoid writing tags when unchanged.  Adjust DT_RELA.
1852
1853 2002-12-12  Alexandre Oliva  <aoliva@redhat.com>
1854
1855         * elfxx-mips.c (mips_elf_calculate_relocation): Don't divide
1856         addend by 4.
1857
1858 2002-12-12  Alexandre Oliva  <aoliva@redhat.com>
1859
1860         * elfxx-mips.c (struct mips_got_entry): New.
1861         (struct mips_got_info): Added got_entries field.
1862         (mips_elf_got_entry_hash, mips_elf_got_entry_eq): New functions.
1863         (mips_elf_local_got_index, mips_elf_got_page,
1864         mips_elf_got16_entry): Re-implement in terms of new...
1865         (mips_elf_create_local_got_entry): Rewrite to use got_entries.
1866         Change return type.
1867         (mips_elf_highest): Warning clean-up.
1868         (mips_elf_create_got_section): Initialize got_entries.
1869         (_bfd_mips_elf_check_relocs): Use got_entries to estimate
1870         local got size.
1871         (_bfd_mips_elf_size_dynamic_sections): Do not account for
1872         GOT_PAGE entries, since we now reuse GOT16 entries.
1873
1874 2002-12-10  Jason Thorpe  <thorpej@wasabisystems.com>
1875
1876         * aoutx.h (set_section_contents): Allow an otherwise unrepresentable
1877         read-only section that lies after .text and before .data to be
1878         written into the output file and included in a_text.
1879         (translate_to_native_sym_flags): If an otherwise unrepresentable
1880         section was merged with .text, convert its symbols to N_TEXT
1881         symbols.
1882         * libaout.h (aout_section_merge_with_text_p): New macro.
1883
1884 2002-12-08  Alan Modra  <amodra@bigpond.net.au>
1885
1886         * bfd-in.h: Comment typo fix.  Formatting.
1887         * bfd-in2.h: Regenerate.
1888         * coff64-rs6000.c (xcoff64_openr_next_archived_file): Warning fix.
1889         * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): Prototype.
1890         * elf64-mmix.c (mmix_dump_bpo_gregs): Warning fix.
1891
1892 2002-12-05  Richard Henderson  <rth@redhat.com>
1893
1894         * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21BI.
1895         Only send PCREL21B though the plt.  Fix installed reloc type.
1896         (elfNN_ia64_relocate_section): Give error for dynamic reloc
1897         against PCREL22 or PCREL64I; clean up error messages for
1898         branch relocs.
1899
1900 2002-12-04  Kevin Buettner  <kevinb@redhat.com>
1901
1902         * elf64-mips.c (elf64_mips_grok_prstatus, elf64_mips_grok_psinfo):
1903         New functions.
1904         (elf_backend_grok_prstatus, elf_backend_grok_psinfo): Define.
1905
1906 2002-12-04  David Mosberger  <davidm@hpl.hp.com>
1907
1908         * cpu-ia64-opc.c: Add operand constant "ar.csd".
1909
1910 2002-12-04  H.J. Lu <hjl@gnu.org>
1911
1912         * elfxx-ia64.c (get_local_sym_hash): Use section ID instead of
1913         BFD address when constructing local name.
1914
1915 2002-12-04  Andreas Schwab  <schwab@suse.de>
1916
1917         * elf32-m68k.c (struct elf_m68k_link_hash_table): Add sym_sec
1918         member.
1919         (elf_m68k_link_hash_table_create): Initialize it.
1920         (elf_m68k_check_relocs): Handle symbols that are forced to be
1921         local due to visibility changes.
1922         (elf_m68k_adjust_dynamic_symbol): Likewise.
1923         (elf_m68k_size_dynamic_sections): Likewise.
1924         (elf_m68k_discard_copies): Likewise.
1925         (elf_m68k_relocate_section): Likewise.
1926
1927 2002-12-04  Alan Modra  <amodra@bigpond.net.au>
1928
1929         * elf64-ppc.c (ppc64_elf_edit_opd): Correct typo.
1930
1931 2002-12-04  Alan Modra  <amodra@bigpond.net.au>
1932
1933         * srec.c (srec_write_symbols): Restore '$' prefix to address
1934         accidentally removed in 2002-04-04 change.
1935         (srec_get_symtab): Use 0 instead of `(long) FALSE'.
1936
1937 2002-12-03  Nick Clifton  <nickc@redhat.com>
1938
1939         * elf32-ppc.c (apuinfo_list_init): New function.
1940         (apuinfo_list_add): New function: Add a value to the list.
1941         (apuinfo_list_length): New function: Return the number of
1942         values on the list.
1943         (apuinfo_list_element): New function: Return a value on the
1944         list.
1945         (apuinfo_list_finish): New function: Free the resources used
1946         by the list.
1947         (ppc_elf_begin_write_processing): New function.  Scan the
1948         input bfds for apuinfo sections.
1949         (ppc_elf_write_section): New function: Delay the creation of
1950         the contents of an apuinfo section in an output bfd.
1951         (ppc_elf_final_write_processing): New function.  Create the
1952         contents of an apuinfo section in an output bfd.
1953         (elf_backend_begin_write_processing): Define.
1954         (elf_backend_final_write_processing): Define.
1955         (elf_backend_write_section): Define.
1956
1957 2002-12-03  Richard Henderson  <rth@redhat.com>
1958
1959         * cpu-ia64-opc.c (elf64_ia64_operands): Add ldxmov entry.
1960
1961 2002-12-01  Stephane Carrez  <stcarrez@nerim.fr>
1962
1963         Fix PR savannah/1417:
1964         * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Don't adjust
1965         branch if it goes to the start of the deleted region.
1966
1967 2002-12-01  Stephane Carrez  <stcarrez@nerim.fr>
1968
1969         * bfd-in2.h (bfd_mach_m6812): Rebuild.
1970         * archures.c (bfd_mach_m6812_default, bfd_mach_m6812,
1971         bfd_mach_m6812s): Declare.
1972
1973         * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): New function.
1974         (_bfd_m68hc12_elf_set_private_flags): Call it.
1975         (_bfd_m68hc12_elf_print_private_bfd_data): Report processor version.
1976         (_bfd_m68hc12_elf_merge_private_bfd_data): Merge the flags and
1977         report microcontroller incompatibilities (HC12 vs HCS12).
1978         (elf_backend_object_p): Update.
1979
1980 2002-11-30  Alan Modra  <amodra@bigpond.net.au>
1981
1982         * bfd-in.h (TRUE_FALSE_ALREADY_DEFINED, BFD_TRUE_FALSE): Delete.
1983         (enum bfd_boolean, boolean): Delete.
1984         (bfd_boolean): Typedef to an int.
1985         (FALSE, TRUE): Define.
1986         * aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c, aout-cris.c,
1987         aout-encap.c, aout-ns32k.c, aout-target.h, aout-tic30.c, aoutf1.h,
1988         aoutx.h, archive.c, archive64.c, archures.c, bfd-in.h, bfd.c, bfdwin.c,
1989         binary.c, bout.c, cache.c, cisco-core.c, coff-a29k.c, coff-alpha.c,
1990         coff-apollo.c, coff-arm.c, coff-aux.c, coff-h8300.c, coff-h8500.c,
1991         coff-i386.c, coff-i860.c, coff-i960.c, coff-ia64.c, coff-m68k.c,
1992         coff-m88k.c, coff-mcore.c, coff-mips.c, coff-or32.c, coff-ppc.c,
1993         coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c, coff-tic30.c,
1994         coff-tic4x.c, coff-tic54x.c, coff-tic80.c, coff-w65.c, coff-we32k.c,
1995         coff-z8k.c, coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c,
1996         corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c, cpu-avr.c,
1997         cpu-cris.c, cpu-d10v.c, cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c,
1998         cpu-h8300.c, cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c,
1999         cpu-i860.c, cpu-i960.c, cpu-ia64.c, cpu-ip2k.c, cpu-m10200.c,
2000         cpu-m10300.c, cpu-m32r.c, cpu-m68hc11.c, cpu-m68hc12.c, cpu-m68k.c,
2001         cpu-m88k.c, cpu-mcore.c, cpu-mips.c, cpu-mmix.c, cpu-ns32k.c,
2002         cpu-openrisc.c, cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c,
2003         cpu-rs6000.c, cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c,
2004         cpu-tic4x.c, cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c,
2005         cpu-w65.c, cpu-we32k.c, cpu-xstormy16.c, cpu-z8k.c, dwarf1.c,
2006         dwarf2.c, ecoff.c, ecofflink.c, efi-app-ia32.c, efi-app-ia64.c,
2007         elf-bfd.h, elf-eh-frame.c, elf-hppa.h, elf-m10200.c, elf-m10300.c,
2008         elf-strtab.c, elf.c, elf32-arc.c, elf32-arm.h, elf32-avr.c,
2009         elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c, elf32-fr30.c,
2010         elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c, elf32-hppa.h,
2011         elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
2012         elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
2013         elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
2014         elf32-pj.c, elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-sh64-com.c,
2015         elf32-sh64.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
2016         elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
2017         elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
2018         elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c,
2019         elfarm-oabi.c, elfcode.h, elfcore.h, elflink.c, elflink.h,
2020         elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c, elfxx-mips.h,
2021         elfxx-target.h, format.c, freebsd.h, genlink.h, hash.c, hp300hpux.c,
2022         hppabsd-core.c, hpux-core.c, i386aout.c, i386linux.c, i386lynx.c,
2023         i386mach3.c, i386msdos.c, i386os9k.c, ieee.c, ihex.c, irix-core.c,
2024         libaout.h, libbfd-in.h, libbfd.c, libcoff-in.h, libecoff.h, libieee.h,
2025         libnlm.h, liboasys.h, libpei.h, libxcoff.h, linker.c, lynx-core.c,
2026         m68klinux.c, m68klynx.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c,
2027         mmo.c, netbsd-core.c, netbsd.h, nlm.c, nlm32-alpha.c, nlm32-i386.c,
2028         nlm32-ppc.c, nlm32-sparc.c, nlmcode.h, oasys.c, opncls.c, osf-core.c,
2029         pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c, pe-mcore.c, pe-mips.c,
2030         pe-sh.c, peXXigen.c, pef.c, pei-arm.c, pei-i386.c, pei-mcore.c,
2031         pei-mips.c, pei-sh.c, peicode.h, ppcboot.c, ptrace-core.c, reloc.c,
2032         reloc16.c, riscix.c, rs6000-core.c, sco5-core.c, section.c, simple.c,
2033         som.c, som.h, sparclinux.c, sparclynx.c, srec.c, stabs.c, sunos.c,
2034         syms.c, targets.c, tekhex.c, ticoff.h, trad-core.c, versados.c,
2035         vms-gsd.c, vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h,
2036         xcoff-target.h, xcofflink.c, xsym.c, xsym.h: Replace boolean with
2037         bfd_boolean, true with TRUE, false with FALSE.  Simplify comparisons
2038         of bfd_boolean vars with TRUE/FALSE.  Formatting.
2039         * bfd-in2.h, libbfd.h, libcoff.h: Regenerate
2040
2041 2002-11-28  Alan Modra  <amodra@bigpond.net.au>
2042
2043         * elf-bfd.h: Replace occurrences of Elf32_Internal_* and
2044         Elf64_Internal_* with Elf_Internal_*.  Replace Elf_Internal_Rel
2045         with Elf_Internal_Rela.
2046         * elf-hppa.h, elf-m10200.c, elf-m10300.c, elf32-arc.c, elf32-arm.h,
2047         elf32-avr.c, elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c,
2048         elf32-fr30.c, elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c,
2049         elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
2050         elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
2051         elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
2052         elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-v850.c, elf32-vax.c,
2053         elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
2054         elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
2055         elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c, elfarm-oabi.c,
2056         elfcode.h, elflink.h, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c: Ditto.
2057         * elf-hppa.h (elf_hppa_internal_shdr): Delete.  Use Elf_Internal_Shdr
2058         throughout instead.
2059         * elf.c (_bfd_elf_no_info_to_howto_rel): Delete.
2060         * elfcode.h (elf_swap_reloca_in): Pass source operand as a bfd_byte *.
2061         Remove INLINE keyword.
2062         (elf_swap_reloc_in): Likewise.  Also clear r_addend.
2063         (elf_swap_reloc_out, elf_swap_reloca_out): Pass destination operand
2064         as a bfd_byte *.
2065         (elf_write_relocs): Consolidate REL and RELA code.
2066         (elf_slurp_reloc_table_from_section): Simplify REL code.
2067         (NAME(_bfd_elf,size_info)): Populate reloc swap entries.
2068         * elf-bfd.h (MAX_INT_RELS_PER_EXT_REL): Define.
2069         * elflink.h (elf_link_read_relocs_from_section): Consolidate REL and
2070         RELA code.
2071         (elf_link_adjust_relocs): Likewise.  Don't malloc space for temp
2072         reloc array, use a fixed size of MAX_INT_RELS_PER_EXT_REL.
2073         (elf_link_output_relocs): Likewise.
2074         (elf_reloc_link_order): Likewise.
2075         (elf_finish_pointer_linker_section): Likewise.
2076         (struct elf_link_sort_rela): Remove union.
2077         (elf_link_sort_cmp1): Update to suit.
2078         (elf_link_sort_cmp2): Here too.
2079         (elf_link_sort_relocs): Consolidate REL and RELA code.  Fix memory
2080         over-allocation for int_rels_per_ext_rel != 1 case.
2081         * elf32-arm.h: Update all bfd_elf32_swap_reloc_out calls.
2082         * elf32-i386.c: Likewise.
2083         * elf32-cris.c: Likewise for bfd_elf32_swap_reloca_out.
2084         * elf32-hppa.c, elf32-i370.c, elf32-m68k.c, elf32-ppc.c, elf32-s390.c,
2085         elf32-sh.c, elf32-vax.c, elfxx-mips.c: Likewise.
2086         * elf64-alpha.c: Likewise for bfd_elf64_swap_reloca_out.
2087         * elf64-hppa.c, elf64-mips.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
2088         elf64-sparc.c, elf64-x86-64.c: Likewise.
2089         * elfxx-ia64.c: Likewise for bfd_elfNN_swap_reloca_out.
2090         * elfxx-mips.c (sort_dynamic_relocs): Likewise for
2091         bfd_elf32_swap_reloc_in.
2092
2093         * elf32-arm.h: Update elf32_arm_info_to_howto calls.
2094         * elf32-mips.c: Likewise for mips_info_to_howto_rel.
2095         (mips_elf64_swap_reloc_in): Zero r_addend.
2096         (mips_elf64_be_swap_reloc_in): Likewise.
2097         (mips_elf64_slurp_one_reloc_table): Simplify.
2098
2099         * elf64-alpha.c (alpha_elf_size_info): Populate reloc swap entries.
2100         * elf64-hppa.c (hppa64_elf_size_info): Likewise.
2101         * elf64-sparc.c (sparc64_elf_size_info): Likewise.
2102
2103 2002-11-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2104
2105         * elf32-sh.c (sh_elf_relocate_section): Don't complain about
2106         unresolved debugging relocs in dynamic applications.
2107         * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
2108
2109 2002-11-26  Alan Modra  <amodra@bigpond.net.au>
2110
2111         * elf-eh-frame.c (ENSURE_NO_RELOCS): Disregard R_*_NONE relocs.
2112         (_bfd_elf_discard_section_eh_frame): Don't discard duplicate CIEs
2113         on a relocatable link.  Comment typos.
2114         * elf.c (_bfd_elf_link_hash_newfunc): Assign elements of structure
2115         in the order they are declared.  Clear elf_hash_value too.
2116         (_bfd_elf_link_hash_table_init): Likewise assign in order.  Clear
2117         eh_info and tls_segment.
2118         * elflink.h (elf_link_input_bfd <emit_relocs>): Keep reloc offsets
2119         sorted when discarding relocs by turning them into R_*_NONE.
2120
2121         * libbfd.c (warn_deprecated): Comment spelling.
2122         * po/SRC-POTFILES.in: Regenerate.
2123
2124 2002-11-21  Richard Henderson  <rth@redhat.com>
2125
2126         * elflink.h (elf_link_add_object_symbols): Don't overwrite the
2127         arch's st_other bits when merging visibilities.
2128         (elf_link_output_extsym): Tidy clearing of visibility field.
2129
2130 2002-11-21  Alan Modra  <amodra@bigpond.net.au>
2131
2132         * coff-mcore.c (SWAP_IN_RELOC_OFFSET): Define.
2133         (SWAP_OUT_RELOC_OFFSET): Define.
2134
2135 2002-11-20  Alexandre Oliva  <aoliva@redhat.com>
2136
2137         * elf.c (_bfd_elf_link_hash_table_init): Make sure
2138         can_refcount is properly extended to the type of
2139         init_refcount.
2140
2141 2002-11-19  Alexandre Oliva  <aoliva@redhat.com>
2142
2143         * elfxx-mips.c (MIPS_RELOC_RELA_P): New macro.
2144         (_bfd_mips_elf_relocate_section): Use it.
2145
2146         * elfxx-mips.c (MNAME): New macro.
2147         (_bfd_mips_elf_check_relocs): Use it.
2148         (_bfd_mips_elf_discard_info): Likewise.
2149         (_bfd_mips_elf_final_link): Likewise.
2150
2151 2002-11-19  Alan Modra  <amodra@bigpond.net.au>
2152
2153         * elf64-ppc.c (ppc64_elf_edit_opd): When deleting relocs, adjust
2154         rel_hdr.sh_size too.
2155
2156 2002-11-18  Klee Dienes  <kdienes@apple.com>
2157
2158         * Makefile.am (BFD32_LIBS): Add bfdwin.lo, bfdio.lo.
2159         (BFD32_LIBS_CFILES): Add bfdwin.c, bfdio.c.
2160         (BFD_H_FILES): Add bfdwin.c, bfdio.c.
2161         (LIBBFD_H_FILES): Add bfdwin.c, bfdio.c.
2162         Add dependencies for bfdwin.c, bfdio.c.
2163         * bfd.c: Remove bfd_get_mtime, bfd_get_size.
2164         * libbfd.c: Remove real_read, bfd_bread, _bfd_window_internal,
2165         bfd_init_window, bfd_free_window, bfd_get_file_window, bfd_bwrite,
2166         bfd_tell, bfd_flush, bfd_stat, bfd_seek.
2167         * bfdio.c: New file.  Contains real_read, bfd_bread, bfd_write,
2168         bfd_tell, bfd_flush, bfd_stat, bfd_seek, bfd_ge_mtime,
2169         bfd_get_size (moved from libbfd.c and bfd.c).
2170         * bfdwin.c New file.  Contains _bfd_window_internal,
2171         bfd_init_window, bfd_free_window, bfd_get_file_window (moved from
2172         libbfd.c and bfd.c).
2173         * po/SRC-POTFILES.in: Regenerate.
2174         * po/bfd.pot: Regenerate.
2175         * libbfd.h: Regenerate.
2176         * bfd-in2.h: Regenerate.
2177         * aclocal.m4: Regenerate.
2178         * Makefile.in: Regenerate.
2179         * configure: Regenerate.
2180
2181 2002-11-18  Klee Dienes  <kdienes@apple.com>
2182
2183         * bfd.c (bfd_preserve_save): Don't zero BFD_IN_MEMORY.
2184
2185 2002-11-15  Kazu Hirata  <kazu@cs.umass.edu>
2186
2187         * coff-h8300.c (h8300_reloc16_estimate): Do not optimize away
2188         jsr after a short jump.
2189         * elf32-h8300.c (elf32_h8_relax_section): Likewise.
2190
2191 2002-11-15  Klee Dienes  <kdienes@apple.com>
2192
2193         * pef.c (bfd_pef_convert_architecture): Move declaration of
2194         ARCH_POWERPC and ARCH_M68K to the start of the function.
2195
2196 2002-11-14  Svein E. Seldal  <Svein.Seldal@solidas.com>
2197
2198         * coff-tic4x.c (tic4x_howto_table): Formatting fixup
2199
2200 2002-11-14  Hans-Peter Nilsson  <hp@bitrange.com>
2201
2202         * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs):
2203         For bpo_gregs_section->contents, allocate _raw_size, not
2204         _cooked_size.
2205
2206 2002-11-13  Klee Dienes  <kdienes@apple.com>
2207
2208         * config.bfd: Add entries for powerpc-*-darwin and cousins.
2209
2210 2002-11-13  H.J. Lu <hjl@gnu.org>
2211
2212         * elfcode.h (elf_object_p): Don't restore abfd->arch_info.
2213
2214 2002-11-13  Klee Dienes  <kdienes@apple.com>
2215             Alan Modra  <amodra@bigpond.net.au>
2216
2217         * bfd.c (struct bfd_preserve): New.
2218         (bfd_preserve_save): New function.
2219         (bfd_preserve_restore): Ditto.
2220         (bfd_preserve_finish): Ditto.
2221         * bfd-in2.h: Regenerate.
2222         * mach-o.c: Formatting.
2223         (bfd_mach_o_scan_read_symtab_symbol): Make "value" unsigned.
2224         (bfd_mach_o_object_p): Use bfd_preserve_save/restore/finish.
2225         (bfd_mach_o_core_p): Ditto.
2226         (bfd_mach_o_scan): Pass in mdata.
2227         * mach-o.h (bfd_mach_o_scan): Update prototype.
2228         * pef.c: Formatting.
2229         (bfd_pef_object_p): Use bfd_preserve_save/restore/finish.
2230         (bfd_pef_xlib_object_p): Ditto.
2231         (bfd_pef_scan): Pass in mdata.  Move version check to bfd_pef_object_p.
2232         * pef.h (bfd_pef_scan): Update prototype.
2233         * xsym.c: Formatting, K&R fixes.
2234         (bfd_sym_object_p): Use bfd_preserve_save/restore/finish.
2235         (bfd_sym_scan): New function split out from bfd_sym_object_p.
2236         * xsym.h (bfd_sym_scan): Declare.
2237         * elfcode.h (elf_object_p): Use bfd_preserve_save/restore/finish.
2238         * elfcore.h (elf_core_file_p): Likewise.
2239         * targets.c (_bfd_target_vector): Revert 2002-11-08 change.
2240
2241 2002-11-12  Nick Clifton  <nickc@redhat.com>
2242
2243         * po/da.po: Updated Danish translation.
2244
2245 2002-11-12  Alan Modra  <amodra@bigpond.net.au>
2246
2247         * elflink.h (elf_link_add_object_symbols): Optimize stabs for
2248         relocatable link too.
2249         (elf_link_input_bfd): When emitting relocs, adjust offsets for
2250         eh_frame and stab sections.  Zap deleted relocs.
2251         (elf_reloc_symbol_deleted_p): Return true for zero r_symndx.
2252         (elf_bfd_discard_info): Run for relocatable link too.
2253         * elf64-ppc.c (ppc64_elf_edit_opd): Rename from edit_opd.  Make global.
2254         Handle ld -r case.
2255         (ppc64_elf_size_dynamic_sections): Don't call edit_opd from here.
2256         * elf64-ppc.h (ppc64_elf_edit_opd): Declare.
2257
2258         * elf-bfd.h (struct cie_header): Move from elf_eh-frame.c.
2259         (struct cie, struct eh_cie_fde, struct eh_frame_sec_info): Likewise.
2260         (struct eh_frame_array_ent, struct eh_frame_hdr_info): Likewise.
2261         (enum elf_link_info_type): Remove ELF_INFO_TYPE_EH_FRAME_HDR.
2262         (struct eh_frame_hdr_info): Add "hdr_sec", remove "split".
2263         (struct elf_link_hash_table): Add eh_info.
2264         (struct elf_obj_tdata): Change eh_frame_hdr to an asection *.
2265         (_bfd_elf_discard_section_eh_frame): Update prototype.
2266         (_bfd_elf_discard_section_eh_frame_hdr): Likewise.
2267         (_bfd_elf_write_section_eh_frame): Likewise.
2268         (_bfd_elf_write_section_eh_frame_hdr): Likewise.
2269         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Remove "ehdrsec"
2270         param.  Get "hdr_info" from link hash table.
2271         (_bfd_elf_discard_section_eh_frame_hdr): Remove "sec" param.  Get
2272         header section from link hash table.  Save header section to elf_tdata.
2273         (_bfd_elf_maybe_strip_eh_frame_hdr): Remove local "sec".  Use
2274         header section from link hash table.  Don't alloc hdr_info.  Clear
2275         hdr_sec instead of setting "strip".
2276         (_bfd_elf_eh_frame_section_offset): Formatting.
2277         (_bfd_elf_write_section_eh_frame): Remove "ehdrsec", add "info" param.
2278         Get header section from link hash table.
2279         (_bfd_elf_write_section_eh_frame_hdr): Remove "sec", add "info" param.
2280         Get header section from link hash table.
2281         * elf.c (map_sections_to_segments): Use cached eh_frame_hdr.
2282         (get_program_header_size): Likewise.
2283         (_bfd_elf_section_offset): Formatting.
2284         * elflink.h (elf_link_create_dynamic_sections): Stash eh frame header
2285         section pointer in link hash table.
2286         (elf_bfd_final_link): Adjust _bfd_elf_write_section_eh_frame_hdr
2287         and _bfd_elf_write_section_eh_frame calls.  Update comment about
2288         eh_frame entries.
2289         (elf_bfd_discard_info): Adjust _bfd_elf_discard_section_eh_frame and
2290         _bfd_elf_discard_section_eh_frame_hdr calls.  Remove "ehdr".
2291
2292         * po/SRC-POTFILES.in: Regenerate.
2293
2294         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't zero
2295         relocs for discarded FDEs.  Remove dead code.
2296         (_bfd_elf_write_section_eh_frame_hdr): Remove dead code.
2297         * elflink.h (elf_bfd_discard_info): Don't save edited relocs.
2298         Tidy conditions under which stabs are edited.  Formatting.
2299         * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
2300         from discarded relocs.
2301         * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Add reloc output
2302         section adjustments after testing magic values.
2303
2304 2002-11-12  Thomas Moestl <tmm@FreeBSD.org>
2305
2306         * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Correct
2307         references to large plt symbols.
2308
2309 2002-11-12  Klee Dienes  <kdienes@apple.com>
2310
2311         * mach-o.c (bfd_mach_o_scan_read_thread): Don't re-use 'i' when
2312         looking for an unused section name.
2313
2314 2002-11-11  Kazu Hirata  <kazu@cs.umass.edu>
2315
2316         * coff-h8300.c: Fix formatting.
2317         * elf32-h8300.c: Likewise.
2318         * reloc16.c: Likewise.
2319
2320 2002-11-09  Jeroen Dobbelaere  <jeroen.dobbelaere@acunia.com>
2321
2322         * elf32-arm.h (elf32_arm_size_dynamic_sections): Don't strip output
2323         section when dynamic section unused;  _bfd_strip_section_from_output
2324         instead.
2325
2326 2002-11-08  Alan Modra  <amodra@bigpond.net.au>
2327
2328         * targets.c (_bfd_target_vector): Disable pef_vec, pef_xlib_vec
2329         and sym_vec.
2330
2331         * dwarf2.c: Revert last change.
2332
2333 2002-11-07  Michal Ludvig  <mludvig@suse.cz>
2334
2335         * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
2336         _bfd_dwarf2_find_nearest_line): Use
2337         bfd_simple_get_relocated_section_contents() instead of
2338         bfd_get_section_contents().
2339         * reloc.c (bfd_perform_relocation): Add sanity check.
2340         * simple.c (simple_get_relocated_section_contents): If the section
2341         does not have any relocs associated with it, just return the
2342         unadjusted contents.
2343
2344 2002-11-07  Hans-Peter Nilsson  <hp@axis.com>
2345
2346         * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOT,
2347         case R_CRIS_32_GOT>: Correct test for filling in constant .got
2348         contents, enabling for a non-DSO, for symbols defined in the
2349         program with --export-dynamic.
2350
2351 2002-11-07  Alan Modra  <amodra@bigpond.net.au>
2352
2353         * elf64-ppc.c: Comment typo fixes.
2354         (ppc64_elf_merge_private_bfd_data): Allow BFD_ENDIAN_UNKNOWN input.
2355
2356 2002-11-07  Nick Clifton  <nickc@redhat.com>
2357
2358         * po/da.po: Updated Danish translation.
2359
2360 2002-11-06  Alexandre Oliva  <aoliva@redhat.com>
2361
2362         * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Generate
2363         exactly three internal relocs per external reloc.  Set reloc_count
2364         to the external reloc count.
2365
2366 2002-11-06  Klee Dienes  <kdienes@apple.com>
2367
2368          * coff-stgo32.c (stub_bytes): Mark as const.
2369          Fix comment formatting.
2370
2371 2002-11-06  Klee Dienes  <kdienes@apple.com>
2372
2373         * Makefile.am (BFD32_BACKENDS): Add mach-o.lo, pef.lo, and
2374         xsym.lo.
2375         (BFD32_BACKENDS_CFILES): Add mach-o.c, pef.c, and xsym.c.
2376         (SOURCE_HFILES): Add mach-o.h, pef.h, pef-traceback.h, xsym.h
2377         * archures.c (enum bfd_architecture): Add bfd_arch_m98k.
2378         * bfd.c (struct bfd): Add private data for mach-o, pef, and sym.
2379         * targets.c (enum bfd_flavour): Add flavours for mach-o, pef, and
2380         sym.
2381         (_bfd_target_vector): Add target vectors for mach-o, pef, and sym.
2382         * Makefile.in: Regenerate.
2383         * doc/Makefile.in: Regenerate.
2384         * bfd-in2.h: Regenerate.
2385         * xsym.c: New file.  Contains support for the Apple/Metrowerks
2386         xSYM debugging format.
2387         * xsym.h: New file.
2388         * pef.c: New file.  Contains support for the Apple Code Fragment
2389         Manager Preferred Executable Format
2390         * pef.h: New file.
2391         * pef-traceback.h: New file.  Contains support for parsing PowerPC
2392         traceback tables as used by PEF executables (and perhaps other
2393         systems as well).
2394         * mach-o.c: New file.  Contains support for the Mach-O object file
2395         format.
2396         * mach-o.h: New file.
2397         * mach-o-target.c: New file.  Declares the mach-o targets
2398         themselves.  Included three times by mach-o.c; each time with a
2399         different set of macros set.
2400
2401 2002-11-06  Graeme Peterson  <gp@qnx.com>
2402
2403         * Makefile.am: Remove entries for elf32-qnx.[ch].
2404         * Makefile.in: Regenerate.
2405         * config.bfd: Change arm-nto to use bfd_elf32_{big|little}arm_vec,
2406         ppc-nto to use bfd_elf32_powerpc{le}_vec, sh-nto to use
2407         bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
2408         * configure.in: Remove support for bfd_elf32_sh{l}qnx_vec,
2409         bfd_elf32_powerpc{le}qnx_vec, bfd_elf32_{big|little}armqnx_vec,
2410         and bfd_elf32_i386qnx_vec, and removed elf32-qnx.lo from other targets.
2411         bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
2412         * configure: Regenerate.
2413         * elf32-qnx.c: Remove.
2414         * elf32-qnx.h: Remove.
2415         * elf.c: Remove calls to QNX specific set_nonloadable_filepos,
2416         is_contained_by_filepos, and copy_private_bfd_data_p.
2417         * elf-bfd.h (struct elf_backend_data): Remove set_nonloadable_filepos,
2418         is_contained_by_filepos, and copy_private_bfd_data_p.
2419         * elf32-i386.c: Remove QNX extended bfd support.
2420         * elf32-ppc.c: Remove QNX extended bfd support.
2421         * elf32-sh.c: Remove QNX extended bfd support.
2422         * elfarm-nabi.c: Remove QNX extended bfd support.
2423         * targets.c: Remove qnx vectors.
2424         * elfxx-target.h (elf_backend_set_nonloadable_filepos): Remove
2425         (elf_backend_is_contained_by_filepos): Remove.
2426         (elf_backend_copy_private_bfd_data_p): Remove.
2427         * po/SRC-POTFILES.in: Regenerate.
2428
2429 2002-11-06  David O'Brien  <obrien@FreeBSD.org>
2430             Alan Modra  <amodra@bigpond.net.au>
2431
2432         * elf64-sparc.c (sparc64_elf_relocate_section): Adjust addend of
2433         dynamic relocs against section symbols for the output section vma.
2434
2435 2002-11-05  Alan Modra  <amodra@bigpond.net.au>
2436
2437         * elf32-arm.h (t2a1_push_insn, t2a2_ldr_insn, t2a3_mov_insn,
2438         t2a4_bx_insn, t2a5_pop_insn, t2a6_bx_insn): Remove.
2439
2440 2002-11-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2441             Alan Modra  <amodra@bigpond.net.au>
2442
2443         * config.bfd (sh-*-linux*): Use bfd_elf*_sh64*lin_vec as sh64
2444         vectors in target_selvecs.
2445         (shle-*-netbsdelf*): Use bfd_elf*_sh64*nbsd_vec as sh64 vectors
2446         in target_selvecs.
2447         (sh-*-netbsdelf*): Likewise.
2448         * configure.in (assocvecs): New variable.  Handle assocvecs like
2449         selvecs.
2450         * configure: Regenerate.
2451         * format.c (bfd_check_format_matches): Store bfd_target pointers
2452         in matching_vector instead of target names.  Select first target
2453         from bfd_associated_vector that matches a list of ambiguous targets.
2454         * targets.c (_bfd_associated_vector): New array.
2455         (bfd_associated_vector): New variable.
2456         (_bfd_target_vector): Add bfd_elf*_sh64*lin_vec.
2457         * libbfd-in.h (bfd_associated_vector): Declare.
2458         * libbfd.h: Regenerate.
2459
2460 2002-11-05  Elias Athanasopoulos  <eathan@otenet.gr>
2461
2462         * vms-gsd.c (_bfd_vms_write_gsd): Check that symbol->udata.p is
2463         non-NULL before dereferencing.
2464
2465 2002-11-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2466
2467         * vms.c (vms_object_p): Restore the start address when returning
2468         NULL.
2469
2470 2002-11-04  Alan Modra  <amodra@bigpond.net.au>
2471             Hans-Peter Nilsson  <hp@axis.com>
2472
2473         * elflink.h (struct elf_final_link_info): Add shndxbuf_size.
2474         (elf_bfd_final_link): Don't bother zeroing symtab_hdr fields.
2475         Set up a larger symshndxbuf, and write it out.  Free it on
2476         exit rather than freeing symbuf twice.  Correct section index
2477         on output section symbol loop.
2478         (elf_link_output_sym): Accumulate symbol extension section
2479         indices, reallocating symshndxbuf rather than writing it out.
2480         (elf_link_flush_output_syms): Don't flush symshndxbuf.
2481         * elf.c (assign_section_numbers): Init i_shdrp to all zero.
2482         Use bfd_zalloc to clear i_shdrp[0] too.
2483
2484 2002-11-03  Stephen Clarke <stephen.clarke@earthling.net>
2485
2486          * elf32-sh64-com.c (sh64_address_in_cranges): Use
2487         _raw_size of cranges section if _cooked_size not yet set.
2488
2489 2002-11-03  Hans-Peter Nilsson  <hp@axis.com>
2490
2491         * elf32-v850.c (v850_elf_relax_delete_bytes): Correct parameters
2492         for bfd_elf32_swap_symbol_out.
2493
2494 2002-10-31  David O'Brien  <obrien@FreeBSD.org>
2495
2496         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't mix
2497         signed and unsigned in comparison.
2498
2499 2002-10-30  Daniel Jacobowitz  <drow@mvista.com>
2500
2501         * coffcode.h: Remove extraneous '\'.
2502
2503 2002-10-28  H.J. Lu <hjl@gnu.org>
2504
2505         * Makefile.am (targets.lo): Depend on Makefile instead of
2506         config.status.
2507         (archures.lo): Likewise.
2508         * Makefile.in: Regenerated.
2509
2510 2002-10-25  Jason Thorpe  <thorpej@wasabisystems.com>
2511
2512         * config.bfd (mips*el-*-netbsd*, mips*-*-netbsd*): Add
2513         bfd_elf64_bigmips_vec and bfd_elf64_littlemips_vec to
2514         targ_selvecs.
2515
2516 2002-10-25  Jim Wilson  <wilson@redhat.com>
2517
2518         * elf64-sh64.c (sh_elf64_relocate_section): Call
2519         _bfd_elf_rela_local_sym.  Handle relocs against STT_SECTION symbol
2520         of SHF_MERGE section.
2521
2522 2002-10-25  Hans-Peter Nilsson  <hp@axis.com>
2523
2524         * simple.c: Correct placement of ATTRIBUTE_UNUSED.
2525
2526 2002-10-24  John David Anglin  <dave@hiauly1.hia.nrc.ca>
2527
2528         * aoutx.h (NAME(aout,swap_ext_reloc_in)): Cast bytes->r_index to
2529         unsigned int.  Cast RELOC_BASE10, RELOC_BASE13 and RELOC_BASE22 to
2530         unsigned int.
2531         (NAME(aout,final_link)): Cast enum used in assignment.
2532         (aout_link_write_symbols): Cast enums in comparisons, int values to
2533         boolean, enums in assignments to int.
2534         (aout_link_input_section_std): Cast rel->r_index to unsigned int.
2535         (aout_link_input_section_ext): Likewise.  Cast enums used in comparisons
2536         with unsigned ints.
2537         (aout_link_reloc_link_order): Cast enum to int in assignment.
2538         * archive.c (_bfd_generic_read_ar_hdr_mag): Cast result of memchr
2539         calls to char *.
2540         * bfd-in.h (bfd_set_section_vma): Cast enum true to unsigned int in
2541         assignment.
2542         * bfd-in2.h (bfd_set_section_vma): Likewise.
2543         * bfd.c (bfd_record_phdr): Cast enums in assignments.
2544         * binary.c (bfd_alloc): Cast enum to long.
2545         * coffgen.c (_bfd_coff_is_local_label_name): Cast return to boolean.
2546         * dwarf2.c (read_abbrevs): Add casts to enum types.
2547         (read_attribute_value): Likewise.
2548         (arange_add): Cast result of bfd_zalloc call.
2549         (comp_unit_contains_address): Return true and false.
2550         (comp_unit_find_nearest_line): Cast return to boolean.
2551         * format.c (bfd_check_format_matches, bfd_set_format): Likewise.
2552         * gen-aout.c: define macro '_' if not defined.
2553         * libbfd.c (bfd_realloc): Cast malloc and realloc to PTR.
2554         (bfd_bwrite): Cast bfd_realloc to bfd_byte *.
2555         (bfd_write_bigendian_4byte_int): Cast return to boolean.
2556         (bfd_seek): Cast bfd_realloc to bfd_byte *.
2557         (bfd_generic_is_local_label_name): Cast return to boolean.
2558         * libcoff.h (_bfd_coff_adjust_symndx): Remove extraneous '\'.
2559         * linker.c (_bfd_link_hash_newfunc): Cast bfd_hash_allocate result to
2560         struct bfd_hash_entry *.
2561         (_bfd_generic_link_hash_newfunc): likewise.
2562         (_bfd_generic_final_link): Cast enum to unsigned int.
2563         * merge.c (sec_merge_emit): Cast return to boolean.
2564         (merge_strings): Add casts to const unsigned char *.
2565         * reloc.c (bfd_get_reloc_code_name): Cast enums in comparison to int.
2566         (bfd_generic_get_relocated_section_content): Cast enum to unsigned int.
2567         * section.c (bfd_section_hash_newfunc): Cast bfd_hash_allocate result to
2568         struct bfd_hash_entry *.
2569         (bfd_set_section_content): Add cast to PTR in comparison.
2570         * simple.c (simple_dummy_warning, simple_dummy_undefined_symbol,
2571         simple_dummy_reloc_overflow, simple_dummy_reloc_dangerous,
2572         simple_dummy_unattached_reloc,
2573         bfd_simple_get_relocated_section_contents): Add K&R declarations and
2574         function definitions.
2575         * srec.c (S3Forced): Initialize to false.
2576         (srec_get_symtab): Cast return value from bfd_alloc to asymbol *.
2577         * stabs.c (_bfd_link_section_stabs): Cast enum to int in comparisons.
2578         (_bfd_discard_section_stabs): Likewise.  Also cast return to boolean.
2579         * syms.c (bfd_is_undefined_symclass): Cast return to boolean.
2580         (_bfd_stab_section_find_nearest_line): Cast enum to bfd_byte in
2581         comparisons.
2582
2583 2002-10-23  Jakub Jelinek  <jakub@redhat.com>
2584
2585         * elf64-alpha.c (elf64_alpha_check_relocs): Only put maybe_dynamic
2586         relocs into shared lib non-allocated reloc sections.
2587
2588 2002-10-23  Nathan Tallent  <eraxxon@alumni.rice.edu>
2589
2590         * dwarf2.c (add_line_info): Ensure that the line_info_table is
2591         sorted even when given an out-of-order line sequence.
2592         (lookup_address_in_line_info_table): When an exact VMA match is
2593         not found, return line information with the closest VMA.
2594
2595 2002-10-23 Ross Alexander <ross.alexander@uk.neceur.com>
2596
2597         * elf64-hppa.c: Force DT_FLAGS to always be set.  Required by
2598         HPUX 11.00 patch PHSS_26559.
2599
2600 2002-10-22  Alexandre Oliva  <aoliva@redhat.com>
2601
2602         * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Don't move
2603         the options section into a separate section unless IRIX 6
2604         compatibility is enabled.
2605
2606 2002-10-22  Alexandre Oliva  <aoliva@redhat.com>
2607
2608         * elflink.h (struct elf_link_sort_rela): Turn rel and rela
2609         into arrays.
2610         (elf_link_sort_cmp1, elf_link_sort_cmp2): Adjust.
2611         (elf_link_sort_relocs): Likewise.  Take int_rels_per_ext_rel
2612         into account.
2613         * elfxx-mips.c (mips_elf_create_dynamic_relocation): Compose
2614         R_MIPS_REL32 with R_MIPS64 if ABI_64_P.
2615
2616 2002-10-21  Graeme Peterson  <gp@qnx.com>
2617
2618         * targets.c (_bfd_target_vector): Add missing qnx vectors.
2619
2620 2002-10-21  Alan Modra  <amodra@bigpond.net.au>
2621
2622         * targets.c (bfd_target_list): Don't return the default target twice.
2623
2624 2002-10-21  Elias Athanasopoulos  <eathan@otenet.gr>
2625
2626         * archive.c (_bfd_archive_bsd_update_armap_timestamp): Replace
2627         perror with bfd_perror.
2628
2629 2002-10-19  H.J. Lu <hjl@gnu.org>
2630
2631         * elflink.h (elf_link_add_object_symbols): Correctly handle
2632         DT_RPATH and DT_RUNPATH.
2633
2634 2002-10-19  Mark Kettenis  <kettenis@gnu.org>
2635
2636         * elf.c (elfcore_grok_note): Fix recognition on NT_PRXFPREG notes.
2637
2638 2002-10-17  Denis Chertykov  <denisc@overta.ru>
2639
2640         * elf32-ip2k.c (ELF_MACHINE_ALT1): Define alternate machine code
2641         for ip2k port.
2642
2643 2002-10-17  Alan Modra  <amodra@bigpond.net.au>
2644
2645         * elfxx-target.h (USE_REL): Don't define as 1.
2646         * elf32-arm.h (USE_REL): Provide a default define of 0.
2647         Use #if rather than #ifdef when testing USE_REL.
2648         * elf32-m32r.c: Likewise.
2649
2650         * elf32-arc.c (USE_REL): Define as 1.
2651         * elf32-d10v.c (USE_REL): Likewise.
2652         * elf32-m32r.c (USE_REL): Likewise.
2653         * elf32-m68hc11.c (USE_REL): Likewise.
2654         * elf32-m68hc12.c (USE_REL): Likewise.
2655         * elf32-or32.c (USE_REL): Likewise.
2656         * elfarm-nabi.c (USE_REL): Likewise.
2657
2658 2002-10-16  Jakub Jelinek  <jakub@redhat.com>
2659
2660         * config.bfd (s390-*-linux*): Add targ64_selvecs.
2661         (s390x-*-linux*): Add targ_selvecs.
2662
2663 2002-10-16  Alan Modra  <amodra@bigpond.net.au>
2664
2665         * Makefile.am (BFD32_BACKENDS): Remove elfarmqnx-nabi.lo,
2666         elf32-i386-fbsd.lo, elf32-i386qnx.lo, elf32-ppcqnx.lo,
2667         elf32-sh-lin.lo, elf32-sh64-lin.lo, elf32-sh-nbsd.lo,
2668         elf32-sh64-nbsd.lo, elf32-shqnx.lo.  Add elf32-qnx.lo.
2669         (BFD32_BACKENDS_CFILES): Likewise for corresponding C files.
2670         (BFD64_BACKENDS): Remove elf64-sh64-lin.lo, elf64-sh64-nbsd.lo.
2671         (BFD64_BACKENDS_CFILES): Likewise for corresponding C files.
2672         (SOURCE_HFILES): Add elf32-qnx.h.
2673         (BUILD_HFILES): Add bfdver.h.
2674         Run "make dep-am".
2675         * Makefile.in: Regenerate.
2676         * configure.in Update bfd vector dependencies.
2677         * configure: Regenerate.
2678         * elf32-i386-fbsd.c: Delete.  Move code to elf32-i386.c.
2679         * elf32-i386qnx.c: Likewise.
2680         * elf32-ppcqnx.c: Delete.  Move code to elf32-ppc.c.
2681         * elf32-sh-nbsd.c: Delete.  Move code to elf32-sh.c.
2682         * elf32-sh-lin.c: Likewise.
2683         * elf32-shqnx.c: Likewise.
2684         * elf32-sh64-lin.c: Delete.  Move code to elf32-sh64.c.
2685         * elf32-sh64-nbsd.c: Likewise.
2686         * elf64-sh64-lin.c: Delete.  Move code to elf64-sh64.c.
2687         * elf64-sh64-nbsd.c: Likewise.
2688         * elfarmqnx-nabi.c: Delete.  Move code to elfarm-nabi.c.
2689         * elf32-arm.h (ELF_MAXPAGESIZE): Always define.
2690         * elf32-i386.c: Remove ELF_ARCH and ELF32_I386_C_INCLUDED tests.
2691         * elf32-ppc.c: Remove ELF32_PPC_C_INCLUDED tests.
2692         * elf32-qnx.h (elf_backend_set_nonloadable_filepos): Always define.
2693         (elf_backend_is_contained_by_filepos): Likewise.
2694         (elf_backend_copy_private_bfd_data_p): Likewise.
2695         Globalize and move functions to..
2696         * elf32-qnx.c: ..here.  New file.
2697         * elf32-sh.c: Remove ELF_ARCH and ELF32_SH_C_INCLUDED tests.  Don't
2698         emit target vectors when INCLUDE_SHMEDIA.
2699         * elf32-sh64.c: Remove ELF_ARCH test.  Move TARGET_* etc. defines to
2700         end of file.
2701         * elf64-sh64.c: Remove ELF_ARCH test.
2702         * elfarm-nabi.c: Remove ELFARM_NABI_C_INCLUDED test.
2703         * po/BLD-POTFILES.in: Regenerate.
2704         * po/SRC-POTFILES.in: Regenerate.
2705
2706 2002-10-16  Alan Modra  <amodra@bigpond.net.au>
2707
2708         * elflink.h (elf_link_add_object_symbols): Error out on dynamic objects
2709         loaded with --just-symbols.
2710
2711         * elf32-i386qnx.c (TARGET_LITTLE_NAME): Define.
2712         * elf32-ppcqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
2713         * elf32-shqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
2714         * elfarmqnx-nabi.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
2715
2716 2002-10-15  Richard Henderson  <rth@redhat.com>
2717
2718         * Makefile.am (BFD64_BACKENDS): Remove elf64-alpha-fbsd.
2719         (BFD64_BACKENDS_CFILES): Likewise.
2720         * configure.in (bfd_elf64_alpha_freebsd_vec): Use elf64-alpha.
2721         * elf64-alpha-fbsd.c: Remove file, move code ...
2722         * elf64-alpha.c: ... here.
2723         * Makefile.in, configure: Rebuild.
2724
2725 2002-10-14  Richard Henderson  <rth@redhat.com>
2726
2727         * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: Increment
2728         VALUE, not ADDEND.
2729
2730 2002-10-14  Stephen Clarke <stephen.clarke@superh.com>
2731
2732         * elf32-sh.c (elf_sh_link_hash_entry): Replace
2733         datalabel_got_offset with union of datalabel_got
2734         offset and refcount.
2735         (sh_elf_link_hash_newfunc): Initialize datalabel_got.refcount.
2736         (allocate_dynrelocs): Delete unnecessary code for
2737         STT_DATALABEL type.  Create entry in got for
2738         datalabel version of symbol if datalabel_got.refcount > 0.
2739         (sh_elf_relocate_section): Use datalabel_got union.
2740         (sh_elf_gc_sweep_hook): Pull common code to initialize
2741         h and eh out of switch statement.  Declare seen_stt_datalabel.
2742         Initialize it.  Decrement datalabel_got.refcount for
2743         got relocs when seen_stt_datalabel is true.
2744         Decrement local_got_refcounts entry for datalabel got relocs
2745         of local symbols.
2746         (sh_elf_copy_indirect_symbol): Copy datalabel_got field over.
2747         (sh_elf_check_relocs): Declare seen_stt_datalabel.
2748         Initialize it.  When seen_stt_datalabel is true, increment
2749         datalabel_got refcount rather than got.refcount.
2750         (sh_elf_finish_dynamic_symbol): Create relocs to
2751         initialize got entry for datalabel version of symbol.
2752
2753 2002-10-14  Alan Modra  <amodra@bigpond.net.au>
2754
2755         * Makefile.am: Run "make dep-am".
2756         (BFD_H_FILES): Remove version.h.
2757         * bfd-in.h (BFD_VERSION, BFD_VERSION_DATE, BFD_VERSION_STRING): Move..
2758         * version.h: ..to here.
2759         * configure.in (bfd_version_date): Remove.
2760         (AC_OUTPUT): Make bfdver.h from version.h.
2761         * bfd.c: #include "bfdver.h".
2762         * vms-hdr.c: Likewise.
2763         * Makefile.in: Regenerate.
2764         * bfd-in2.h: Regenerate.
2765         * configure: Regenerate.
2766         * po/SRC-POTFILES.in: Regenerate.
2767
2768 2002-10-14  Alan Modra  <amodra@bigpond.net.au>
2769
2770         * archures.c (bfd_mach_i386_i386, bfd_mach_i386_i8086,
2771         bfd_mach_i386_i386_intel_syntax, bfd_mach_x86_64,
2772         bfd_mach_x86_64_intel_syntax bfd_mach_ppc, bfd_mach_ppc64,
2773         bfd_mach_rs6k, bfd_mach_d10v, bfd_mach_sh, bfd_mach_v850,
2774         bfd_mach_arc_5, bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8,
2775         bfd_mach_m32r, bfd_mach_frv, bfd_mach_frvsimple,
2776         bfd_mach_ia64_elf64, bfd_mach_ia64_elf32,
2777         bfd_mach_ip2022, bfd_mach_ip2022ext,
2778         bfd_mach_s390_31, bfd_mach_s390_64, bfd_mach_xstormy16): Renumber.
2779         * bfd-in2.h: Regenerate.
2780
2781 2002-10-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2782
2783         * config.bfd (sh*eb-*-linux*, sh*-*-linux*): Add the alternative
2784         endian vector to targ_selvecs.
2785
2786 2002-10-13  Alexandre Oliva  <aoliva@redhat.com>
2787
2788         * elfxx-mips.c (mips_elf_calculate_relocation): Take
2789         save_addend argument.  Don't apply the 32-bit mask to a
2790         GPREL32 value if it's to be used in another relocation.  Don't
2791         use forced-check computation of local_p to decide whether to
2792         add gp0 to GPREL16 value.  Don't use only the lowest 16 bits
2793         of the addend of a non-in-place GPREL16 relocation.
2794         (_bfd_mips_elf_relocate_section): Pass use_saved_addend_p to
2795         mips_elf_calculate_relocation().
2796
2797 2002-10-12  Stephane Carrez  <stcarrez@nerim.fr>
2798
2799         * elf32-m68hc11.c (m68hc11_elf_relax_section): Don't treat relocs
2800         with symbols in other sections if we relaxed something;  the sections
2801         output offsets must be re-computed before.
2802
2803 2002-10-12  Stephane Carrez  <stcarrez@nerim.fr>
2804
2805         * elf32-m68hc11.c (m68hc11_elf_relax_section): Update symbols
2806         handling to use Elf_Internal_Sym.
2807         (m68hc11_elf_relax_delete_bytes): Likewise.
2808
2809 2002-10-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2810
2811         * elf32-sh.c (sh_elf_optimized_tls_reloc, sh_elf_mkobject,
2812         sh_elf_object_p, dtpoff_base): New functions.
2813         (sh_elf_howto_table): Add TLS relocs.
2814         (sh_reloc_map): Likewise.
2815         (sh_elf_info_to_howto): Support TLS relocs.
2816         (elf_sh_link_hash_entry): Add tls_type and tls_tpoff32.
2817         (sh_elf_hash_entry, sh_elf_tdata, sh_elf_local_got_tls_type):
2818         New macros.
2819         (sh_elf_obj_tdata): New.
2820         (elf_sh_link_hash_table): Add tls_ldm_got.
2821         (sh_elf_link_hash_table_create): Clear refcount of tls_ldm_got.
2822         (allocate_dynrelocs): Support TLS relocs.
2823         (sh_elf_size_dynamic_sections): Likewise.
2824         (sh_elf_relocate_section): Support TLS relocs.  Don't try to find
2825         .rela.got section when found already.  Return false after printing
2826         error about unresolvable relocation.
2827         (sh_elf_gc_sweep_hook): Support TLS relocs.
2828         (sh_elf_check_relocs): Likewise.
2829         (sh_elf_finish_dynamic_symbol): Likewise.
2830         (bfd_elf32_mkobject, elf_backend_object_p): Define for TLS case.
2831         * reloc.c: Add SH TLS relocs.
2832         * bfd-in2.h, libbfd.h: Regenerate.
2833
2834 2002-10-11  Daniel Jacobowitz  <drow@mvista.com>
2835
2836         * Makefile.in: Regenerated.
2837
2838 2002-10-11  Daniel Jacobowitz  <drow@mvista.com>
2839
2840         * Makefile.am: Run dep-am.
2841         (BFD_H_DEP): Add simple.c and linker.c.
2842         (BFD32_LIBS): Add simple.lo.
2843         (BFD32_LIBS_CFILES): Add simple.c.
2844         * Makefile.in: Regenerated.
2845         * bfd-in2.h: Regenerated.
2846         * simple.c: New file.
2847
2848 2002-10-11  Alan Modra  <amodra@bigpond.net.au>
2849
2850         * coff-arm.c (record_arm_to_thumb_glue): Avoid type-punned pointers.
2851         (record_thumb_to_arm_glue): Likewise.
2852         * ecoff.c (ecoff_link_add_externals): Likewise.
2853         * elf32-arm.h (record_arm_to_thumb_glue): Likewise.
2854         (record_thumb_to_arm_glue): Likewise.
2855         * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
2856         * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
2857         * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
2858         * elf64-alpha.c (elf64_alpha_create_dynamic_sections): Likewise.
2859         * elf64-ppc.c (func_desc_adjust): Likewise.
2860         * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
2861         (sh64_elf64_create_dynamic_sections): Likewise.
2862         * elflink.c (_bfd_elf_create_got_section): Likewise.
2863         (_bfd_elf_create_dynamic_sections): Likewise.
2864         (_bfd_elf_create_linker_section): Likewise.
2865         * elflink.h (elf_add_default_symbol): Likewise.
2866         (elf_link_create_dynamic_sections): Likewise.
2867         (NAME(bfd_elf,size_dynamic_sections)): Likewise.
2868         * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Likewise.
2869         * elfxx-mips.c (mips_elf_create_got_section): Likewise.
2870         (_bfd_mips_elf_add_symbol_hook): Likewise.
2871         (_bfd_mips_elf_create_dynamic_sections): Likewise.
2872         * linker.c (generic_link_add_symbol_list): Likewise.
2873         * xcofflink.c (xcoff_link_add_symbols): Likewise.
2874
2875         * elfxx-ia64.c (oor_brl, oor_ip): Conditionally define.
2876
2877         * elf64-ppc.c (edit_opd): Only zero opd syms when function is
2878         completely removed.  Correct local sym adjustment.
2879
2880 2002-10-10  Stephen Clarke <stephen.clarke@superh.com>
2881
2882         * elf32-sh.c (elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
2883         Correct mistake in calculation of address of .got.
2884         * elf64-sh64.c (elf_sh64_pic_plt_entry_be,
2885         elf_sh64_pic_plt_entry_le): Likewise.
2886
2887 2002-10-09  Richard Shann <richard.shann@superh.com>
2888             Stephen Clarke <stephen.clarke@superh.com>
2889
2890         * Makefile.am: Add entries for elf32-sh64-lin.c and
2891         elf64-sh64-lin.c. Regenerate.
2892         * Makefile.in: Regenerate.
2893         * config.bfd:  Change sh64eb-*-linux* and sh64-*-linux*
2894         to use sh64 vectors rather than sh vectors.
2895         * configure.in: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
2896         bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
2897         * configure: Regenerate.
2898         * elf32-sh64-lin.c: New file.
2899         * elf64-sh64-lin.c: New file.
2900         * targets.c: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
2901         bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
2902
2903 2002-10-08  H.J. Lu <hjl@gnu.org>
2904
2905         * elf32-i386.c (elf_i386_relocate_section): Re-arrange the
2906         IE->LE transition for R_386_TLS_IE.
2907
2908 2002-10-08  Alan Modra  <amodra@bigpond.net.au>
2909
2910         * elf64-ppc.c (edit_opd): Correct test for discarded sections.
2911
2912 2002-10-07  Mark Elbrecht  <snowball3@softhome.net>
2913
2914         * cofflink.c (mark_relocs): Don't mark relocations in excluded
2915         sections.
2916
2917 2002-10-07  Alan Modra  <amodra@bigpond.net.au>
2918
2919         * elflink.h (elf_link_input_bfd): Remove BFD_VERSION_DATE dependent
2920         code.
2921
2922         * elf64-ppc.c (ppc64_elf_build_stubs): Increment .glink indx.
2923
2924 2002-10-06  Alan Modra  <amodra@bigpond.net.au>
2925
2926         * opncls.c: Formatting.
2927         (_bfd_new_bfd): Use a smaller section hash table.
2928
2929 2002-10-05  Alexandre Oliva  <aoliva@redhat.com>
2930
2931         * elfxx-mips.c (mips_elf_create_dynamic_relocation): Set the type
2932         of the other two relocations packed with a REL32 to NONE.
2933
2934 2002-10-02  Stephen Clarke <stephen.clarke@superh.com>
2935
2936         * elf32-sh.c (elf_sh_link_hash_entry): Add gotplt_refcount.
2937         (sh_elf_link_hash_newfunc): Initialize it.
2938         (allocate_dynrelocs): Transfer gotplt refs from plt.refcount
2939         to got.refcount for symbols that are forced local or when
2940         we have direct got refs.
2941         (sh_elf_gc_sweep_hook): Adjust gotplt_refcount.  Use it
2942         to correctly adjust got.refcount and plt.refcount.
2943         (sh_elf_copy_indirect_symbol): Copy gotplt_refcount across.
2944         (sh_elf_check_relocs): Increment gotplt_refcount.
2945
2946 2002-10-01  Jakub Jelinek  <jakub@redhat.com>
2947
2948         * elf32-i386.c (elf_i386_relocate_section): Fix
2949         movl foo@indntpoff, %eax IE->LE transition.
2950
2951 2002-10-01  Jakub Jelinek  <jakub@redhat.com>
2952
2953         * elf64-x86-64.c (elf64_x86_64_relocate_section): Change TLSGD
2954         sequence and its transitions.
2955
2956 2002-10-01  Jakub Jelinek  <jakub@redhat.com>
2957
2958         * elf32-i386.c (elf_i386_relocate_section): Resolve R_386_TLS_LDO_32
2959         to st_value + addend in non-code sections.
2960         * elf64-x86-64.c (elf64_x86_64_relocate_section): Resolve
2961         R_X86_64_DTPOFF32 to st_value + addend in non-code sections.
2962
2963 2002-09-30  Gavin Romig-Koch  <gavin@redhat.com>
2964             Ken Raeburn  <raeburn@cygnus.com>
2965             Aldy Hernandez  <aldyh@redhat.com>
2966             Eric Christopher  <echristo@redhat.com>
2967             Richard Sandiford  <rsandifo@redhat.com>
2968
2969         * archures.c (bfd_mach_mips4120, bfd_mach_mips5400): New.
2970         (bfd_mach_mips5500): New.
2971         * cpu-mips.c (I_mips4120, I_mips5400, I_mips5500): New.
2972         (arch_info_struct): Add corresponding entries here.
2973         * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_4120,
2974         E_MIPS_MACH_5400 and E_MIPS_MACH_5500.
2975         (_bfd_mips_elf_final_write_processing): Handle bfd_mach_mips4120,
2976         bfd_mach_mips5400 and bfd_mach_mips5500.
2977         (_bfd_mips_elf_mach_extends_p): New function.
2978         (_bfd_mips_elf_merge_private_bfd_data): Use it to help merge
2979         the EF_MIPS_MACH flags.
2980         * bfd-in2.h: Regenerate.
2981
2982 2002-09-28  Jason Thorpe  <thorpej@wasabisystems.com>
2983
2984         * elf32-vax.c (elf_vax_size_dynamic_section): Don't strip
2985         .got sections.
2986
2987 2002-09-28  Alan Modra  <amodra@bigpond.net.au>
2988
2989         * elf.c (map_sections_to_segments): Correct test for start of
2990         writable section in the same page as end of read-only section.
2991
2992 2002-09-27  Matt Thomas  <matt@3am-software.com>
2993
2994         * elf32-vax.c (elf_vax_check_relocs): Remove unused
2995         local_got_refcounts usage.  Remove allocation of got slot.
2996         (elf_vax_gc_sweep_hook): Remove unused local_got_refcounts usage.
2997         Remove de-allocation of got slot.
2998         (elf_vax_size_dynamic_section): Fix some indentation.  Add hash
2999         traversal for elf_vax_instantiate_got_entries.  Allow empty .got
3000         sections to be GC'ed.
3001         (elf_vax_instantiate_got_entries): New function.
3002         (elf_vax_relocate_section): Simplify R_VAX_GOT32 handling.  Remove
3003         tests that are now handled by elf_vax_instantiate_got_entries.
3004         Assert GOT entry falls within .got section size.  Remove redundant
3005         comparisions.  Fix comments.
3006
3007 2002-09-27  Jakub Jelinek  <jakub@redhat.com>
3008
3009         * reloc.c: Add x86-64 TLS relocs.
3010         * bfd-in2.h, libbfd.h: Rebuilt.
3011         * elf64-x86-64.c (x86_64_elf_howto): Fix size fields for 32-bit
3012         relocs.  Add TLS relocs.
3013         (x86_64_reloc_map): Add TLS relocs.
3014         (elf64_x86_64_info_to_howto): Adjust for added TLS relocs.
3015         (struct elf64_x86_64_link_hash_entry): Add tls_type field.
3016         (GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD, GOT_TLS_IE): Define.
3017         (elf64_x86_64_hash_entry): Define.
3018         (struct elf64_x86_64_obj_tdata): New.
3019         (elf64_x86_64_tdata, elf64_x86_64_local_got_tls_type): Define.
3020         (struct elf64_x86_64_link_hash_table): Add tls_ld_got.
3021         (link_hash_newfunc): Initialize tls_type.
3022         (elf64_x86_64_link_hash_table_create): Initialize tls_ld_got.
3023         (elf64_x86_64_copy_indirect_symbol): Swap tls_type if necessary.
3024         (elf64_x86_64_mkobject): New.
3025         (elf64_x86_64_elf_object_p): Allocate struct elf64_x86_64_obj_tdata.
3026         (elf64_x86_64_tls_transition): New.
3027         (elf64_x86_64_check_relocs): Add r_type variable and use it.
3028         Handle TLS relocs.
3029         (elf64_x86_64_gc_sweep_hook): Handle TLS relocs.
3030         (allocate_dynrelocs): Allocate GOT space for TLS relocs.
3031         (elf64_x86_64_size_dynamic_sections): Likewise.
3032         (dtpoff_base, tpoff): New.
3033         (elf64_x86_64_relocate_section): Handle TLS relocs.
3034         (elf64_x86_64_finish_dynamic_symbol): Only handle non-TLS GOT
3035         entries.
3036         (bfd_elf64_mkobject): Define.
3037
3038         * elf32-i386.c (elf_i386_check_relocs) [R_386_TLS_LE]: Set
3039         DF_STATIC_TLS if shared.
3040
3041 2002-09-26  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3042
3043         * elfxx-mips.c (_bfd_mips_elf_fake_sections): Don't emit unneeded
3044         empty relocation sections.
3045
3046 2002-09-26  Alan Modra  <amodra@bigpond.net.au>
3047
3048         * elf64-ppc.c (ppc_build_one_stub): Don't build glink stubs here.
3049         (ppc64_elf_build_stubs): Build them here instead.
3050
3051 2002-09-24  Jakub Jelinek  <jakub@redhat.com>
3052
3053         * elf32-sparc.c (elf32_sparc_relocate_section): Put R_SPARC_RELATIVE
3054         addend into r_addend, not *r_offset.
3055         (elf32_sparc_finish_dynamic_symbol): Likewise.
3056         * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Clear xword at
3057         R_SPARC_RELATIVE's r_offset.
3058
3059 2002-09-23  Nathan Tallent  <eraxxon@alumni.rice.edu>
3060
3061         * dwarf2.c (decode_line_info): Update to correctly decode
3062         the (non-standard DWARF2) out-of-order address sequences
3063         generated by the Intel C++ 6.0 compiler for ia64-Linux.
3064
3065 2002-09-23  Mark Elbrecht  <snowball3@softhome.net>
3066
3067         * config.bfd: For DJGPP targets, match with any cpu and any machine.
3068
3069 2002-09-23  Alan Modra  <amodra@bigpond.net.au>
3070
3071         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Zero relocs
3072         for discarded FDEs.  Remove redundant assignment.
3073         * elflink.h (elf_bfd_discard_info): Save edited relocs.
3074
3075 2002-09-22  H.J. Lu <hjl@gnu.org>
3076
3077         * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Don't merge
3078         the relocation count between different .reloc sections.
3079
3080 2002-09-21  Alan Modra  <amodra@bigpond.net.au>
3081
3082         * elf32-ppc.c (ppc_elf_relocate_section): Allow ".sbss.*" and
3083         ".sdata.*" for R_PPC_SDAREL16, ".sbss2*" and ".sdata2*" for
3084         R_PPC_EMB_SDA2REL.  Similarly for R_PPC_EMB_SDA21 and
3085         R_PPC_EMB_RELSDA.
3086
3087         * elfcode.h (elf_slurp_reloc_table_from_section): Make "symcount"
3088         unsigned.  Move "symcount" assignment out of loop.
3089         * Makefile.am: Run "make dep-am".
3090         * Makefile.in: Regenerate.
3091         * configure: Regenerate.
3092         * po/SRC-POTFILES.in: Regnerate.
3093
3094 2002-09-19  Nathan Tallent  <eraxxon@alumni.rice.edu>
3095
3096         * dwarf2.c (_bfd_dwarf2_find_nearest_line): If address length is
3097         zero, set it to 8 for (non-standard) 64-bit DWARF2 formats
3098         (e.g. IRIX64).
3099
3100 2002-09-19  Jakub Jelinek  <jakub@redhat.com>
3101
3102         * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Clear .got word
3103         even if generating R_PPC_RELATIVE reloc.
3104         (ppc_elf_relocate_section): Make sure relocation is performed
3105         if skip == -2.  Clear memory at r_offset when creating dynamic
3106         relocation.
3107
3108 2002-09-19  Jakub Jelinek  <jakub@redhat.com>
3109
3110         * reloc.c (BFD_RELOC_386_TLS_TPOFF, BFD_RELOC_386_TLS_IE,
3111         BFD_RELOC_386_TLS_GOTIE): Add.
3112         * bfd-in2.h, libbfd.h: Rebuilt.
3113         * elf32-i386.c (elf_howto_table): Add R_386_TLS_TPOFF, R_386_TLS_IE
3114         and R_386_TLS_GOTIE.
3115         (elf_i386_reloc_type_lookup): Handle it.
3116         (struct elf_i386_link_hash_entry): Change tls_type type to unsigned
3117         char instead of enum, change GOT_* into defines.
3118         (GOT_TLS_IE_POS, GOT_TLS_IE_NEG, GOT_TLS_IE_BOTH): Define.
3119         (elf_i386_tls_transition): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
3120         (elf_i386_check_relocs): Likewise.  Avoid crash if local symbol is
3121         accessed both as normal and TLS symbol.  Move R_386_TLS_LDM and
3122         R_386_PLT32 cases so that R_386_TLS_IE can fall through.
3123         Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
3124         (elf_i386_gc_sweep_hook): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
3125         Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
3126         (allocate_dynrelocs): Allocate 2 .got and 2 .rel.got entries if
3127         tls_type is GOT_TLS_IE_BOTH.
3128         (elf_i386_size_dynamic_sections): Likewise.
3129         (elf_i386_relocate_section): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
3130         Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
3131         (elf_i386_finish_dynamic_symbol): Use tls_type & GOT_TLS_IE to catch
3132         all 4 GOT_TLS_* TLS types.
3133
3134 2002-09-19  Nick Clifton  <nickc@redhat.com>
3135
3136         * elflink.h (elf_fix_symbol_flags): When examining weak symbols,
3137         follow indirect links.
3138
3139 2002-09-19  Nathan Tallent  <eraxxon@alumni.rice.edu>
3140
3141         * ecoffswap.h (ecoff_swap_pdr_in) <isym, iline>: Update to
3142         correctly sign-extend 32-bit ECOFF null values (0xffffffff, -1)
3143         on 64 bit machines.
3144         (ecoff_swap_sym_in) <iss>: Likewise.
3145         * ecoff.c (_bfd_ecoff_slurp_symbolic_info): Fix error reading
3146         ECOFF information: 'ioptMax' refers to the actual *size*
3147         of the optimization symtab, not the number of entries.
3148
3149 2002-09-19  Daniel Jacobowitz  <drow@mvista.com>
3150
3151         * elf32-arm.h (elf32_arm_adjust_dynamic_symbol): Update
3152         ELF_LINK_HASH_NEEDS_PLT logic.
3153
3154 2002-09-18  Daniel Jacobowitz  <drow@mvista.com>
3155
3156         * elfcode.h (elf_slurp_reloc_table_from_section): Check
3157         correct relocation count.
3158
3159 2002-09-17  Daniel Jacobowitz  <drow@mvista.com>
3160
3161         * bfd-in.h (bfd_get_dynamic_symcount): Define.
3162         * bfd.c (struct _bfd): Add dynsymcount.
3163         * bfd-in2.h: Regenerated.
3164         * elf.c (_bfd_elf_canonicalize_dynamic_symtab): Set
3165         abfd->dynsymcount.
3166         * elfcode.h (elf_slurp_reloc_table_from_section): Check
3167         for overflow.
3168
3169 2002-09-17  Stan Cox <scox@redhat.com>
3170
3171         * elf64-mips.c (mips_elf64_be_swap_reloca_out): Handle type2 and type3.
3172         (mips_elf64_final_gp): Don't make up gp value.
3173         * elfn32-mips.c (mips_elf_final_gp): Likewise.
3174         * elfxx-mips.c (_bfd_mips_elf_final_link): Always create
3175         .MIPS.options/.options section.
3176
3177 2002-09-17  David O'Brien  <obrien@FreeBSD.org>
3178
3179         * elf32-i386-fbsd.c: Always label using the EI_OSABI method.
3180         It is benign for FreeBSD < 4.1.  Minor reformatting.
3181         * elf64-alpha-fbsd.c: Likewise.
3182
3183 2002-09-17  Jakub Jelinek  <jakub@redhat.com>
3184
3185         * elf32-i386.c (elf_i386_relocate_section) [R_386_TLS_TPOFF32]: Negate
3186         addend.
3187
3188 2002-09-17  Alan Modra  <amodra@bigpond.net.au>
3189
3190         * elf64-alpha.c (alpha_elf_size_info): Make static.
3191
3192 2002-09-17  Svein E. Seldal  <Svein.Seldal@solidas.com>
3193
3194         * coff-tic4x.c: Add function declarations and ATTRIBUTE_UNUSED.
3195         * cpu-tic4x.c: Ditto.
3196
3197 2002-09-17  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3198
3199         * elf64-mips.c (define elf_backend_ignore_discarded_relocs): Remove
3200         duplicate define.
3201
3202 2002-09-16  Bruno Haible  <bruno@clisp.org>
3203
3204         * elf32-i386.c: Don't defined ELF_ARCH etc. if this file is included
3205         by a target variant implementation.
3206         * elf64-alpha.c: Likewise.
3207         * elf32-i386-fbsd.c: New file.
3208         * elf64-alpha-fbsd.c: New file.
3209         * targets.c: Support bfd_elf32_i386_freebsd_vec and
3210         bfd_elf64_alpha_freebsd_vec.
3211         * configure.in: Accept the vectors bfd_elf32_i386_freebsd_vec,
3212         bfd_elf64_alpha_freebsd_vec.
3213         * Makefile.am (BFD32_BACKENDS): Add elf32-i386-fbsd.lo.
3214         (BFD32_BACKENDS_CFILES): Add elf32-i386-fbsd.c.
3215         (BFD64_BACKENDS): Add elf64-alpha-fbsd.lo.
3216         (BFD64_BACKENDS_CFILES): Add elf64-alpha-fbsd.c.
3217         (elf32-i386-fbsd.lo, elf64-alpha-fbsd.lo): Add dependencies.
3218         * config.bfd: For FreeBSD targets, set targ_defvec to a FreeBSD
3219         specific targets. Define OLD_FREEBSD_ABI_LABEL if appropriate.
3220
3221 2002-09-12  Jakub Jelinek  <jakub@redhat.com>
3222
3223         * elf32-i386.c (dtpoff_base, tpoff): Don't crash if tls_segment is
3224         NULL.
3225         (elf_i386_relocate_section): Return false after printing error about
3226         unresolvable relocation.
3227
3228 2002-09-12  Nick Clifton  <nickc@redhat.com>
3229
3230         * elf32-arm.h (elf32_arm_final_link_relocate): Fix handling of
3231         R_ARM_THM_PC11.
3232
3233 2002-09-11  Jeffrey Law  <law@redhat.com>
3234
3235         * elf32-h8300.c (elf32_h8_relax_section): Fix typo.
3236
3237 2002-09-11  Andrew Haley  <aph@cambridge.redhat.com>
3238
3239         * elf.c (_bfd_elf_find_nearest_line): Check functionname_ptr and
3240         line_ptr before deciding we've found a symbol.
3241
3242 2002-09-11  Nick Clifton  <nickc@redhat.com>
3243
3244         * po/da.po: New Danish translation file.
3245         * configure.in (LINGUAS): Add 'da'.
3246         * configure: Regenerate.
3247
3248 2002-09-10  Michael Snyder  <msnyder@redhat.com>
3249
3250         * irix-core.c (do_sections, do_sections64): New functions.
3251         (irix_core_core_file_p): Call new functions do_sections,
3252         do_sections64, depending on corefile (32-bit or 64-bit).
3253
3254 2002-09-09  Richard Henderson  <rth@redhat.com>
3255
3256         * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21M
3257         and PCREL21F like PCREL21B.
3258
3259 2002-09-04  Kevin Buettner  <kevinb@redhat.com>
3260
3261         * config.bfd (mips*-*-irix6*): Add new ABI vectors.  Make n32 default
3262         vector.
3263
3264 2002-09-02  Nick Clifton  <nickc@redhat.com>
3265
3266         * elf32-v850.c (v850_elf_final_link_relocate): Use helpful
3267         names instead of cryptically overloaded bfd_reloc error
3268         codes.
3269         (v850_elf_relocate_section): Likewise.
3270         (v850_elf_relax_section): Replace caching of external symbols
3271         with caching of internal symbols obtained from calling
3272         bfd_elf_get_elf_syms().
3273         Fixup problems with freeing cached allocated memory blocks.
3274
3275 2002-09-02  Alan Modra  <amodra@bigpond.net.au>
3276
3277         * cpu-pj.c (scan_mach, compatible, arch_info_struct): Remove.
3278         (bfd_pj_arch): Use bfd_default_scan.
3279         * cpu-v850.c (scan): Remove.
3280         (N): Use bfd_default_scan.
3281         * cpu-z8k.c (scan_mach): Remove.
3282         (arch_info_struct, bfd_z8k_arch): Reorganize so that the default is
3283         first.  Use bfd_default_scan.
3284
3285         * ecoff.c (_bfd_ecoff_set_arch_mach_hook): Don't use hard-coded
3286         bfd_mach constants.
3287         (ecoff_get_magic): Likewise.
3288         * elf32-v850.c (v850_elf_object_p): Likewise.
3289         (v850_elf_final_write_processing): Likewise.
3290         * mipsbsd.c (MY(set_arch_mach)): Likewise.
3291         (MY(write_object_contents)): Likewise.
3292         * coff64-rs6000.c (xcoff64_write_object_contents): Likewise.
3293         * coffcode.h (coff_write_object_contents): Likewise.
3294         (coff_set_arch_mach_hook): Add comment describing machine == 0.
3295         Remove unnecessary "machine" assignments.
3296         (coff_write_relocs): Test for the absolute section sym by testing
3297         section and flags.
3298
3299         * aoutx.h (NAME(aout,machine_type)): Recognize bfd_mach_i386_i386
3300         and bfd_mach_i386_i386_intel_syntax.
3301         * pdp11.c (NAME(aout,machine_type)): Likewise.
3302
3303 2002-08-30  John David Anglin  <dave@hiauly1.hia.nrc.ca>
3304
3305         * bfd-in.h (align_power): Cast constants to bfd_vma type.
3306         * bfd-in2.h (align_power): Likewise.
3307
3308 2002-08-30  Alan Modra  <amodra@bigpond.net.au>
3309
3310         * Makefile.am: Run "make dep-am".
3311         * Makefile.in: Regenerate.
3312
3313         * cpu-avr.c (compatible): Don't use hard-coded mach constants.
3314         * cpu-powerpc.c (powerpc_compatible): Likewise.
3315         * cpu-rs6000.c (rs6000_compatible): Likewise.
3316
3317 2002-08-28  Catherine Moore  <clm@redhat.com>
3318
3319         * elf32-v850.c (v850_elf_reloc_map):  Add new relocs.
3320         (v850-elf-reloc): Don't resolve pc relative relocs.
3321         (v850_elf_ignore_reloc): New routine.
3322         (v850_elf_final_link_relocate): Handle new relocs.
3323         (v850_elf_relax_delete_bytes ): New routine.
3324         (v850_elf_relax_section): New routine.
3325         (bfd_elf32_bfd_relax_section): Define.
3326         (HOWTO): New entries for new relocs.
3327         * reloc.c (BFD_RELOC_V850_LONGCALL): New reloc.
3328         (BFD_RELOC_V850_LONGJUMP): New reloc.
3329         (BFD_RELOC_V850_ALIGN): New reloc.
3330         * archures.c: Remove redundant v850ea architecture.
3331         * cpu-v850.c: Remove redundant v850ea support.
3332         * libbfd.h: Regenerate.
3333         * bfd-in2.h: Regenerated.
3334
3335 2002-08-28  Svein E. Seldal  <Svein.Seldal@solidas.com>
3336
3337         * config.bfd: Add tic4x-*-*coff* and c4x-*-*coff* target.
3338         * configure.in: Add tic4x_coff vector files.
3339         * configure: Regenerate.
3340         * Makefile.am: Add tic4x target.
3341         * Makefile.in: Regenerate.
3342
3343 2002-08-27  Michael Hayes <m.hayes@elec.canterbury.ac.nz>
3344
3345         * archures.c: Add the BFD arch type tic4x.
3346         * bfd-in.h: Add BFD_IN_MEMORY flag.
3347         * coff-tic4x.c: New file.
3348         * coffswap.h (coff_swap_sym_out): Add preadjuster.
3349         * cpu-tic4x.c: New file.
3350         * targets.c: Added tic4x- in list of xvecs.
3351         * ticoff.h: New file.
3352         * bfd-in2.h: Regenerate.
3353
3354 2002-08-27  Adam Nemet  <anemet@lnxw.com>
3355
3356         * elf32-arm.h (elf32_arm_finish_dynamic_sections): Set the last
3357         bit of DT_INIT and DT_FINI for Thumb functions.
3358
3359 2002-08-26  Alan Modra  <amodra@bigpond.net.au>
3360
3361         * coffcode.h (coff_set_arch_mach_hook): Handle W65MAGIC.
3362
3363 2002-08-26  Alan Modra  <amodra@bigpond.net.au>
3364
3365         * aoutx.h (NAME(aout,reloc_type_lookup)): Handle BFD_RELOC_8.
3366
3367 2002-08-24  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3368
3369         * elf32-sh.c (sh_elf_copy_indirect_symbol): New.
3370         (create_got_section, allocate_dynrelocs, readonly_dynrelocs):
3371         Likewise.
3372         (struct elf_sh_pcrel_relocs_copied): Removed.
3373         (struct elf_sh_dyn_relocs): New.
3374         (struct elf_sh_link_hash_entry): Replace pcrel_relocs_copied
3375         field with dyn_relocs.
3376         (struct elf_sh_link_hash_table): Add short-cuts to get dynamic
3377         sections and sym_sec.
3378         (sh_elf_link_hash_newfunc): Clear dyn_relocs.
3379         (sh_elf_link_hash_table_create): Clear shorts-cuts and sym_sec.
3380         (sh_elf_create_dynamic_sections): Use create_got_section instead
3381         of _bfd_elf_create_got_section.
3382         (sh_elf_check_relocs): Likewise.
3383         (sh_elf_create_dynamic_sections): Use short-cuts to the dynamic
3384         sections.
3385         (sh_elf_adjust_dynamic_symbol, sh_elf_size_dynamic_sections,
3386         sh_elf_relocate_section, sh_elf_check_relocs,
3387         sh_elf_finish_dynamic_symbol, sh_elf_finish_dynamic_sections):
3388         Likewise.
3389         (sh_elf_adjust_dynamic_symbol): Handle nocopyreloc. Keep the
3390         dynamic relocations and avoiding the copy relocation when we
3391         didn't find any dynamic relocations in the section which has
3392         contents or is read-only.
3393         (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
3394         (sh_elf_size_dynamic_sections): Don't reset the size of
3395         .rela.got section even if dynamic_sections_created flag is off.
3396         Don't use sh_elf_discard_copies. Scan all input bfd and use
3397         allocate_dynrelocs. Call readonly_dynrelocs to determine
3398         whether we need DT_TEXTREL.
3399         (sh_elf_adjust_dynamic_symbol): Use plt.refcount to determine
3400         whether the symbol was never referred to.
3401         (sh_elf_relocate_section): Use WILL_CALL_FINISH_DYNAMIC_SYMBOL.
3402         (sh_elf_gc_sweep_hook): Fill with the real sweep function.
3403         (sh_elf_check_relocs): Call create_got_section if the short-cut
3404         to .got is null. Increment reference counters only instead of
3405         allocating space on dynamic sections here. Don't conditionalize
3406         uninitialized got.offset value when marking the symbol as a
3407         global offset table entry. Keep relocations for symbols satisfied
3408         by a dynamic library to avoid copy relocations for the symbol.
3409         Set dynobj field of an elf hash table if needed.
3410         (sh_elf_finish_dynamic_sections): Handle null section pointer
3411         correctly.
3412         (elf_backend_copy_indirect_symbol): Defined.
3413         (elf_backend_can_refcount): Defined.
3414
3415 2002-08-23  Nick Clifton  <nickc@redhat.com>
3416
3417         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Undo
3418         previous change.  Add comment explaining why.
3419
3420 2002-08-23  Stephen Clarke <stephen.clarke@superh.com>
3421
3422         * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le): Copy
3423         contents of .got.plt[2] to tr0, not address of .got.plt.
3424         (sh_elf_finish_dynamic_symbol): Do not apply GOT_BIAS when
3425         patching absolute plt entry. For shmedia plt entry, set bottom bit
3426         of branch to plt0 as this is a branch to an shmedia instruction.
3427         * elf64-sh64.c (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le):
3428         Copy contents of .got.plt[2] to tr0, not address of .got.plt.
3429         (elf_sh64_plt_entry_be, elf_sh64_plt_entry_le): Use ptrel to
3430         branch to plt0.
3431         (sh64_elf64_finish_dynamic_symbol): Do not apply GOT_BIAS when
3432         patching absolute plt entry. For shmedia plt entry, branch to
3433         plt0 is now ptrel, so use relative offset.  Set bottom bit of
3434         branch target as it is a branch to an shmedia instruction.
3435
3436 2002-08-23  Stephen Clarke <stephen.clarke@superh.com>,
3437             Richard Shann <richard.shann@superh.com>
3438
3439         * elf32-sh.c (sh_elf_finish_dynamic_sections): Set LSB of DT_INIT
3440         value if .init is an SHmedia function.  Similarly for DT_FINI.
3441         * elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Likewise.
3442
3443 2002-08-23  Stephen Clarke <stephen.clarke@superh.com>
3444
3445         * elf32-sh.c (sh_elf_size_dynamic_sections): Zero initialize
3446         dynamic section.
3447         * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
3448
3449 2002-08-22  Kaz Kojima <kkojima@rr.iij4u.or.jp>
3450
3451         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use a simple
3452         byte read when reading the return address register column.
3453
3454 2002-08-22  Nick Clifton  <nickc@redhat.com>
3455
3456         * config.bfd: Add powepc64-*-*bsd* target.
3457
3458 2002-08-22  Graeme Peterson  <gp@qnx.com>
3459
3460         * Makefile.am: Add entries for elf32-shqnx.c
3461         * Makefile.in: Regenerate.
3462         * config.bfd: Add support sh-*-nto* target.
3463         * configure.in: Add support for bfd_elf32_sh{l}qnx_vec.
3464         * configure: Regenerate.
3465         * elf32-qnx.h: Changed typo "elf_i386qnx_*" to "elf_qnx_*" .
3466         * elf32-sh.c: Do not include elf32-target.h if
3467         ELF32_SH_C_INCLUDED is defined.
3468         * elf32-shqnx.c: New file: Support for QNX.
3469         * targets.c: Add bfd_elf32_sh{l}qnx_vec.
3470
3471 2002-08-22  Nick Clifton  <nickc@redhat.com>
3472
3473         * po/tr.po: Updated Turkish translation.
3474
3475         * syms.c (_bfd_generic_read_minisymbols): Set bfd_error if the
3476         symbols are not read.
3477
3478 2002-08-22  Alan Modra  <amodra@bigpond.net.au>
3479
3480         * elf32-m68hc11.c: Formatting fixes.
3481         (elf32_m68hc11_gc_mark_hook): Correct params.  Remove unnecessary test.
3482         * elf32-m68hc12.c: Formatting fixes.
3483         (elf32_m68hc11_gc_mark_hook): Correct params.  Remove unnecessary test.
3484
3485 2002-08-22  Alan Modra  <amodra@bigpond.net.au>
3486
3487         * coff-rs6000.c (rs6000coff_vec <object_flags>): Add SEC_CODE and
3488         SEC_DATA.
3489         (pmac_xcoff_vec): Likewise.
3490         * coff64-rs6000.c (rs6000coff64_vec): Likewise.
3491         (aix5coff64_vec): Likewise.
3492
3493 2002-08-22  Alan Modra  <amodra@bigpond.net.au>
3494
3495         * elf-bfd.h (struct elf_backend_data): Add struct elf_backend_data
3496         param to elf_backend_copy_indirect_symbol.
3497         (_bfd_elf_link_hash_copy_indirect): Likewise.
3498         * elflink.h (elf_add_default_symbol, elf_fix_symbol_flags): Adjust
3499         calls to copy_indirect_symbol.
3500         * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
3501         * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
3502         * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
3503         * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
3504         * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
3505         * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
3506         * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
3507         * elfxx-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
3508         * elfxx-mips.h (_bfd_mips_elf_copy_indirect_symbol): Likewise.
3509         * elf.c (_bfd_elf_link_hash_copy_indirect): Likewise.  Properly
3510         test refcounts for "used" values.
3511
3512 2002-08-21  John David Anglin  <dave@hiauly1.hia.nrc.ca>
3513
3514         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Add PARAMS to
3515         argument declaration.
3516
3517 2002-08-19  Elena Zannoni <ezannoni@redhat.com>
3518
3519         * archures.c (bfd_mach_ppc_e500): Added.
3520         * bfd-in2.h: Rebuilt.
3521         * cpu-powerpc.c (bfd_powerpc_archs): Added e500.
3522
3523 2002-08-19  Alan Modra  <amodra@bigpond.net.au>
3524
3525         * elf32-m68hc12.c (elf_backend_can_gc_sections): False.
3526
3527 2002-08-17  Andrew Cagney  <ac131313@redhat.com>
3528
3529         * elf.c (bfd_elf_get_elf_syms): Change type of `esym' to
3530         `bfd_byte'.
3531
3532 2002-08-17  Stan Cox  <scox@redhat.com>
3533
3534         * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Use the
3535         IRIX 6 segment layout for NEWABI.
3536
3537 2002-08-16  Stephen Clarke <stephen.clarke@superh.com>
3538
3539         * bfd/elf32-sh.c (sh_elf_gc_mark_hook): For sh64, skip indirect
3540         symbols when looking for section referred to by a relocation.
3541         * bfd/elf64-sh.c (sh_elf64_gc_mark_hook): Likewise.
3542
3543 2002-08-15  Alan Modra  <amodra@bigpond.net.au>
3544
3545         * elf32-i370.c: Move reloc enum to include/elf/i370.h.
3546
3547 2002-08-15  Hans-Peter Nilsson  <hp@axis.com>
3548
3549         * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Add
3550         missing check for whether the symbol is referenced by DSO before
3551         unexporting it as an unneeded dynamic symbol.
3552
3553 2002-08-14  H.J. Lu <hjl@gnu.org>
3554
3555         * libbfd.h: Regenerate.
3556
3557 2002-08-14  H.J. Lu <hjl@gnu.org>
3558
3559         * config.bfd: Always add 64bit vectors to 32bit Linux/mips.
3560
3561 2002-08-14  Stephane Carrez  <stcarrez@nerim.fr>
3562
3563         * elf32-m68hc11.c (m68hc11_relax_group): New to relax group of
3564         instructions.
3565         (m68hc11_direct_relax): New to define table of relaxable instructions.
3566         (find_relaxable_insn): New, find a relaxable insn.
3567         (compare_reloc): New to compare two relocs.
3568         (m68hc11_elf_relax_section): New, relax text sections.
3569         (m68hc11_elf_relax_delete_bytes): New, delete bytes and adjust branchs.
3570         (elf32_m68hc11_check_relocs): New function for GC support.
3571         (elf32_m68hc11_relocate_section): New function for GC support.
3572         (bfd_elf32_bfd_relax_section): Define to support linker relaxation.
3573         (elf_backend_check_relocs): Likewise.
3574         (elf_backend_relocate_section): Likewise.
3575
3576 2002-08-13  H.J. Lu <hjl@gnu.org>
3577
3578         * elflink.h (NAME(bfd_elf,size_dynamic_sections): Don't count
3579         definitions in shared objects when checking symbol with
3580         undefined version.
3581
3582 2002-08-13  Stephane Carrez  <stcarrez@nerim.fr>
3583
3584         * elf32-m68hc11.c (elf32_m68hc11_gc_mark_hook): New for section GC.
3585         (elf32_m68hc11_gc_sweep_hook): Likewise.
3586         (elf_backend_gc_mark_hook): Define for GC section support.
3587         (elf_backend_gc_sweep_hook): Likewise.
3588         (elf_backend_can_gc_sections): Likewise.
3589
3590         * elf32-m68hc12.c: Likewise.
3591
3592 2002-08-13  Stephane Carrez  <stcarrez@nerim.fr>
3593
3594         * elf32-m68hc11.c (_bfd_m68hc11_elf_print_private_bfd_data): New.
3595         (_bfd_m68hc11_elf_merge_private_bfd_data): New function.
3596         (_bfd_m68hc11_elf_set_private_flags): New function.
3597         Use them to set/check/print ELF flags specific to 68HC11.
3598
3599         * elf32-m68hc12.c (_bfd_m68hc12_elf_print_private_bfd_data): New.
3600         (_bfd_m68hc12_elf_merge_private_bfd_data): New function.
3601         (_bfd_m68hc12_elf_set_private_flags): New function.
3602         Use them to set/check/print ELF flags specific to 68HC12.
3603
3604 2002-08-13  Stephane Carrez  <stcarrez@nerim.fr>
3605
3606         * elf32-m68hc11.c (elf_m68hc11_howto_table): Add the new relocs;
3607         fix masks for PC-rel relocs.
3608         (m68hc11_elf_ignore_reloc): New function.
3609
3610         * elf32-m68hc12.c (m68hc12_elf_special_reloc): New to handle specific
3611         68HC12 banked addressing relocs.
3612         (m68hc12_phys_addr): New to compute physical address of banked memory.
3613         (m68hc12_phys_page): Likewise for page.
3614         (m68hc12_addr_is_banked): New to see if address is in banked area.
3615         (elf_m68hc12_howto_table): Add new relocs and rename to xx12.
3616
3617 2002-08-13  Stephane Carrez  <stcarrez@nerim.fr>
3618
3619         * reloc.c (BFD_RELOC_M68HC11_RL_JUMP, BFD_RELOC_M68HC11_RL_GROUP,
3620         BFD_RELOC_M68HC11_LO16, BFD_RELOC_M68HC11_PAGE,
3621         BFD_RELOC_M68HC11_24): New relocs for 68HC11/68HC12.
3622         * bfd-in2.h: Regenerate.
3623
3624 2002-08-12  H.J. Lu <hjl@gnu.org>
3625
3626         * elflink.h (elf_add_default_symbol): Preserve section across
3627         elf_merge_symbol.
3628
3629 2002-08-09  Graeme Peterson  <gp@qnx.com>
3630
3631         * Makefile.am: Add entries for elf32-ppcqnx.c, and add
3632         elf32-qnx.h dependency to elfarmqnx-nabi.c and elf32-i386qnx.c.
3633         * Makefile.in: Regenerate.
3634         * config.bfd: Add support for powerpc{le}-*-nto targets.
3635         * configure.in: Add support for bfd_elf32_powerpc{le}qnx_vec.
3636         * configure: Regenerate.
3637         * elf32-i386qnx.c: Moved backend functions into a QNX specific
3638         common file "elf32-qnx.h", and now include that file.
3639         * elf32-qnx.h: New file: QNX specific common elf backend.
3640         * elf32-ppc.c: Do not include elf32-target.h if
3641         ELF32_PPC_C_INCLUDED is defined.
3642         * elf32-ppcqnx.c: New file: Support for QNX.
3643         * elfarmqnx-nabi.c: Include elf32-qnx.h for qnx elf backend.
3644         * targets.c: Add bfd_elf32_powerpc{le}qnx_vec.
3645
3646 2002-08-09  Nick Clifton  <nickc@redhat.com>
3647
3648         * po/sv.po: Updated Swedish translation.
3649
3650 2002-08-09  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3651
3652         * elfxx-mips.c (mips_elf_global_got_index): Avoid segfault if
3653         g->global_gotsym is NULL.
3654
3655 2002-08-08  H.J. Lu <hjl@gnu.org>
3656
3657         * elflink.h (elf_add_default_symbol): Don't warn if a definition
3658         overrides an indirect versioned symbol.
3659
3660 2002-08-08  Jakub Jelinek  <jakub@redhat.com>
3661
3662         * elf32-i386.c (elf_i386_relocate_section): Fill in proper addend
3663         for R_386_TLS_TPOFF32 relocs against symndx 0.
3664
3665 2002-08-07  H.J. Lu <hjl@gnu.org>
3666
3667         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Check symbol
3668         with undefined version if needed.
3669         (elf_link_assign_sym_version): Match a default symbol with a
3670         version without definition. No need to hide the default
3671         definition separately.
3672
3673 2002-08-08  Alan Modra  <amodra@bigpond.net.au>
3674
3675         * elflink.h (elf_link_output_extsym): Don't output symbols from
3676         SEC_EXCLUDE sections.
3677
3678         * aoutx.h (aout_link_write_symbols): Correct handling of warning syms.
3679
3680 2002-08-07  Alan Modra  <amodra@bigpond.net.au>
3681
3682         * elf64-ppc.c (edit_opd): Arrange to drop symbols for discarded .opd
3683         entries.
3684
3685 2002-08-07  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3686
3687         * elfxx-mips.c (mips_elf_create_dynamic_relocation): Cast signedness
3688         mismatch.
3689
3690 2002-08-07  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3691
3692         * elfxx-mips.c (ABI_64_P): Remove superfluous check.
3693
3694 2002-08-07  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3695
3696         * elf32-mips.c (mips_reloc_map): Fix typo.
3697
3698 2002-08-06  Alan Modra  <amodra@bigpond.net.au>
3699
3700         * xcofflink.c (xcoff_write_global_symbol): Set n_scnum for abs_section.
3701
3702 2002-08-06  Alan Modra  <amodra@bigpond.net.au>
3703
3704         * elf64-ppc.c (ppc64_elf_howto_raw): Zero all src_mask entries.
3705
3706 2002-08-06  Alan Modra  <amodra@bigpond.net.au>
3707
3708         * libxcoff.h: Use PARAMS on function declarations.
3709         * coff-rs6000.c (xcoff_generate_rtinit): Simplify size calc.
3710         * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
3711
3712         * coff-rs6000.c: (xcoff_rtype2howto): Don't place reloc address in
3713         addend.
3714         * coff64-rs6000.c: (xcoff64_rtype2howto): Likewise.
3715
3716 2002-08-06  Alan Modra  <amodra@bigpond.net.au>
3717
3718         * coff-rs6000.c: Formatting fixes.
3719         (xcoff_calculate_relocation): Use PARAMS in declaration.
3720         (xcoff_complain_overflow): Likewise.
3721         (xcoff_ppc_relocate_section): Use old-style function pointer call.
3722         (bfd_xcoff_backend_data): Remove useless comments.
3723         (rs6000coff_vec): Likewise.
3724         (bfd_pmac_xcoff_backend_data): Likewise.
3725         (pmac_xcoff_vec): Likewise.
3726
3727         * coff64-rs6000.c: Formatting fixes.
3728         (xcoff64_calculate_relocation): Use PARAMS in declaration.
3729         (xcoff64_ppc_relocate_section): Use old-style function pointer call.
3730         (bfd_xcoff_backend_data): Remove useless comments.
3731         (rs6000coff64_vec): Likewise.
3732         (bfd_xcoff_aix5_backend_data): Likewise.
3733         (aix5coff64_vec): Likewise.
3734
3735 2002-08-06  Alan Modra  <amodra@bigpond.net.au>
3736
3737         * coff-rs6000.c (xcoff_howto_table): Revert some of last change to
3738         mask entries.  Use complain_overflow_dont for R_REF.
3739         (xcoff_reloc_type_ba): Revert last change.
3740         (xcoff_reloc_type_br): Likewise.
3741         (xcoff_reloc_type_crel): Likewise.
3742         (xcoff_ppc_relocate_section): Likewise.
3743         * coff64-rs6000.c (xcoff64_reloc_type_br): Likewise.
3744         (xcoff64_ppc_relocate_section): Likewise.
3745         (xcoff64_howto_table): Revert some of last change to mask entries.
3746         Use complain_overflow_dont for R_REF.
3747
3748         * coff-rs6000.c (xcoff_howto_table): Fix src_mask entries.  Make all
3749         relocs with bitsize == 16 have size = 1.
3750         (xcoff_reloc_type_ba): Correct src_mask and dst_mask adjustment.
3751         (xcoff_reloc_type_br): Likewise.
3752         (xcoff_reloc_type_crel): Likewise.
3753         (xcoff_ppc_relocate_section): Set up src_mask and dst_mask correctly.
3754         * coff64-rs6000.c (xcoff64_reloc_type_br): Correct src_mask and
3755         dst_mask adjustment.
3756         (xcoff64_ppc_relocate_section): Set up src_mask and dst_mask correctly.
3757         (xcoff64_howto_table): Fix src_mask entries.  Make all relocs with
3758         bitsize == 16 have size = 1.
3759
3760 2002-08-01  Denis Chertykov  <denisc@overta.ru>
3761
3762         * elf32-ip2k.c: Processor manufacturer changed to Ubicom.
3763         (struct misc): New field isymbuf. All free_* fields removed.
3764         (symbol_value): Pass in internal syms. No need to swap syms in.
3765         (ip2k_elf_relax_section): Use bfd_elf_get_elf_syms. Properly free
3766         possibly cached info.
3767         (tidyup_after_error): Removed.
3768         (ip2k_elf_relax_section_pass1): Don't use removed fields of struct
3769         misc. Use new field.
3770         (adjust_all_relocations): Use internal syms. No need to swap syms
3771         in and out.
3772         (add_page_insn): Don't use removed fields of struct misc.
3773
3774 2002-08-01  Nick Clifton  <nickc@redhat.com>
3775
3776         * elf32-arm.h: Revert previous delta.
3777
3778 2002-08-01  Nick Clifton  <nickc@redhat.com>
3779
3780         * configure.in (AM_INIT_AUTOMAKE): Bump version number.
3781         * configure: Regenerate.
3782
3783 2002-07-31  H.J. Lu <hjl@gnu.org>
3784
3785         * config.bfd: Add x86-64 vector to Linux/i386 if 64bit BFD is
3786         selected.
3787
3788 2002-07-31  H.J. Lu <hjl@gnu.org>
3789
3790         * config.bfd: Add n32 vectors to 32bit Linux/mips if 64bit BFD
3791         is selected.
3792
3793 2002-07-31  Jakub Jelinek  <jakub@redhat.com>
3794
3795         * elf32-i386.c (elf_i386_copy_indirect_symbol): Swap tls_type
3796         if _bfd_elf_link_hash_copy_indirect will swap got.refcount.
3797
3798 2002-07-31  Ian Dall  <ian@sibyl.beware.dropbear.id.au>
3799
3800         * cpu-ns32k.c (_bfd_ns32k_put_immdeiate, _bfd_ns32k_get_immediate):
3801         There is no 8 byte relocation type for this architecture.
3802         (do_ns32k_reloc): Use bfd_vma instead of native types.
3803         (bfd_ns32k_put_immediate, _bfd_ns32k_relocate_contents) put_data
3804         returns void.
3805         (_bfd_ns32k_put_displacement): Don't check for overflow. We can
3806         rely on generic code to do that.
3807         * aout-ns32k.c (howto_table): Add appropriate overflow detection
3808         to all table entries.
3809         (_bfd_ns32k_relocate_contents): put_data returns void.
3810         * ns32k.h: (_bfd_ns32k_put_displacement, _bfd_ns32k_put_immediate)
3811         (_bfd_do_ns32k_reloc_contents): Fix prototypes. put data functions
3812         return void.
3813
3814 2002-07-31  Ian Dall  <ian@sibyl.beware.dropbear.id.au>
3815
3816         * aoutx.h (aout_link_check_ar_symbols): Whether to include an
3817         archive object is target dependant.
3818
3819 2002-07-31  Adam Nemet  <anemet@lnxw.com>
3820
3821         * elf32-arm.h (ARM_PLT_ENTRY_SIZE): Rename PLT_ENTRY_SIZE.
3822         (THUMB_PLT_ENTRY_SIZE): New macro.
3823         (PLT_ENTRY_SIZE): Return the appropriate *_PLT_ENTRY_SIZE.
3824         (elf32_arm_plt0_entry): Rename PLT_ENTRY_SIZE to
3825         ARM_PLT_ENTRY_SIZE.
3826         (elf32_arm_plt_entry): Likewise.
3827         (elf_backend_plt_header_size): Likewise.
3828         (elf32_thumb_plt0_entry): New global.
3829         (elf32_arm_finish_dynamic_sections): Use it.  Put Thumb entries
3830         into .plt.thumb.
3831         (elf32_thumb_plt_entry): New global.
3832         (elf32_arm_finish_dynamic_symbol): Use it.  Use .thumb.plt for
3833         Thumb entries.  Set the bottom bit of the corresponding GOT entry
3834         for a Thumb PLT entry.
3835         (struct elf32_arm_plt_entry_info): New structure.
3836         (struct elf32_arm_link_hash_entry, plt_info): New member of this
3837         type.
3838         (elf32_arm_link_hash_newfunc): Initialize new member.
3839         (elf32_arm_final_link_relocate, R_ARM_THM_PC22 case): Handle
3840         relocations against the PLT.
3841         (elf32_arm_check_relocs, case R_ARM_PLT32 case): Set
3842         first_rel_type if this is the first time we encounter the symbol.
3843         (elf32_arm_check_relocs, case R_ARM_THM_PC22 case): New case.
3844         Determine if relocation needs a PLT entry.  Set first_rel_type if
3845         this is the first time we encounter the symbol
3846         (elf32_arm_adjust_dynamic_symbol): Create PLT entries for Thumb
3847         functions as well.
3848         (elf32_arm_size_dynamic_sections): Handle .plt.thumb like .plt.
3849         (elf32_arm_create_dynamic_sections): New function.  Create the
3850         .plt.thumb section.
3851         (elf_backend_create_dynamic_sections): Call it.
3852
3853 2002-07-31  Nick Clifton  <nickc@redhat.com>
3854
3855         * bfd.c (bfd_alt_mach_code): Rename parameter 'index' to
3856         'alternative' in order to avoid shadowing global symbol of the
3857         same name.
3858         * bfd-in2.h: Regenerate.
3859         * libbfd.h: Regenerate.
3860         * libcoff.h: Regenerate.
3861
3862 2002-07-31  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3863
3864         * Makefile.am: Add n32 ABI support.
3865         * Makefile.in: Regenerate.
3866         * config.bfd: Add n32 vectors to mips64*-*-linux* targets. Treat 64
3867         bit vectors for mips*-*-linux targets as optional.
3868         * configure.in: Add n32 ABI vectors.
3869         * configure: Regenerate.
3870         * elf32-mips.c (mips_elf32_object_p): Reject n32 ABI files.
3871         * elfn32-mips.c: New file, n32 ABI support.
3872         * targets.c: Add n32 ABI vectors.
3873
3874 2002-07-30  Graeme Peterson  <gp@qnx.com>
3875
3876         * elfarmqnx-nabi.c: New file: Support for QNX.
3877         * config.bfd: Add support for arm-*-nto target.
3878         * configure.in: Add support for bfd_elf32_{big|little}armqnx_vec.
3879         * configure: Regenerate.
3880         * Makefile.am: Add entries for elfarmqnx-nabi.c.
3881         * Makefile.in: Regenerate.
3882         * elf32-arm.h (ELF_MAXPAGESIZE): Do not define if already defined.
3883         Do not define global function if ELFARM_NABI_C_INCLUDED is defined.
3884         * elfarm-nabi.c: Do not include elf32-arm.h if
3885         ELFARM_NABI_C_INCLUDED is defined.
3886         * targets.c: Add bfd_elf32_{big|little}armqnx_vec.
3887
3888 2002-07-30  Nick Clifton  <nickc@redhat.com>
3889
3890         * po/sv.po: Updated Swedish translation.
3891
3892 2002-07-30  Jakub Jelinek  <jakub@redhat.com>
3893
3894         * elf.c (elf_fake_sections): Fix up .tbss sh_size and sh_type.
3895
3896 2002-07-30  Alan Modra  <amodra@bigpond.net.au>
3897
3898         * aoutx.h (some_aout_object_p): Clean up tdata properly on error.
3899         * archive.c (bfd_generic_archive_p): Likewise.
3900         * coff-rs6000.c (_bfd_xcoff_archive_p): Likewise.
3901         (_bfd_xcoff_archive_p): Use bfd_scan_vma in place of strtol.
3902         * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
3903         (xcoff64_archive_p): Likewise.
3904         (xcoff64_openr_next_archived_file): Likewise.
3905         (xcoff64_archive_p): Clean up tdata properly on error.
3906         * coffgen.c (coff_real_object_p): Likewise.
3907         (coff_object_p): Release filehdr and opthdr.
3908         * ecoff.c (_bfd_ecoff_archive_p): Clean up tdata properly on error.
3909         * ieee.c (ieee_archive_p): Likewise.
3910         * ihex.c (ihex_object_p): Likewise.
3911         (ihex_mkobject): Always allocate tdata.
3912         * peicode.h (pe_ILF_object_p): Release bfd_alloc'd buffer on error.
3913         * srec.c (srec_mkobject): Always allocate tdata.
3914         (srec_object_p): Clean up tdata properly on error.
3915         (symbolsrec_object_p): Likewise.
3916         * versados.c (versados_object_p): Likewise.
3917         * vms-misc.c (_bfd_vms_get_record): Use bfd_malloc instead of malloc,
3918         and bfd_realloc instead of realloc.
3919         (add_new_contents): Use bfd_alloc instead of bfd_malloc for sections.
3920         * vms.c (vms_initialize): Always allocate tdata.  Use bfd_alloc in
3921         place of bfd_malloc, simplifying error freeing.  Free hash table too.
3922         (vms_object_p): Clean up tdata on error.
3923         (vms_mkobject): Don't complain on stderr if vms_initialize fails.
3924         (vms_close_and_cleanup): Adjust for bfd_alloc use.
3925
3926 2002-07-30  Alan Modra  <amodra@bigpond.net.au>
3927
3928         * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set e_flags.
3929
3930 2002-07-26  Chris Demetriou  <cgd@broadcom.com>
3931
3932         * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Merge ASE
3933         flags into resulting BFD.
3934
3935 2002-07-26  Alan Modra  <amodra@bigpond.net.au>
3936
3937         From John Reiser <jreiser@BitWagon.com>
3938         * elf32-i386.c (elf_i386_link_hash_table_create): Clear
3939         tls_ldm_got.refcount.
3940
3941 2002-07-25  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3942
3943         * elf64-mips.c: Update TODO comment.
3944         (mips_elf64_higher_reloc,mips_elf64_highest_reloc,
3945         mips_elf64_gprel16_reloca): Remove prototypes.
3946         (mips16_jump_reloc,mips16_gprel_reloc): Add functions.
3947         (UNUSED_RELOC): Replace by EMPTY_RELOC.
3948         (mips_elf64_howto_table_rel): Use special R_MIPS_HI16 handling. Remove
3949         wrong comments. Remove disfunctional support of R_MIPS_HIGHER and
3950         R_MIPS_HIGHEST.
3951         (mips_elf64_howto_table_rela): Fix handling of R_MIPS_GPREL16 and
3952         R_MIPS_GOT16. Remove wrong comments.
3953         (elf_mips16_jump_howto,elf_mips16_gprel_howto,
3954         elf_mips_gnu_vtinherit_howto,elf_mips_gnu_vtentry_howto): New, code
3955         from elf32-mips.c.
3956         (mips_elf64_hi16_reloc): Fix formatting.
3957         (mips_elf64_higher_reloc,mips_elf64_highest_reloc): Remove.
3958         (mips_elf64_got16_reloc): Fix formatting. Remove superfluous code.
3959         Better comment. Fall back to R_MIPS_GOT_DISP instead of abort().
3960         (mips_elf64_gprel16_reloc): Make static. Add check for
3961         partial_inplace.
3962         (mips_elf64_gprel16_reloca): Remove.
3963         (mips_elf64_literal_reloc): New function.
3964         (mips_elf64_gprel32_reloc): Fix formatting.
3965         (mips_elf64_shift6_reloc): Fix comment. Make static.
3966         (mips16_jump_reloc,mips16_gprel_reloc): New functions, code from
3967         elf32-mips.c.
3968         (elf_reloc_map,mips_reloc_map): New mapping table, similiar as in
3969         elf32-mips.c
3970         (bfd_elf64_bfd_reloc_type_lookup): Use the mapping table. Enable GNU
3971         specific relocations.
3972         (mips_elf64_rtype_to_howto): Enable GNU specific relocations.
3973         (mips_elf64_object_p): Invert logic to check for SGI-ish ABI.
3974         (ELF_MAXPAGESIZE): Add comment.
3975
3976 2002-07-25  Nick Clifton  <nickc@redhat.com>
3977
3978         * po/sv.po: Updated Swedish translation.
3979         * po/es.po: Updated Spanish translation.
3980         * po/fr.po: Updated French translation.
3981
3982 2002-07-25  Alan Modra  <amodra@bigpond.net.au>
3983
3984         * elf-bfd.h (_bfd_elf32_link_record_local_dynamic_symbol): Define
3985         as elf_link_record_local_dynamic_symbol.
3986         (_bfd_elf64_link_record_local_dynamic_symbol): Likewise.
3987         (elf_link_record_local_dynamic_symbol): Declare.  Now returns int.
3988         * elflink.h (elf_link_record_local_dynamic_symbol): Move to..
3989         * elflink.c: .. here.  Use bfd_elf_get_elf_syms.  Check whether an
3990         attempt is made to record a symbol in a discarded section, and
3991         return `2' in that case.
3992
3993 2002-07-24  Nick Clifton  <nickc@redhat.com>
3994
3995         * po/sv.po: Updated Swedish translation.
3996         * po/es.po: Updated Spanish translation.
3997
3998 2002-07-23  Alan Modra  <amodra@bigpond.net.au>
3999
4000         * po/SRC-POTFILES.in: Regenerate.
4001
4002         * elf-hppa.h (elf_hppa_relocate_section): If relocatable, return
4003         immediately.  Remove code handling relocatable linking.
4004         * elf32-avr.c (elf32_avr_relocate_section): Likewise.
4005         * elf32-cris.c (cris_elf_relocate_section): Likewise.
4006         * elf32-fr30.c (elf32_frv_relocate_section): Likewise.
4007         * elf32-frv.c (elf32_frv_relocate_section): Likewise.
4008         * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
4009         * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
4010         * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
4011         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
4012         * elf32-v850.c (v850_elf_relocate_section): Likewise.
4013         * elf32-vax.c (elf_vax_relocate_section): Likewise.
4014         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
4015         * elf32-avr.c (elf_backend_rela_normal): Define.
4016         * elf32-cris.c: Likewise.
4017         * elf32-fr30.c: Likewise.
4018         * elf32-frv.c: Likewise.
4019         * elf32-h8300.c: Likewise.
4020         * elf32-hppa.c: Likewise.
4021         * elf32-ip2k.c: Likewise.
4022         * elf32-sparc.c: Likewise.
4023         * elf32-v850.c: Likewise.
4024         * elf32-vax.c: Likewise.
4025         * elf64-hppa.c: Likewise.
4026         * elf64-sparc.c: Likewise.
4027         * elf32-fr30.c (elf32_frv_relocate_section): Edit comment.
4028         * elf32-frv.c (elf32_frv_relocate_section): Likewise.
4029         * elf32-i860.c (elf32_i860_relocate_section): Likewise.
4030         * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
4031         * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
4032         * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
4033         * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
4034         * elf-m10200.c (USE_RELA): Don't define.
4035         * elf-m10300.c: Likewise.
4036         * elfarm-oabi.c: Likewise.
4037         * elf32-i370.c: Likewise.
4038         * elf32-ip2k.c: Likewise.
4039         * elf32-m68k.c: Likewise.
4040         * elf32-mcore.c: Likewise.
4041         * elf32-ppc.c: Likewise.
4042         * elf32-s390.c: Likewise.
4043         * elf32-vax.c: Likewise.
4044         * elf64-ppc.c: Likewise.
4045         * elf64-s390.c: Likewise.
4046         * elf64-x86-64.c: Likewise.
4047         * elfxx-ia64.c: Likewise.
4048         * elf32-avr.c (USE_REL): Don't undef.
4049         * elf32-ip2k.c: Likewise.
4050
4051 2002-07-23  Nick Clifton  <nickc@redhat.com>
4052
4053         * elf-bfd.h (struct elf_backend_data): Add new bitfield
4054         'want_p_paddr_set_to_zero'.
4055         * elfxx-target.h: Set default value for want_p_paddr_set_to_zero
4056         to false;
4057         * elfxx-ia64.c: Set want_p_paddr_set_zero for HPUX target.
4058         * elf.c (copy_private_bfd_data): Test want_p_paddr_set_zero.
4059
4060 2002-07-23  Gabor Keresztfalvi  <keresztg@mail.com>
4061
4062         * nlmcode.h (nlm_swap_auxiliary_headers_out): Swapped the order of
4063         the MeSsAgEs and CoPyRiGhT tags to make >=NW4.x NLM loaders to
4064         show the Copyright string.
4065         Minor formatting tidy ups.
4066
4067 2002-07-23  Nick Clifton  <nickc@redhat.com>
4068
4069         * po/fr.po: Updated French translation.
4070         * po/sv.po: Updated Swedish translation.
4071
4072 2002-07-23  Alan Modra  <amodra@bigpond.net.au>
4073
4074         * elflink.h (elf_link_input_bfd): Don't change internal symbols
4075         when outputting relocs.
4076
4077 2002-07-20  Jason Thorpe  <thorpej@wasabisystems.com>
4078
4079         * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only insert
4080         DT_PLTGOT into the dynamic section if there is a PLT.
4081
4082 2002-07-19  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4083
4084         * elfxx-mips.c (_bfd_mips_elf_discard_info): New function, code from
4085         elf32-mips.c.
4086         (_bfd_mips_elf_write_section): Likewise.
4087         * elfxx-mips.h (_bfd_mips_elf_discard_info): New prototype.
4088         (_bfd_mips_elf_write_section): Likewise.
4089         * elf32-mips.c (elf32_mips_discard_info): Move to elfxx-mips.c.
4090         (elf32_mips_write_section): Likewise.
4091         * elf64-mips.c (_bfd_mips_elf_ignore_discarded_relocs): Use it.
4092         (_bfd_mips_elf_write_section): Likewise.
4093
4094 2002-07-19  Alan Modra  <amodra@bigpond.net.au>
4095
4096         * elfxx-ia64.c: (elfNN_ia64_modify_segment_map): Properly scan
4097         PT_IA_64_UNWIND segments for a given section.
4098
4099 2002-07-17  H.J. Lu <hjl@gnu.org>
4100
4101         * Makefile.am: Fix a typo.
4102         * Makefile.in: Regenerate.
4103
4104 2002-07-15  Denis Chertykov  <denisc@overta.ru>
4105             Frank Ch. Eigler  <fche@redhat.com>
4106             Ben Elliston  <bje@redhat.com>
4107             Alan Lehotsky  <alehotsky@cygnus.com>
4108             John Healy  <jhealy@redhat.com>
4109             Graham Stott  <grahams@redhat.com>
4110             Jeff Johnston  <jjohnstn@redhat.com>
4111
4112         * Makefile.am: Add support for ip2k.
4113         * Makefile.in: Regenerate.
4114         * doc/Makefile.in: Regenerate.
4115         * archures.c: Add support for ip2k.
4116         * config.bfd: Add support for ip2k.
4117         * configure.in: Add support for ip2k.
4118         * configure: Regenerate.
4119         * reloc.c: Add support for ip2k.
4120         * targets.c: Add support for ip2k.
4121         * bfd-in2.h: Regenerate.
4122         * libbfd.h: Regenerate.
4123         * cpu-ip2k.c: New file.
4124         * elf32-ip2k.c: New file.
4125
4126 2002-07-17  Ian Rickards  <irickard@arm.com>
4127
4128         * dwarf2.c (concat_filename): If we can't establish the directory
4129         just return the filename.
4130
4131 2002-07-16  Moritz Jodeit  <moritz@jodeit.org>
4132
4133         * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Correct order of memset args.
4134
4135 2002-07-16  Alan Modra  <amodra@bigpond.net.au>
4136
4137         * elflink.h: Formatting fixes, tidy prototypes.
4138         (elf_link_assign_sym_version): Move common code out of loop.
4139
4140 2002-07-16  Alan Modra  <amodra@bigpond.net.au>
4141
4142         * elflink.h (elf_link_input_bfd): Don't call reloc_emitter when
4143         reloc section size is zero.  Correct reloc output location.
4144
4145 2002-07-16  John David Anglin  <dave@hiauly1.hia.nrc.ca>
4146
4147         * elf-hppa.h (elf_hppa_reloc_final_type): Use R_PARISC_PCREL16F as
4148         the final type for the e_fsel selector when generating PA2.0W code.
4149         (elf_hppa_relocate_insn): Provide support for PA2.0W 16-bit format 1
4150         relocations.
4151
4152 2002-07-14  H.J. Lu <hjl@gnu.org>
4153
4154         * elflink.h (elf_link_assign_sym_version): Hide the default
4155         definition if there is a hidden versioned definition.
4156
4157 2002-07-12  Hans-Peter Nilsson  <hp@axis.com>
4158
4159         * elf32-cris.c (cris_elf_relocate_section): Drop nonsensical
4160         dynamic reference test in assertion when initializing GOT with
4161         static contents.  Just assert that there are either no dynamic
4162         sections, the symbol is defined in the regular objects or that the
4163         symbol is undef weak.  Tweak comment.
4164         (elf_cris_finish_dynamic_symbol): Emit .got reloc for a program
4165         only if the symbol isn't defined in the program and isn't undef
4166         weak.
4167         (elf_cris_adjust_dynamic_symbol): Simplify condition for getting
4168         rid of PLT entry: only do it if the symbol isn't defined in a DSO.
4169         When doing so, clear ELF_LINK_HASH_NEEDS_PLT.  Tweak comments.
4170         (elf_cris_discard_excess_program_dynamics): Don't consider
4171         ELF_LINK_HASH_REF_DYNAMIC when omitting .got runtime relocs.
4172
4173 2002-07-11  Alan Modra  <amodra@bigpond.net.au>
4174
4175         * elf32-i386.c (elf_i386_relocate_section): Don't complain about
4176         unresolved debugging relocs in dynamic applications.
4177         * elf32-s390.c (elf_s390_relocate_section): Likewise.
4178         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
4179         * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
4180         * elf64-s390.c (elf_s390_relocate_section): Likewise.
4181         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
4182         * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
4183
4184 2002-07-10  Alan Modra  <amodra@bigpond.net.au>
4185
4186         * elf64-ppc.c (ONES): Define.
4187         (ppc64_elf_howto_table): Use ONES here to avoid warnings.  Fill in
4188         missing src_mask fields.  Tweak R_PPC64_NONE, R_PPC64_COPY.  Fill
4189         in missing dst_mask fields on R_PPC64_PLT32, R_PPC64_PLTREL32.
4190
4191         * elf64-ppc.c (ppc64_elf_get_symbol_info): Delete.
4192         (ppc64_elf_set_private_flags): Delete.
4193         (ppc64_elf_section_from_shdr): Delete.
4194         (ppc64_elf_merge_private_bfd_data): Remove flag checking/merging code.
4195         (ppc64_elf_fake_sections): Delete.
4196         (bfd_elf64_bfd_set_private_flags): Don't define.
4197         (bfd_elf64_get_symbol_info): Likewise.
4198         (elf_backend_section_from_shdr): Likewise.
4199         (elf_backend_fake_sections): Likewise.
4200
4201 2002-07-10  Marco Walther  <Marco.Walther@sun.com>
4202
4203         * elf.c: (assign_section_numbers) Set sh_entsize for .stab only
4204         when not already set.
4205         * elf64-sparc.c: (sparc64_elf_fake_sections): New function.
4206         (elf_backend_fake_sections): Define.
4207
4208 2002-07-10  Alan Modra  <amodra@bigpond.net.au>
4209
4210         * merge.c (_bfd_merge_section): Remove redundant output_section check.
4211         Formatting.
4212         (_bfd_merge_sections): Don't set SEC_EXCLUDE on unused sections.
4213
4214 2002-07-09  Hans-Peter Nilsson  <hp@axis.com>
4215
4216         * elf32-cris.c (cris_elf_relocate_section): Move sanity-check for
4217         NULL sym_hashes to just before use.
4218         <case R_CRIS_32_GOTREL>: In test for local symbol, accept also
4219         symbol with non-default visibility.
4220         <case R_CRIS_32_GOTREL, case R_CRIS_32_PLT_GOTREL>: Ditto.
4221         <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
4222         Ditto.
4223         (cris_elf_gc_sweep_hook): Only decrease h->plt.refcount for
4224         symbol with non-default visibility.
4225         (cris_elf_check_relocs): At tests for local symbol before
4226         increasing h->plt.refcount, also check for non-default
4227         visibility.  Ditto when checking for local symbol to eliminate
4228         pc-relative runtime relocs.
4229
4230 2002-07-08  Alan Modra  <amodra@bigpond.net.au>
4231
4232         * elf.c: Formatting.
4233         (IS_SOLARIS_PT_INTERP): Add p_paddr and p_memsz checks.
4234         (INCLUDE_SECTION_IN_SEGMENT): Remove IS_SOLARIS_PT_INTERP.
4235         (copy_private_bfd_data): Set p_vaddr on broken Solaris PT_INTERP
4236         segments.
4237
4238 2002-07-07  Mark Mitchell  <mark@codesourcery.com>
4239             Alan Modra  <amodra@bigpond.net.au>
4240
4241         * cofflink.c (_bfd_coff_final_link): On PE COFF systems, take into
4242         account the impact of relocation count overflow when computing
4243         section offsets.
4244         * coffcode.h (coff_write_relocs): Use obj_pe when deciding whether
4245         or not to apply the PE COFF reloc overflow handling.  Fix a
4246         fencepost error in deciding whether or not to use that technique.
4247
4248 2002-07-07  Alan Modra  <amodra@bigpond.net.au>
4249
4250         * elf-bfd.h (struct elf_reloc_cookie): Remove locsym_shndx,
4251         change type of locsyms.
4252         (bfd_elf_get_elf_syms): Declare.
4253         * elf.c (bfd_elf_get_elf_syms): New function.
4254         (group_signature): Use bfd_elf_get_elf_syms.
4255         (bfd_section_from_r_symndx): Likewise.
4256         * elfcode.h (elf_slurp_symbol_table): Likewise.
4257         * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
4258         (elf_link_add_object_symbols): Likewise.  Reorganise to increase
4259         locality of various data structures.  Properly free internal relocs.
4260         (elf_bfd_final_link): Properly free internal relocs.
4261         (elf_link_check_versioned_symbol): Use bfd_elf_get_elf_syms.
4262         (elf_link_input_bfd): Likewise.
4263         (elf_gc_mark): Likewise.  Properly free internal relocs.
4264         (elf_gc_sweep): Properly free internal relocs.
4265         (elf_reloc_symbol_deleted_p): No need to swap syms in.
4266         (elf_bfd_discard_info): Use bfd_elf_get_elf_syms.  Properly free
4267         internal relocs.
4268         * elf-m10200.c (mn10200_elf_relax_section): Use bfd_elf_get_elf_syms.
4269         Properly free possibly cached info.
4270         (mn10200_elf_relax_delete_bytes): Remove symbol swapping code.
4271         (mn10200_elf_symbol_address_p): Pass in internal syms.  Remove
4272         symbol swapping code.
4273         (mn10200_elf_get_relocated_section_contents): Use bfd_elf_get_elf_syms.
4274         Properly free possibly cached info.
4275         * elf-m10300.c (mn10300_elf_relax_section): As above for elf-m10200.c.
4276         (mn10300_elf_relax_delete_bytes): Likewise.
4277         (mn10300_elf_symbol_address_p): Likewise.
4278         (mn10300_elf_get_relocated_section_contents): Likewise.
4279         * elf32-h8300.c (elf32_h8_relax_section): As above for elf-m10200.c.
4280         (elf32_h8_relax_delete_bytes): Likewise.
4281         (elf32_h8_symbol_address_p): Likewise.
4282         (elf32_h8_get_relocated_section_contents): Likewise.
4283         * elf32-m32r.c (m32r_elf_relax_section): As above for elf-m10200.c.
4284         (m32r_elf_relax_delete_bytes): Likewise.
4285         (m32r_elf_get_relocated_section_contents): Likewise.
4286         * elf32-sh.c (sh_elf_reloc_loop): Free section contents using
4287         elf_section_data to determine whether cached.
4288         (sh_elf_relax_section): As above for elf-m10200.c.
4289         (sh_elf_relax_delete_bytes): Likewise.
4290         (sh_elf_get_relocated_section_contents): Likewise.
4291         * elf32-xstormy16.c (xstormy16_elf_relax_section): As above.
4292         * elf64-alpha.c (elf64_alpha_relax_section): As above.  Also delay
4293         reading of local syms.
4294         * elf64-mmix.c (mmix_elf_relax_section): Likewise.
4295         * elf64-sh64.c (sh_elf64_get_relocated_section_contents): As above.
4296         * elfxx-ia64.c (elfNN_ia64_relax_section): As above.
4297         * elfxx-mips.c (_bfd_mips_elf_check_relocs): Properly free internal
4298         relocs.
4299         * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Properly
4300         free internal relocs and section contents.  Don't read symbols.
4301         * elf32-hppa.c (get_local_syms): Use bfd_elf_get_elf_syms.
4302         (elf32_hppa_size_stubs): Don't free local syms.
4303         * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Delay
4304         reading of local syms.  Use bfd_elf_get_elf_syms.  Properly free
4305         possibly cached info.
4306         * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
4307         * elf64-hppa.c (elf64_hppa_check_relocs): Use bfd_elf_get_elf_syms.
4308         * elf64-ppc.c (struct ppc_link_hash_table): Delete bfd_count and
4309         all_local_syms.
4310         (get_local_syms): Delete function.
4311         (edit_opd): Use bfd_elf_get_elf_syms.  Free on error exit.  Cache
4312         on exit.
4313         (ppc64_elf_size_stubs): Use bfd_elf_get_elf_syms.  Free/cache on exit.
4314
4315 2002-07-05  Jim Wilson  <wilson@redhat.com>
4316
4317         * syms.c (decode_section_type): New.
4318         (bfd_decode_symclass): Call decode_section_type.
4319
4320 2002-07-04  Jakub Jelinek  <jakub@redhat.com>
4321
4322         * merge.c (_bfd_merged_section_offset): Avoid accessing byte before
4323         section content start.
4324         Reported by Michael Schumacher <mike@hightec-rt.com>.
4325
4326 2002-07-04  Alan Modra  <amodra@bigpond.net.au>
4327
4328         * section.c (_bfd_strip_section_from_output):  Remove unnecessary
4329         link order code.  Don't actually remove the output section here;
4330         Just set a flag for the linker to do so.
4331         * elflink.c (_bfd_elf_link_renumber_dynsyms): Test for removed
4332         sections when setting up output section dynsyms.
4333
4334 2002-07-04  Alan Modra  <amodra@bigpond.net.au>
4335
4336         * elflink.h (elf_link_add_object_symbols): Revert 1999-09-02 hpux
4337         fudge.
4338         * elf.c (bfd_section_from_shdr): Work around broken hpux shared
4339         libs here instead.
4340
4341 2002-07-02  Martin Schwidefsky  <schwidefsky@de.ibm.com>
4342
4343         * elf64-s390.c (create_got_section): Set .got section alignment to
4344         8 bytes.
4345         (elf_s390_check_relocs): Set .rela.dyn section alignment to 8 bytes.
4346
4347 2002-07-02  Alan Modra  <amodra@bigpond.net.au>
4348
4349         * elf.c (_bfd_elf_reloc_type_class): Fix comment grammar.
4350
4351 2002-07-01  Matt Thomas  <matt@3am-software.com>
4352
4353         * elf32-vax.c (elf32_vax_print_private_bfd_data): Change EF_*
4354         to EF_VAX_*.
4355
4356 2002-07-01  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4357
4358         * elfxx-mips.c (ABI_64_P): Fix comment.
4359         (MIPS_ELF_OPTIONS_SECTION_NAME,MIPS_ELF_STUB_SECTION_NAME): Use the
4360         new section names for N64 ABI.
4361         (mips_elf_output_extsym): No special _gp_disp handling for NewABI.
4362         (mips_elf_calculate_relocation): Code formatting.
4363         (mips_elf_create_dynamic_relocation): Likewise.
4364         (_bfd_mips_elf_fake_sections): IRIX6 needs this hack, too.
4365         (_bfd_mips_elf_size_dynamic_sections): Handle GOT_PAGE for any NewABI.
4366         (_bfd_mips_elf_relocate_section): No special handling for R_MIPS_64
4367         in any NewABI.
4368         (_bfd_mips_elf_finish_dynamic_symbol): No special _gp_disp handling
4369         for NewABI.
4370         (_bfd_mips_elf_modify_segment_map): Handle any N64 ABI.
4371         (_bfd_mips_elf_gc_sweep_hook): NewABI GOT relocs should be handled
4372         here, too.
4373
4374 2002-07-01  Andreas Schwab  <schwab@suse.de>
4375
4376         * elf64-x86-64.c (elf64_x86_64_relocate_section): Only convert
4377         R_X86_64_64 to R_X86_64_RELATIVE.
4378
4379 2002-07-01  John David Anglin  <dave@hiauly1.hia.nrc.ca>
4380
4381         * vaxbsd.c: New BFD backend for VAX BSD and Ultrix.
4382         * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Add new backend.
4383         Run "make dep-am".
4384         * config.bfd (vax-*-bsd* | vax-*-ultrix*): Use vaxbsd_vec instead of
4385         host_aout_vec.
4386         * configure.in (vaxbsd_vec): Add.
4387         * targets.c (vaxbsd_vec): Add.
4388         * Makefile.in: Rebuild.
4389         * configure: Rebuild.
4390         * po/SRC-POTFILES.in: Rebuild.
4391
4392 2002-07-01  Alan Modra  <amodra@bigpond.net.au>
4393
4394         * elflink.h (elf_gc_mark): Pass in the section whose relocs we are
4395         examining to gc_mark_hook, rather than the bfd.
4396         (elf_gc_sections): Adjust.
4397         * elf-bfd.h (struct elf_backend_data <gc_mark_hook>): Likewise.
4398         * elf-m10300.c (mn10300_elf_gc_mark_hook): Likewise.
4399         * elf32-arm.h (elf32_arm_gc_mark_hook): Likewise.
4400         * elf32-avr.c (elf32_avr_gc_mark_hook): Likewise.
4401         * elf32-cris.c (cris_elf_gc_mark_hook): Likewise.
4402         * elf32-d10v.c (elf32_d10v_gc_mark_hook): Likewise.
4403         * elf32-fr30.c (fr30_elf_gc_mark_hook): Likewise.
4404         * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise.
4405         * elf32-i386.c (elf_i386_gc_mark_hook): Likewise.
4406         * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise.
4407         * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise.
4408         * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise.
4409         * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Likewise.
4410         * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise.
4411         * elf32-s390.c (elf_s390_gc_mark_hook): Likewise.
4412         * elf32-sh.c (sh_elf_gc_mark_hook): Likewise.
4413         * elf32-sparc.c (elf32_sparc_gc_mark_hook): Likewise.
4414         * elf32-v850.c (v850_elf_gc_mark_hook): Likewise.
4415         * elf32-vax.c (elf_vax_gc_mark_hook): Likewise.
4416         * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Likewise.
4417         * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise.
4418         * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
4419         * elf64-s390.c (elf_s390_gc_mark_hook): Likewise.
4420         * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
4421         * elfxx-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise.
4422         * elfxx-mips.h (_bfd_mips_elf_gc_mark_hook): Likewise.
4423         * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise.
4424         * elf32-frv.c (elf32_frv_gc_mark_hook): Likewise.  Also remove
4425         redundant local sym tests.
4426         * elf64-ppc.c (struct ppc_link_hash_entry): Add is_entry.
4427         (link_hash_newfunc): Init is_entry.
4428         (ppc64_elf_copy_indirect_symbol): Copy is_entry.
4429         (ppc64_elf_link_hash_table_create): Init all_local_syms.
4430         (create_linkage_sections): Use bfd_make_section_anyway rather than
4431         bfd_make_section.
4432         (ppc64_elf_mark_entry_syms): New function.
4433         (ppc64_elf_check_relocs): Don't bother testing elf_bad_symtab.  Set
4434         up opd entry to function section map.
4435         (ppc64_elf_gc_mark_hook): Special case opd section relocs, and
4436         relocs that reference the opd section.
4437         (edit_opd): New function.
4438         (ppc64_elf_size_dynamic_sections): Call get_local_syms and edit_opd.
4439         (ppc64_elf_setup_section_lists): Don't calculate htab->bfd_count here.
4440         (get_local_syms): Do so here.  Exit if we already have local syms.
4441         Remove bogus comment imported from elf32-hppa.c.  Don't attempt to
4442         read local syms on non-ELF input.
4443         (ppc64_elf_size_stubs): Call _bfd_elf64_link_read_relocs rather
4444         than duplicating it's function here.  Adjust free of internal
4445         relocs to suit.
4446         (ppc64_elf_relocate_section): Adjust local syms in opd section.
4447         * elf64-ppc.h (ppc64_elf_mark_entry_syms): Declare.
4448         * elf32-hppa.c (elf32_hppa_size_stubs): Call
4449         _bfd_elf32_link_read_relocs rather than duplicating it's function
4450         here.  Adjust free of internal relocs to suit.
4451
4452 2002-07-01  Andreas Jaeger  <aj@suse.de>
4453
4454         * elf64-x86-64.c (elf64_x86_64_check_relocs): Certain relocations
4455         are not allowed in shared libs code, enforce -fPIC.
4456
4457 2002-06-29  Hans-Peter Nilsson  <hp@bitrange.com>
4458
4459         * mmo.c (mmo_write_loc_chunk): Don't eliminate leading and
4460         trailing zero-sequences when there's previous left-over data.
4461
4462 2002-06-27  John David Anglin  <dave@hiauly1.hia.nrc.ca>
4463
4464         * elf64-hppa.c (elf64_hppa_reloc_type_class): New function.
4465         (elf64_hppa_finish_dynamic_sections): Check other_rel_sec, dlt_rel_sec
4466         and opd_rel_sec in order for starting rela section.  Check _raw_size.
4467         (elf_backend_reloc_type_class): Define.
4468
4469 2002-06-27  Kevin Buettner <kevinb@redhat.com>
4470
4471         * dwarf2.c (decode_line_info): Handle older, non-standard, 64-bit
4472         DWARF2 formats.
4473
4474 2002-06-27  Alan Modra  <amodra@bigpond.net.au>
4475
4476         * cpu-powerpc.c: Comment on ordering of arch_info.
4477         * elf32-ppc.c (ppc_elf_object_p): New function.
4478         (elf_backend_object_p): Define.
4479         * elf64-ppc.c (ppc64_elf_object_p): New function.
4480         (elf_backend_object_p): Define.
4481
4482 2002-06-26  Jason Thorpe  <thorpej@wasabisystems.com>
4483
4484         * configure.in (vax-*-netbsd*): Set COREFILE to netbsd-core.lo.
4485         * configure: Regenerate.
4486
4487 2002-06-25  Jason Eckhardt  <jle@rice.edu>
4488
4489         * dwarf2.c (decode_line_info): Check unit->addr_size
4490         to read in the proper number of prologue bytes.
4491
4492 2002-06-25  Nick Clifton  <nickc@cambridge.redhat.com>
4493
4494         * config.bfd (powerpc-*-aix5*): Only create a selvecs for
4495         aix5coff64_vec if 64-bit bfd support has been enabled.
4496         (powerpc64-*-aix5*): Only define if 64-bit bfd support has
4497         been enabled.
4498
4499         * targets.c (_bfd_target_vector[]): Only include
4500         aix5coff64_vec if 64-bit bfd support has been enabled.
4501
4502 2002-06-25  Alan Modra  <amodra@bigpond.net.au>
4503
4504         * elf64-ppc.c (ppc_add_stub): Replace strcpy/strncpy with memcpy.
4505         * elf32-hppa.c (hppa_add_stub): Likewise.
4506         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
4507         * elflink.h (elf_add_default_symbol): Fix comment typo.
4508         (elf_add_default_symbol): Replace strcpy and strncpy with memcpy.
4509         (elf_link_add_object_symbols): Likewise.
4510         (elf_link_assign_sym_version): Likewise.
4511         * hash.c (bfd_hash_lookup): Likewise.
4512         * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
4513         * section.c (bfd_get_unique_section_name): Likewise.
4514         * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
4515         * elf.c (_bfd_elf_make_section_from_phdr): Likewise.
4516         (assign_section_numbers): Likewise.
4517         (_bfd_elfcore_make_pseudosection): Likewise.
4518         (elfcore_grok_lwpstatus): Likewise.
4519         (elfcore_grok_win32pstatus): Likewise.
4520         (elfcore_write_note): Constify input params.  Use PTR instead of
4521         void *.  Include terminating NUL in namesz.  Correct padding.
4522         Support NULL "name" param.  Use memcpy instead of strcpy.
4523         (elfcore_write_prpsinfo): Constify input params.
4524         (elfcore_write_prstatus): Likewise.  Use PTR instead of void *.
4525         (elfcore_write_lwpstatus): Likewise.
4526         (elfcore_write_pstatus): Likewise.
4527         (elfcore_write_prfpreg): Likewise.
4528         (elfcore_write_prxfpreg): Likewise.
4529         * elf-bfd.h (elfcore_write_note): Update declaration.
4530         (elfcore_write_prpsinfo): Likewise.
4531         (elfcore_write_prstatus): Likewise.
4532         (elfcore_write_pstatus): Likewise.
4533         (elfcore_write_prfpreg): Likewise.
4534         (elfcore_write_prxfpreg): Likewise.
4535         (elfcore_write_lwpstatus): Likewise.
4536
4537 2002-06-25  Jason Eckhardt  <jle@rice.edu>
4538
4539         * ecoff.c (ecoff_set_symbol_info): Set BSF_FUNCTION for
4540         symbols of type stProc and stStaticProc.
4541
4542 2002-06-25  Nick Clifton  <nickc@redhat.com>
4543
4544         * ecoff.c: VArious formatting fixes.
4545
4546 2002-06-25  Alan Modra  <amodra@bigpond.net.au>
4547
4548         * coff-rs6000.c (xcoff_generate_rtinit): Fix typo.
4549
4550 2002-06-25  Alan Modra  <amodra@bigpond.net.au>
4551
4552         * aout-adobe.c: Don't compare against "true" or "false.
4553         * aout-target.h: Likewise.
4554         * aoutx.h: Likewise.
4555         * archive.c: Likewise.
4556         * bout.c: Likewise.
4557         * cache.c: Likewise.
4558         * coff-a29k.c: Likewise.
4559         * coff-alpha.c: Likewise.
4560         * coff-i386.c: Likewise.
4561         * coff-mips.c: Likewise.
4562         * coff-or32.c: Likewise.
4563         * coff64-rs6000.c: Likewise.
4564         * coffcode.h: Likewise.
4565         * coffgen.c: Likewise.
4566         * cpu-ns32k.c: Likewise.
4567         * ecoff.c: Likewise.
4568         * ecofflink.c: Likewise.
4569         * elf.c: Likewise.
4570         * elf32-arm.h: Likewise.
4571         * elf32-cris.c: Likewise.
4572         * elf32-d30v.c: Likewise.
4573         * elf32-i386.c: Likewise.
4574         * elf32-mcore.c: Likewise.
4575         * elf32-ppc.c: Likewise.
4576         * elf32-sh.c: Likewise.
4577         * elf32-sh64.c: Likewise.
4578         * elf32-v850.c: Likewise.
4579         * elf64-alpha.c: Likewise.
4580         * elf64-sh64.c: Likewise.
4581         * elfcode.h: Likewise.
4582         * elfcore.h: Likewise.
4583         * elflink.h: Likewise.
4584         * elfxx-mips.c: Likewise.
4585         * i386os9k.c: Likewise.
4586         * ieee.c: Likewise.
4587         * libbfd.c: Likewise.
4588         * linker.c: Likewise.
4589         * mmo.c: Likewise.
4590         * nlm32-alpha.c: Likewise.
4591         * nlm32-i386.c: Likewise.
4592         * nlm32-ppc.c: Likewise.
4593         * nlm32-sparc.c: Likewise.
4594         * nlmcode.h: Likewise.
4595         * oasys.c: Likewise.
4596         * pdp11.c: Likewise.
4597         * peicode.h: Likewise.
4598         * reloc.c: Likewise.
4599         * som.c: Likewise.
4600         * srec.c: Likewise.
4601         * tekhex.c: Likewise.
4602         * vms.c: Likewise.
4603         * xcofflink.c: Likewise.
4604         * elf64-sparc.c: Edit comment to not use "== false".
4605
4606         * aoutf1.h: Don't use "? true : false".
4607         * ecoff.c: Likewise.
4608         * format.c: Likewise.
4609         * ieee.c: Likewise.
4610         * linker.c: Likewise.
4611         * mmo.c: Likewise.
4612         * oasys.c: Likewise.
4613
4614 2002-06-23  H.J. Lu  <hjl@gnu.org>
4615
4616         * elflink.h (elf_link_add_archive_symbols): For the default
4617         version, check references with only one `@' first.
4618
4619 2002-06-23  John David Anglin  <dave@hiauly1.hia.nrc.ca>
4620
4621         * elf64-hppa.c (elf64_hppa_mark_milli_and_exported_functions): New
4622         function.
4623         (allocate_global_data_dlt):  Don't add millicode symbols to dynamic
4624         symbol table.
4625         (allocate_global_data_opd, allocate_dynrel_entries): Likewise.
4626         (elf64_hppa_size_dynamic_sections): Revise to use
4627         elf64_hppa_mark_milli_and_exported_functions.
4628         (elf64_hppa_finish_dynamic_symbol): Remove code to keep millicode
4629         symbols out of dynamic symbol table.
4630
4631 2002-06-23  Alan Modra  <amodra@bigpond.net.au>
4632
4633         * Makefile.in: Regenerate.
4634         * libbfd.h: Regenerate.
4635         * bfd-in2.h: Regenerate.
4636         * configure: Regenerate.
4637         * po/SRC-POTFILES.in: Regenerate.
4638
4639         * elflink.h: Comment typo fixes.
4640
4641 2002-06-23  H.J. Lu  <hjl@gnu.org>
4642
4643         * elf-bfd.h (elf_link_loaded_list): New structure.
4644         (elf_link_hash_table): Add "loaded".
4645         * elf.c (_bfd_elf_link_hash_table_init): Initialize "loaded".
4646         * elflink.h (elf_link_check_versioned_symbol): New function.
4647         (elf_link_output_extsym): Call elf_link_check_versioned_symbol.
4648
4649 2002-06-19  Nick Clifton  <nickc@cambridge.redhat.com>
4650
4651         * elflink.h (size_dynamic_sections): If the target does not
4652         support an ELF style hash table, return true, indicating that
4653         nothing needed to be done, rather than false, indicating that the
4654         section's size could not be computed.
4655
4656 2002-06-18  Dave Brolley  <brolley@redhat.com>
4657
4658         From Catherine Moore, Michael Meissner, Dave Brolley:
4659         * po/SRC-POTFILES.in: Add cpu-frv.c and elf32-frv.c
4660         * targets.c: Support bfd_elf32_frv_vec.
4661         * reloc.c: Add FRV relocs.
4662         * configure.in: Add support for bfd-elf32-frv-vec.
4663         * config.bfd (targ_cpu): Add support for frv-*-elf.
4664         * archures.c: Add frv arch and machines.
4665         * Makefile.am (ALL_MACHINES): Add cpu-frv.lo.
4666         (ALL_MACHINES_CFILES): Add cpu-frv.c.
4667         (BFD32_BACKENDS): Add elf32-frv.lo.
4668         (BFD32_BACKENDS_CFILES): Add elf32-frv.c
4669         (cpu-frv.lo): New target.
4670         (elf32-frv.lo): New target.
4671         * cpu-frv.c: New file.
4672         * elf32-frv.c: New file.
4673
4674 2002-06-18  Jakub Jelinek  <jakub@redhat.com>
4675
4676         * elfcode.h (elf_object_p): Sanity check eh_shoff == 0 implies
4677         e_shnum == 0.
4678         Only read the first section header if e_shoff is non-zero.
4679         Don't consider e_shstrndx if there are no sections.
4680
4681 2002-06-17  Tom Rix <trix@redhat.com>
4682
4683         * elf32-d10v.c (elf_d10v_howto_table): Change R_D10V_10_PCREL_R,
4684         R_D10V_10_PCREL_L and R_D10V_18_PCREL to use
4685         complain_overflow_bitfield.
4686
4687 2002-06-17  Alan Modra  <amodra@bigpond.net.au>
4688
4689         * opncls.c (bfd_openr): Remove redundant bfd_set_error.
4690         (bfd_fdopenr): Likewise.
4691         (bfd_openstreamr): Likewise.
4692         (bfd_openw): Likewise.
4693
4694         * targets.c: Sort target vecs.
4695         (_bfd_target_vector): Add aix5coff64_vec, bfd_elf32_sh64_vec,
4696         bfd_elf32_sh64l_vec, bfd_elf32_sh64lnbsd_vec,
4697         bfd_elf32_sh64nbsd_vec, bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec,
4698         bfd_elf64_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec.
4699         * configure.in: Sort target vecs.  Add m88kmach3_vec.
4700         * configure: Regenerate.
4701
4702 2002-06-16  Hans-Peter Nilsson  <hp@bitrange.com>
4703
4704         * elf64-mmix.c (bpo_reloc_request_sort_fn): Use member
4705         bpo_reloc_no to break sort order ties, not address of items.
4706
4707 2002-06-16  John David Anglin  <dave@hiauly1.hia.nrc.ca>
4708
4709         * elf-hppa.h (elf_hppa_final_link): Fix formatting in comment.
4710         Skip excluded sections in determing __gp value.
4711         (elf_hppa_final_link_relocate): Use the symbol's address in
4712         R_PARISC_FPTR64 relocations that don't need an opd entry.
4713         * elf64-hppa.c (allocate_dynrel_entries): Simplify code.
4714         (elf64_hppa_finalize_dynreloc): Likewise.
4715         (elf64_hppa_size_dynamic_sections): Move comments and fix typo.
4716         (elf64_hppa_finish_dynamic_symbol): Break up assert.
4717
4718 2002-06-14  Sergey Grigoriev  <serge@leopold.Physik.Uni-Augsburg.DE>
4719
4720         * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
4721         alignment for .bss, .data and .text sections so that sse and sse2
4722         code will work.
4723         * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
4724
4725 2002-06013  J"orn Rennecke  <joern.rennecke@superh.com>
4726
4727         config.bfd: Add support for sh[1234]l*-*-elf* | sh3el*-*-elf*,
4728         sh[1234]*-elf*.
4729
4730 2002-06-12  John David Anglin  <dave@hiauly1.hia.nrc.ca>
4731
4732         * elflink.h (elf_bfd_final_link): Improve error handling for missing
4733         dynamic sections.
4734
4735         * elf64-hppa.c (allocate_global_data_opd): We don't need an opd entry
4736         for a symbol that has no output section.
4737         (allocate_dynrel_entries): Correct comment.
4738         (elf64_hppa_finalize_dynreloc): Likewise.  Don't create an opd entry
4739         unless we want one.
4740         (elf64_hppa_finalize_opd): Prevent segfault if dyn_h is NULL.
4741         (elf64_hppa_finalize_dlt): Likewise.  Prevent segfault for symbols
4742         with no section.  Remove unnecessary parentheses.
4743
4744 2002-06-11  Tom Rix  <trix@redhat.com>
4745
4746         * coffcode.h (coff_compute_section_file_positions): Add data
4747         section to AIX loader alignment check.
4748
4749         * coff-rs6000.c (_bfd_xcoff_mkobject): Set default text section
4750         alignment to 4 bytes.
4751         (_bfd_xcoff_copy_private_bfd_data): Use text and data alignment
4752         power accessor macro.
4753         (do_shared_object_padding): Remove invalid assertion.
4754
4755 2002-06-10  Richard Sandiford  <rsandifo@redhat.com>
4756
4757         * section.c (_bfd_strip_section_from_output): Set SEC_EXCLUDE
4758         for removed output sections.
4759
4760 2002-06-10  Geoffrey Keating  <geoffk@redhat.com>
4761
4762         * merge.c (merge_strings): Use htab_create_alloc with calloc, not
4763         htab_alloc.
4764         * elf-strtab.c (_bfd_elf_strtab_finalize): Likewise.
4765
4766 2002-06-08  H.J. Lu <hjl@gnu.org>
4767
4768         * elf.c (copy_private_bfd_data): Don't cast to bfd_size_type to
4769         work around a long long bug in gcc 2.96 on mips.
4770
4771 2002-06-08  Jason Thorpe  <thorpej@wasabisystems.com>
4772
4773         * Makefile.am (BFD32_BACKENDS): Add vax1knetbsd.lo.
4774         (BFD32_BACKENDS_CFILES): Add vax1knetbsd.c.
4775         Regenerate dependency lists.
4776         * Makefile.in: Regenerate.
4777         * config.bfd (vax-*-netbsdelf*, vax-*-netbsdaout*): Add
4778         vax1knetbsd_vec to targ_selvecs.
4779         * configure.in: Add vax1knetbsd_vec.
4780         * configure: Regenerate.
4781         * targets.c (_bfd_target_vector): Add vax1knetbsd_vec.
4782         * vax1knetbsd.c: New file.
4783         * vaxnetbsd.c: Update copyright years.
4784         (TARGET_PAGE_SIZE): Set to 0x1000.
4785         (DEFAULT_MID): Set to M_VAX4K_NETBSD.
4786
4787 2002-06-08  Matt Thomas  <matt@3am-software.com>
4788
4789         * libaout.h (enum machine_type): Add M_VAX4K_NETBSD.
4790
4791 2002-06-08  Alan Modra  <amodra@bigpond.net.au>
4792
4793         * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Make static.
4794
4795 2002-06-08  Alan Modra  <amodra@bigpond.net.au>
4796
4797         * Makefile.am: Run "make dep-am".
4798         * Makefile.in: Regenerate.
4799
4800         * armnetbsd.c: Replace CONST with const.
4801         * corefile.c: Likewise.
4802         * elf32-dlx.c: Likewise.
4803         * elf64-mips.c: Likewise.
4804         * mmo.c: Likewise.
4805         * ns32knetbsd.c: Likewise.
4806
4807         * elf64-sparc.c (sparc64_elf_add_symbol_hook): Check the hash
4808         table is elf64-sparc.
4809
4810 2002-06-08  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4811
4812         * elfxx-mips.c (_bfd_mips_elf_relocate_section): Simplify code.
4813         Fix RELA addends to get not shifted in the result. Don't do special
4814         handling of R_MIPS_64 for NewABI.
4815
4816 2002-06-07  Alan Modra  <amodra@bigpond.net.au>
4817
4818         * aoutx.h (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
4819         (NAME(aout,slurp_reloc_table)): Likewise.
4820         * coff-mips.c (mips_relax_section): Use bfd_zalloc.
4821         * coff-rs6000.c (xcoff_write_armap_big): Use bfd_zmalloc.
4822         (xcoff_write_archive_contents_big): Likewise.
4823         (xcoff_generate_rtinit): Likewise.
4824         (xcoff_generate_rtinit): Likewise, and check error return.
4825         * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
4826         * coffgen.c (coff_section_symbol): Use bfd_zalloc.
4827         (coff_get_normalized_symtab): Likewise.
4828         (coff_make_empty_symbol): Likewise.
4829         (bfd_coff_set_symbol_class): Likewise.
4830         * cofflink.c (coff_link_add_symbols): Likewise.
4831         * ecoff.c (_bfd_ecoff_make_empty_symbol): Likewise.
4832         * ecofflink.c (ecoff_write_shuffle): Use bfd_zmalloc.
4833         (bfd_ecoff_write_accumulated_debug): Likewise.
4834         * elf64-alpha.c (get_got_entry): Use bfd_zalloc.
4835         * i386linux.c (bfd_i386linux_size_dynamic_sections): Likewise.
4836         * i386lynx.c (NAME(lynx,slurp_reloc_table)): Use bfd_zmalloc.
4837         * ieee.c (do_with_relocs): Use bfd_zalloc.
4838         * m68klinux.c (bfd_m68klinux_size_dynamic_sections): Likewise.
4839         * pdp11.c (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
4840         (NAME(aout,slurp_reloc_table)): Likewise.
4841         (NAME(aout,squirt_out_relocs)): Don't memset when zalloc'd.
4842         * reloc16.c (bfd_coff_reloc16_relax_section): Use bfd_zmalloc.
4843         * som.c (som_build_and_write_symbol_table): Likewise.
4844         (som_slurp_string_table): Likewise.
4845         (som_slurp_symbol_table): Likewise.
4846         (som_bfd_ar_write_symbol_stuff): Likewise.
4847         * sparclinux.c (bfd_sparclinux_size_dynamic_sections): Use bfd_zalloc.
4848         * sunos.c (bfd_sunos_size_dynamic_sections): Likewise.
4849         * tekhex.c (find_chunk): Likewise.  Get rid of unused "sname".
4850         * vms-gsd.c (_bfd_vms_slurp_gsd): Use bfd_zmalloc.
4851         * xcofflink.c (xcoff_link_add_symbols): Use bfd_zalloc/bfd_zmalloc.
4852
4853 2002-06-07  Alan Modra  <amodra@bigpond.net.au>
4854
4855         * elf-bfd.h (struct bfd_elf_section_data <group_name>): Replace with
4856         "group" union.
4857         (elf_group_name): Update.
4858         (elf_group_id): Define.
4859         (bfd_elf_set_group_contents): Declare.
4860         * elf.c (elf_fake_sections): Qualify use of elf_group_name.
4861         (set_group_contents): Rename to bfd_elf_set_group_contents.  Remove
4862         ATTRIBUTE_UNUSED from failedptrarg.  If elf_group_id is set, use
4863         that sym for the signature.
4864         (_bfd_elf_compute_section_file_positions): Don't call
4865         set_group_contents for "ld -r" case.
4866         (swap_out_syms): Use bfd_zalloc.
4867         * elflink.h (elf_link_add_archive_symbols): Likewise.
4868         (NAME(bfd_elf,size_dynamic_sections)): Likewise.
4869         (elf_bfd_final_link): Call bfd_elf_set_group_contents.
4870
4871 2002-06-07  Alan Modra  <amodra@bigpond.net.au>
4872
4873         * elf64-ppc.c (ppc64_elf_relocate_section): Allow unresolved
4874         relocs in opd for non-shared too.
4875
4876 2002-06-06  Jeffrey Law  <law@redhat.com>
4877
4878         * elf32-h8300.c (elf32_h8_relax_section): Ignore uninteresting
4879         relocations.
4880
4881 2002-06-06  Nick Clifton  <nickc@cambridge.redhat.com>
4882
4883         * merge.c: Include libiberty.h.
4884         * elf-strtab.c: Include libiberty.h.
4885
4886 2002-06-06  Elias Athanasopoulos  <eathan@otenet.gr>
4887
4888         * peXXigen.c (pe_print_idata): Remove unused variable.
4889
4890 2002-06-06  David Heine <dlheine@tensilica.com>
4891
4892         * elf.c (assign_file_positions_for_segments): Remove unallocated
4893         sections from the section to segment mapping for PT_LOAD segments.
4894         Update comment about empty loadable segments.
4895
4896 2002-06-06  Richard Sandiford  <rsandifo@redhat.com>
4897
4898         * stabs.c (_bfd_link_section_stabs): Check that the symbol offset
4899         is within the .stabstr section.
4900
4901 2002-06-06  Alan Modra  <amodra@bigpond.net.au>
4902
4903         * elf-bfd.h (struct elf_size_info <swap_symbol_in>): Function args
4904         are "const PTR", not "const PTR *".
4905         (bfd_elf32_swap_symbol_in): Likewise.
4906         (bfd_elf64_swap_symbol_in): Likewise.
4907         * elfcode.h (elf_swap_symbol_in): Change input args to const PTR.
4908         (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
4909         * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
4910         (elf_link_add_object_symbols): Likewise.
4911         (elf_link_record_local_dynamic_symbol): Likewise.
4912         (elf_link_input_bfd): Likewise.
4913         (elf_gc_mark): Likewise.
4914         (elf_reloc_symbol_deleted_p): Likewise.
4915         * elf-m10200.c (mn10200_elf_relax_section): Likewise.
4916         (mn10200_elf_relax_delete_bytes): Likewise.
4917         (mn10200_elf_symbol_address_p): Likewise.
4918         (mn10200_elf_get_relocated_section_contents): Likewise.
4919         * elf-m10300.c (mn10300_elf_relax_section): Likewise.
4920         (mn10300_elf_relax_section): Likewise.
4921         (mn10300_elf_relax_delete_bytes): Likewise.
4922         (mn10300_elf_symbol_address_p): Likewise.
4923         (mn10300_elf_get_relocated_section_contents): Likewise.
4924         * elf32-h8300.c (elf32_h8_relax_section): Likewise.
4925         (elf32_h8_relax_delete_bytes): Likewise.
4926         (elf32_h8_symbol_address_p): Likewise.
4927         (elf32_h8_get_relocated_section_contents): Likewise.
4928         * elf32-hppa.c (get_local_syms): Likewise.
4929         * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
4930         * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
4931         * elf32-sh.c (sh_elf_relax_section): Likewise.
4932         (sh_elf_relax_delete_bytes): Likewise.
4933         (sh_elf_get_relocated_section_contents): Likewise.
4934         * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
4935         * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
4936         * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
4937         * elf64-mmix.c (mmix_elf_relax_section): Likewise.
4938         * elf64-ppc.c (get_local_syms): Likewise.
4939         * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
4940         * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
4941
4942 2002-06-05  J"orn Rennecke <joern.rennecke@superh.com>
4943
4944         * config.bfd (sh64l*-*-elf*, shl*-*-elf*): New configurations.
4945
4946 2002-06-05  Alan Modra  <amodra@bigpond.net.au>
4947
4948         * elf.c (group_signature): Swap in the whole symbol, and handle
4949         extracting section symbol names.
4950         (setup_group): Add comment.
4951         (set_group_contents): When called from objcopy or ld, arrange for
4952         section contents to be written.  Write group member output section
4953         indices to allow objcopy to reorganize sections.
4954         (_bfd_elf_copy_private_section_data): Copy group info.
4955
4956         * elf-bfd.h (struct elf_size_info): Add swap_symbol_in field.
4957         (bfd_elf32_swap_symbol_in): Update prototype.
4958         (bfd_elf64_swap_symbol_in): Likewise.
4959         * elfcode.h (elf_swap_symbol_in): Change input args to const PTR *.
4960         (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
4961         * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
4962         (elf_link_add_object_symbols): Likewise.
4963         (elf_link_record_local_dynamic_symbol): Likewise.
4964         (elf_link_input_bfd): Likewise.
4965         (elf_gc_mark): Likewise.
4966         (elf_reloc_symbol_deleted_p): Likewise.
4967         * elf-m10200.c (mn10200_elf_relax_section): Likewise.
4968         (mn10200_elf_relax_delete_bytes): Likewise.
4969         (mn10200_elf_symbol_address_p): Likewise.
4970         (mn10200_elf_get_relocated_section_contents): Likewise.
4971         * elf-m10300.c (mn10300_elf_relax_section): Likewise.
4972         (mn10300_elf_relax_section): Likewise.
4973         (mn10300_elf_relax_delete_bytes): Likewise.
4974         (mn10300_elf_symbol_address_p): Likewise.
4975         (mn10300_elf_get_relocated_section_contents): Likewise.
4976         * elf32-h8300.c (elf32_h8_relax_section): Likewise.
4977         (elf32_h8_relax_delete_bytes): Likewise.
4978         (elf32_h8_symbol_address_p): Likewise.
4979         (elf32_h8_get_relocated_section_contents): Likewise.
4980         * elf32-hppa.c (get_local_syms): Likewise.
4981         * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
4982         * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
4983         * elf32-sh.c (sh_elf_relax_section): Likewise.
4984         (sh_elf_relax_delete_bytes): Likewise.
4985         (sh_elf_get_relocated_section_contents): Likewise.
4986         * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
4987         * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
4988         * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
4989         * elf64-mmix.c (mmix_elf_relax_section): Likewise.
4990         * elf64-ppc.c (get_local_syms): Likewise.
4991         * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
4992         * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
4993         * elfcode.h (NAME(_bfd_elf,size_info)): Update initialiser.
4994         * elf64-alpha.c (alpha_elf_size_info): Likewise.
4995         * elf64-hppa.c (hppa64_elf_size_info): Likewise.
4996         * elf64-mips.c (mips_elf64_size_info): Likewise.
4997         * elf64-s390.c (s390_elf64_size_info): Likewise.
4998         * elf64-sparc.c (sparc64_elf_size_info): Likewise.
4999
5000 2002-06-05  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
5001
5002         * elf32-mips.c (elf32_mips_ignore_discarded_relocs): Move to...
5003         elfxx-mips.c (_bfd_mips_elf_ignore_discarded_relocs): ... here.
5004         elf64-mips.c (elf_backend_ignore_discarded_relocs): Use
5005         _bfd_mips_elf_ignore_discarded_relocs.
5006         elfxx-mips.h (_bfd_mips_elf_ignore_discarded_relocs): Declare.
5007
5008 2002-06-05  H.J. Lu <hjl@gnu.org>
5009
5010         * elfxx-mips.c (mips_elf_calculate_relocation): Call
5011         _bfd_elf_rel_local_sym for STT_SECTION relocations against
5012         the SEC_MERGE section.
5013
5014 2002-06-05  Alan Modra  <amodra@bigpond.net.au>
5015
5016         * coff-alpha.c: Update copyright date.
5017         * coff-mips.c: Likewise.
5018         * xcoff-target.h: Likewise.
5019
5020         * bfd-in.h: Remove "taken from the source" comment.
5021         * libbfd-in.h: Likewise.
5022         * libcoff-in.h: Likewise.
5023         * bfd-in2.h: Regenerate.
5024         * libbfd.h: Regenerate.
5025         * libcoff.h: Regenerate.
5026
5027         * elf.c (bfd_elf_discard_group): Return true.
5028         * elf-bfd.h (bfd_elf_discard_group): Declare.
5029         * bfd-in.h (bfd_elf_discard_group): Don't declare here.
5030         * section.c (bfd_discard_group): Rename to bfd_generic_discard_group.
5031         * bfd.c (bfd_discard_group): Define.
5032         * targets.c (struct bfd_target): Add _bfd_discard_group.
5033         (BFD_JUMP_TABLE_LINK): Here too.
5034         * libbfd-in.h (_bfd_nolink_bfd_discard_group): Define.
5035         * aout-adobe.c (aout_32_bfd_discard_group): Define.
5036         * aout-target.h (MY_bfd_discard_group): Define.
5037         * aout-tic30.c (MY_bfd_discard_group): Define.
5038         * binary.c (binary_bfd_discard_group): Define.
5039         * bout.c (b_out_bfd_discard_group): Define.
5040         * coff-alpha.c (_bfd_ecoff_bfd_discard_group): Define.
5041         * coffcode.h (coff_bfd_discard_group): Define.
5042         * coff-mips.c (_bfd_ecoff_bfd_discard_group): Define.
5043         * elfxx-target.h (bfd_elfNN_bfd_discard_group): Define.
5044         * i386msdos.c (msdos_bfd_discard_group): Define.
5045         * i386os9k.c (os9k_bfd_discard_group): Define.
5046         * ieee.c (ieee_bfd_discard_group): Define.
5047         * ihex.c (ihex_bfd_discard_group): Define.
5048         * mmo.c (mmo_bfd_discard_group): Define.
5049         * nlm-target.h (nlm_bfd_discard_group): Define.
5050         * oasys.c (oasys_bfd_discard_group): Define.
5051         * ppcboot.c (ppcboot_bfd_discard_group): Define.
5052         * som.c (som_bfd_discard_group): Define.
5053         * srec.c (srec_bfd_discard_group): Define.
5054         * tekhex.c (tekhex_bfd_discard_group): Define.
5055         * versados.c (versados_bfd_discard_group): Define.
5056         * vms.c (vms_bfd_discard_group): Define.
5057         * xcoff-target.h (_bfd_xcoff_bfd_discard_group): Define.
5058         * coff64-rs6000.c (rs6000coff64_vec): Update initialiser.
5059         (aix5coff64_vec): Likewise.
5060         * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Likewise.
5061
5062 2002-06-04  Jason Thorpe  <thorpej@wasabisystems.com>
5063
5064         * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-com.lo.
5065         (BFD32_BACKENDS_CFILES): Add elf32-sh64-com.c.
5066         (elf32-sh64-com.lo): New dependency list.
5067         * Makefile.in: Regenerate.
5068         * configure.in (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec)
5069         (bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec): Add
5070         elf32-sh64-com.lo.
5071         * configure: Regenerate.
5072         * elf32-sh64.c (sh64_address_in_cranges)
5073         (sh64_get_contents_type, sh64_address_is_shmedia): Move to...
5074         (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb):
5075         (crange_bsearch_cmpl): Prepend _bfd_sh64_ to name and move to...
5076         * elf32-sh64-com.c: ...here.  New file.
5077
5078 2002-06-04  Alan Modra  <amodra@bigpond.net.au>
5079
5080         * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Remove
5081         ATTRIBUTE_UNUSED on used params.
5082         * elf32-vax.c (elf_vax_gc_mark_hook): Remove unnecessary checks
5083         before calling bfd_section_from_elf_index on local syms.
5084         * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
5085
5086 2002-06-04  Jason Thorpe  <thorpej@wasabisystems.com>
5087
5088         * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-nbsd.lo.
5089         (BFD32_BACKENDS_CFILES): Add elf32-sh64-nbsd.c.
5090         (BFD64_BACKENDS): Add elf64-sh64-nbsd.lo.
5091         (BFD64_BACKENDS_CFILES): Add elf64-sh64-nbsd.c.
5092         (elf32-sh64-nbsd.lo, elf64-sh64-nbsd.lo): New rules.
5093         * Makefile.in: Regenerate.
5094         * config.bfd (sh5le-*-netbsd*, sh5-*-netbsd*, sh64le-*-netbsd*)
5095         (sh64-*-netbsd*): New targets.
5096         * configure.in: Add bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec,
5097         bfd_elf64_sh64nbsd_vec, and bfd_elf64_sh64lnbsd_vec.
5098         * configure: Regenerate.
5099         * elf32-sh64-nbsd.c: New file.
5100         * elf64-sh64-nbsd.c: New file.
5101         * targets.c: Add extern decls for bfd_elf32_sh64nbsd_vec,
5102         bfd_elf32_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec, and
5103         bfd_elf64_sh64lnbsd_vec.
5104
5105 2002-06-04  Alan Modra  <amodra@bigpond.net.au>
5106
5107         * elf.c (setup_group): Set SEC_LINK_ONCE on GRP_COMDAT groups.
5108         (bfd_section_from_shdr): Likewise.  Set section name of group
5109         sections from signature.
5110         (group_signature): Split out from setup_group.  Ensure symbol table
5111         is available.
5112         (bfd_elf_discard_group): New function.
5113         (_bfd_elf_make_section_from_shdr): Don't set SEC_LINK_ONCE on
5114         .gnu.linkonce* sections if they are members of a group.
5115         (set_group_contents): Set GRP_COMDAT flag.
5116         * section.c (bfd_discard_group): New function.
5117         * bfd-in.h (bfd_elf_discard_group): Declare.
5118         * bfd-in2.h: Regenerate.
5119         * elf-bfd.h (struct bfd_elf_section_data): Add linkonce_p field.
5120         (elf_linkonce_p): Define.
5121
5122 2002-06-04  Alan Modra  <amodra@bigpond.net.au>
5123
5124         * elf.c (bfd_section_from_shdr): Make "name" const.
5125         * elf-bfd.h (elf_backend_section_from_shdr): Likewise.
5126         * elf32-i370.c (i370_elf_section_from_shdr): Likewise.
5127         * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
5128         * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
5129         * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
5130         * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
5131         * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
5132         * elf64-ppc.c (ppc64_elf_section_from_shdr): Likewise.
5133         * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
5134         * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
5135         * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
5136
5137 2002-06-03  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
5138
5139         * elfxx-mips.c (ABI_64_P): Use backend's data to determine the
5140         ABI.
5141
5142 2002-06-02  Kazu Hirata  <kazu@cs.umass.edu>
5143
5144         * elf32-arc.c: Fix formatting.
5145         * elf32-arm.h: Likewise.
5146         * elf32-cris.c: Likewise.
5147         * elf32-dlx.c: Likewise.
5148         * elf32-hppa.c: Likewise.
5149         * elf32-i386.c: Likewise.
5150         * elf32-i386qnx.c: Likewise.
5151         * elf32-or32.c: Likewise.
5152         * elf32-s390.c: Likewise.
5153         * elf32-sh64.c: Likewise.
5154         * elf32-vax.c: Likewise.
5155         * elf32-xstormy16.c: Likewise.
5156         * elf64-alpha.c: Likewise.
5157         * elf64-mmix.c: Likewise.
5158         * elf64-ppc.c: Likewise.
5159         * elf64-s390.c: Likewise.
5160         * elf64-sh64.c: Likewise.
5161         * elf64-x86-64.c: Likewise.
5162
5163 2002-06-02  Richard Henderson  <rth@redhat.com>
5164
5165         * elf64-alpha.c (elf64_alpha_relocate_section): Don't dereference
5166         null when there are no got entries for a symbol.
5167         (elf64_alpha_relax_find_tls_segment): Rearrange to avoid
5168         uninitialized variable warning.
5169
5170 2002-06-01  Richard Henderson  <rth@redhat.com>
5171
5172         * elf64-alpha.c (elf64_alpha_relax_with_lituse): Don't test for
5173         undefined symbols here.
5174         (elf64_alpha_relax_section): Do it here.  Also test for not
5175         defined in the current module.
5176         (elf64_alpha_relocate_section_r): Split out of ...
5177         (elf64_alpha_relocate_section): ... here.  Don't dereference
5178         NULL when looking up local got entries.
5179
5180 2002-06-01  Richard Henderson  <rth@redhat.com>
5181
5182         * elf64-alpha.c (elf64_alpha_relax_with_lituse): Reject undefined
5183         symbols from JSR relaxation.
5184         (elf64_alpha_size_plt_section_1): New.
5185         (elf64_alpha_calc_dynrel_sizes): Split out .rela.got bits ...
5186         (elf64_alpha_size_rela_got_1): ... here.
5187         (elf64_alpha_size_dynamic_sections): Split out .rela.got bits ...
5188         (elf64_alpha_size_rela_got_section): ... here.
5189         (elf64_alpha_size_plt_section): New.
5190         (elf64_alpha_relax_section): Call them.
5191         (elf64_alpha_size_got_sections): Remove output_bfd arg.
5192         (elf64_alpha_finish_dynamic_symbol): Check gotent use_count.
5193
5194 2002-06-01  Richard Henderson  <rth@redhat.com>
5195
5196         * elf64-alpha.c (alpha_get_dtprel_base, alpha_get_tprel_base): New.
5197         (elf64_alpha_relocate_section): Use them.  Reject LE TLS relocs
5198         in shared libraries.  Fix DTPRELHI and TPRELHI value.
5199         (INSN_ADDQ, INSN_RDUNIQ): New.
5200         (struct alpha_relax_info): Add symtab_hdr, tls_segment, first_gotent.
5201         (elf64_alpha_relax_with_lituse): Return boolean.  Remove irelend
5202         argument.  Reject dynamic symbols.  Use LITUSE symbolic constants.
5203         (elf64_alpha_relax_got_load): Rename from relax_without_lituse.
5204         Handle GOTDTPREL and GOTTPREL relocations.
5205         (elf64_alpha_relax_gprelhilo): New.
5206         (elf64_alpha_relax_tls_get_addr): New.
5207         (elf64_alpha_relax_find_tls_segment): New.
5208         (elf64_alpha_relax_section): Handle TLS relocations.
5209         (ALPHA_ELF_LINK_HASH_TLS_IE): New.
5210         (elf64_alpha_check_relocs): Set it.
5211
5212 2002-06-01  Richard Henderson  <rth@redhat.com>
5213
5214         * elf64-alpha.c (elf64_alpha_relax_section): Don't store computed gp.
5215
5216         * elf64-alpha.c (elf64_alpha_check_relocs): Fix typo on maybe_dynamic
5217         check; don't suppress dynamic relocs for non-allocated sections.
5218
5219         * elf64-alpha.c: Remove dead code.
5220
5221 2002-05-31  Alan Modra  <amodra@bigpond.net.au>
5222
5223         * bfd-in2.h: Regenerate.
5224         * libbfd.h: Regenerate.
5225         * po/SRC-POTFILES.in: Regenerate.
5226
5227         * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate
5228         space for bss .plt.
5229
5230 2002-05-31  Graeme Peterson  <gp@qnx.com>
5231
5232         * Makefile.am (BFD32_BACKENDS): Add elf32-i386qnx.lo.
5233         (BFD32_BACKENDS_CFILES): Add elf32-i386qnx.c.
5234         Run "make dep-am".
5235         * Makefile.in: Regenerate.
5236         * config.bfd: Add i[3456]86-*-nto-qnx* support.
5237         * configure.in: Add bfd_elf32_i386qnx_vec support.
5238         * configure: Regenerate.
5239         * elf-bfd.h (struct elf_backend_data): Add set_nonloadable_filepos,
5240         is_contained_by_filepos, and copy_private_bfd_data_p.
5241         * elf.c (assign_file_positions_for_segments): Call backend
5242         set_nonloadable_filepos.  Fix non-K&R call to _bfd_error_handler.
5243         (IS_CONTAINED_BY_FILEPOS): Define.
5244         (INCLUDE_SECTION_IN_SEGMENT): Also test IS_CONTAINED_BY_FILEPOS.
5245         (copy_private_bfd_data): Use IS_CONTAINED_BY_FILEPOS.  Typo fix.
5246         Fix non-K&R call to _bfd_error_handler.
5247         (_bfd_elf_copy_private_section_data): Use backend
5248         copy_private_bfd_data_p.
5249         * elf32-i386.c: Don't include elfxx-target.h when
5250         ELF32_I386_C_INCLUDED is defined.
5251         * elf32-i386qnx.c: New QNX elf backend file.
5252         * elfxx-target.h: Add elf_backend_set_nonloadable_filepos,
5253         elf_backend_is_contained_by_filepos, and
5254         elf_backend_do_copy_private_bfd_data.
5255         * targets.c: Add bfd_target bfd_elf32_i386qnx_vec.
5256
5257 2002-05-31  Alan Modra  <amodra@bigpond.net.au>
5258
5259         * elfarm-oabi.c (bfd_elf32_arm_add_glue_sections_to_bfd): Define.
5260         Move other similar defines to start of file.
5261
5262 2002-05-30  Tom Rix  <trix@redhat.com>
5263
5264         * coff-rs6000.c (xcoff_rtype2howto): Handle 16 bit R_RBA.
5265         * coff64-rs6000.c (xcoff64_rtype2howto): Same.
5266
5267 2002-05-30  Richard Henderson  <rth@redhat.com>
5268
5269         * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_TLSGD,
5270         ALPHA_ELF_LINK_HASH_LU_TLSLDM, ALPHA_ELF_LINK_HASH_LU_FUNC): New.
5271         (ALPHA_ELF_GOT_ENTRY_RELOCS_DONE): Remove.
5272         (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Remove.
5273         (struct alpha_elf_got_entry): Add reloc_type, reloc_done, reloc_xlated.
5274         (struct alpha_elf_obj_tdata): Rename total_got_entries and
5275         n_local_got_entries to total_got_size and local_got_size.
5276         (elf64_alpha_howto, elf64_alpha_reloc_map): Update for TLS relocs.
5277         (alpha_got_entry_size): New.
5278         (elf64_alpha_relax_with_lituse): Use it.
5279         (elf64_alpha_relax_without_lituse): Likewise.
5280         (MAX_GOT_SIZE): Rename from MAX_GOT_ENTRIES.
5281         (get_got_entry): New.
5282         (elf64_alpha_check_relocs): Handle TLS relocs.  Reorganize.
5283         (elf64_alpha_adjust_dynamic_symbol): Test LU_FUNC as a mask.
5284         (elf64_alpha_merge_ind_symbols): Check gotent->reloc_type.
5285         (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots): Likewise.
5286         (elf64_alpha_calc_got_offsets_for_symbol): Use alpha_got_entry_size.
5287         (elf64_alpha_calc_got_offsets): Likewise.
5288         (alpha_dynamic_entries_for_reloc): New.
5289         (elf64_alpha_calc_dynrel_sizes): Use it.
5290         (elf64_alpha_size_dynamic_sections): Likewise.
5291         (elf64_alpha_relocate_section): Handle TLS relocations.
5292         * reloc.c: Add Alpha TLS relocations.
5293         * bfd-in2.h, libbfd.h: Rebuild.
5294
5295 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
5296
5297         * peXXigen.c (pe_print_idata): Remove double printed
5298         import table lines; add Bound-To comment.
5299
5300 2002-05-29  Matt Thomas  <matt@3am-software.com>
5301
5302         * Makefile.am (BFD32_BACKENDS): Add elf32-vax.lo.
5303         (BFD32_BACKENDS_CFILES): Add elf32-vax.c.
5304         (elf32-vax.lo): New rule.
5305         * Makefile.in: Regenerate.
5306         * configure.in (bfd_elf32_vax_vec)
5307         (vaxnetbsd_vec): New vectors.
5308         * configure: Regenerate.
5309         * config.bfd (vax-*-netbsdelf*)
5310         (vax-*-netbsdaout*)
5311         (vax-*-netbsd*): New targets.
5312         * elf32-vax.c: New file.
5313         * reloc.c: Add VAX relocations.
5314         * bfd-in2.h: Regenerate.
5315         * targets.c (_bfd_target_vector): Add bfd_elf32_vax_vec.
5316
5317 2002-05-29  Jason Thorpe  <thorpej@wasabisystems.com>
5318
5319         * config.bfd (arm-*-netbsd*): Add bfd_elf32_littlearm_vec
5320         and bfd_elf32_bigarm_vec to targ_selvecs.
5321
5322 2002-05-29  Ralf Habacker  <ralf.habacker@freenet.de>
5323
5324         * peXXigen.c (pe_print_idata): Fix seg faults on printing import tables
5325         with auto-imported symbols.
5326
5327 2002-05-29  Adam Nemet  <anemet@lnxw.com>
5328
5329         * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Don't add glue
5330         sections only record bfd.
5331         (bfd_elf32_arm_add_glue_sections_to_bfd): New function.
5332         * bfd-in.h (bfd_elf32_arm_add_glue_sections_to_bfd): Declare it.
5333         * bfd-in2.h: Regenerate.
5334
5335 2002-05-28  Nick Clifton  <nickc@cambridge.redhat.com>
5336
5337         * syms.c (_bfd_stab_section_find_nearest_line): Move
5338         declaration and initialisation of saw_line and saw_func out of
5339         for loop.
5340
5341 2002-05-29  Alan Modra  <amodra@bigpond.net.au>
5342
5343         * elf64-ppc.c (ppc64_elf_get_symbol_info): New function.
5344         (bfd_elf64_get_symbol_info): Define.
5345         * elfxx-target.h (bfd_elfNN_get_symbol_info): Only define if undef.
5346
5347 2002-05-29  Andrey Volkov  <avolkov@transas.com>
5348
5349         * cpu-h8300.c: Make default h8300 machine first in machine list.
5350
5351 2002-05-28  Kuang Hwa Lin <kuang@sbcglobal.net>
5352
5353         * config.bfd: Added DLX configuraton.
5354         * Makefile.am: Added DLX configuraton.
5355         * configure.in: Added DLX configuraton.
5356         * archures.c: Add DLX architecure.
5357         * reloc.c: Add DLX relocs.
5358         * targets.c: Added DLX target vector.
5359         * configure: Regenerate.
5360         * Makefile.in: Regenreate.
5361         * bfd-in2.h: Regenreate.
5362         * elf32-dlx.c: New file: Support DLX target.
5363         * cpu-dlx.c: New file: Support DLX target.
5364
5365 2002-05-25  Alan Modra  <amodra@bigpond.net.au>
5366
5367         * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Formatting.
5368
5369         * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Revert last change.
5370         (ppc64_elf_check_relocs): Don't set up function descriptor symbol
5371         strings to point inside function code sym string.
5372         (func_desc_adjust): Likewise.
5373         (ppc64_elf_hide_symbol): Rewrite code to look up function code sym.
5374
5375 2002-05-24  Michal Ludvig  <mludvig@suse.cz>
5376
5377         * elf64-x86-64.c (elf64_x86_64_grok_prstatus): Added.
5378         (elf64_x86_64_grok_psinfo): Added.
5379
5380 2002-05-24  TAMURA Kent <kent@netbsd.org>
5381
5382         * config.bfd: Add a target for i386-netbsdpe.
5383
5384 2002-05-24  Alan Modra  <amodra@bigpond.net.au>
5385
5386         * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy is_func
5387         and is_func_descriptor.
5388         (func_desc_adjust): Hide function code sym in shared libs unless
5389         there is a matching exported function descriptor sym.
5390
5391 2002-05-23  Jakub Jelinek  <jakub@redhat.com>
5392
5393         * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_THREAD_LOCAL
5394         for symbols from SHF_TLS section.
5395         (_bfd_elf_print_private_bfd_data): Add PT_TLS.
5396         (elf_fake_sections): Set SHF_TLS for SEC_THREAD_LOCAL sections.
5397         (map_sections_to_segments): Build PT_TLS segment if necessary.
5398         (assign_file_positions_for_segments): Likewise.
5399         (get_program_header_size): Account for PT_TLS segment.
5400         (swap_out_syms): Set type of BSF_THREAD_LOCAL symbols and symbols from
5401         SEC_THREAD_LOCAL sections to STT_TLS.
5402         * reloc.c: Add 386 and IA-64 TLS relocs.
5403         * section.c (SEC_THREAD_LOCAL): Define.
5404         (SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS):
5405         Remove.
5406         * elflink.h (elf_link_add_object_symbols): Support .tcommon.
5407         (size_dynamic_sections): If DF_STATIC_TLS, set DF_FLAGS
5408         unconditionally.
5409         (struct elf_final_link_info): Add first_tls_sec.
5410         (elf_bfd_final_link): Set first_tls_sec.
5411         Compute elf_hash_table (info)->tls_segment.
5412         (elf_link_output_extsym): Handle STT_TLS symbols.
5413         (elf_link_input_bfd): Likewise.
5414         * syms.c (BSF_THREAD_LOCAL): Define.
5415         * bfd-in2.h: Rebuilt.
5416         * libbfd.h: Rebuilt.
5417         * elf32-i386.c (elf_i386_tls_transition, dtpoff_base, tpoff,
5418         elf_i386_mkobject, elf_i386_object_p): New functions.
5419         (elf_howto_table): Add TLS relocs.
5420         (elf_i386_reloc_type_lookup): Support TLS relocs.
5421         (elf_i386_info_to_howto_rel): Likewise.
5422         (struct elf_i386_link_hash_entry): Add tls_type.
5423         (struct elf_i386_obj_tdata): New.
5424         (elf_i386_hash_entry, elf_i386_tdata, elf_i386_local_got_tls_type):
5425         New macros.
5426         (struct elf_i386_link_hash_table): Add tls_ldm_got.
5427         (link_hash_newfunc): Clear tls_type.
5428         (elf_i386_check_relocs): Support TLS relocs.
5429         (elf_i386_gc_sweep_hook): Likewise.
5430         (allocate_dynrelocs): Likewise.
5431         (elf_i386_size_dynamic_sections): Likewise.
5432         (elf_i386_relocate_section): Likewise.
5433         (elf_i386_finish_dynamic_symbol): Likewise.
5434         (bfd_elf32_mkobject, elf_backend_object_p): Define.
5435         * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add tprel_offset,
5436         dtpmod_offset, dtprel_offset, tprel_done, dtpmod_done, dtprel_done,
5437         want_tprel, want_dtpmod, want_dtprel.
5438         (elfNN_ia64_tprel_base, elfNN_ia64_dtprel_base): New functions.
5439         (ia64_howto_table): Add TLS relocs, rename R_IA64_LTOFF_TP22 to
5440         R_IA64_LTOFF_TPREL22.
5441         (elf_code_to_howto_index): Add TLS relocs.
5442         (elfNN_ia64_check_relocs): Support TLS relocs.
5443         (allocate_global_data_got): Account for TLS .got data.
5444         (allocate_dynrel_entries): Account for TLS dynamic relocations.
5445         (elfNN_ia64_install_value): Supprt TLS relocs.
5446         (set_got_entry): Support TLS relocs.
5447         (elfNN_ia64_relocate_section): Likewise.
5448
5449 2002-05-23  Nick Clifton  <nickc@cambridge.redhat.com>
5450
5451         * elf32-arm.h (elf32_arm_final_link_relocate): For the Thumb
5452         BLX reloc round the relocation up rather than down.
5453         * coff-arm.c (coff_arm_relocate_section): Likewise.
5454
5455 2002-05-21  H.J. Lu  (hjl@gnu.org)
5456
5457         * linker.c (_bfd_generic_link_add_one_symbol): Allow multiple
5458         definition.
5459
5460 2002-05-22  Alan Modra  <amodra@bigpond.net.au>
5461
5462         * elf64-ppc.c (ppc64_elf_size_stubs): Don't strip .branch_lt.
5463         (ppc64_elf_relocate_section): Handle unresolved relocs in opd.
5464
5465 2002-05-22  Alan Modra  <amodra@bigpond.net.au>
5466
5467         * elf64-ppc.c (ppc64_elf_relocate_section): Return false for
5468         unresolved relocs.
5469         (ppc64_elf_size_dynamic_sections): Check for splt NULL.
5470
5471 2002-05-21  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5472
5473         * bfd.c (bfd_get_arch_size): Remove bfd_set_error call for
5474         non-ELF targets.
5475
5476 2002-05-21  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5477
5478         * elf-bfd.h (elf_backend_emit_relocs): Change prototype to return
5479         an error value.
5480         * elflink.h (elf_link_output_relocs): Likewise. Improve error message.
5481         return with false on error.
5482         (elf_link_input_bfd): Check reloc_emitter return value.
5483
5484 2002-05-21  Jason Thorpe  <thorpej@wasabisystems.com>
5485
5486         * config.bfd (armeb-*-netbsdelf*): New target.
5487
5488 2002-05-20  Alan Modra  <amodra@bigpond.net.au>
5489
5490         * elf64-ppc.c (ppc_build_one_stub): Point undefined function syms
5491         at the plt call stub.
5492
5493 2002-05-19  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5494
5495         * cpu-mips.c (mips_compatible): Don't try to check machine
5496         compatibility.
5497
5498 2002-05-18  Tom Rix  <trix@redhat.com>
5499
5500         * coff64-rs6000.c (_bfd_xcoff64_swap_aux_out):  Fix C_FILE auxent.
5501
5502 2002-05-17  Alan Modra  <amodra@bigpond.net.au>
5503
5504         * elf64-ppc.c (ppc64_elf_info_to_howto): Formatting.
5505         (ppc64_elf_relocate_section): Don't warn about reloc overflow when
5506         we've already warned about an undefined symbol.  Report more
5507         detail on reloc errors.
5508
5509 2002-05-17  Alan Modra  <amodra@bigpond.net.au>
5510
5511         * acinclude.m4 (AM_INSTALL_LIBBFD): New.
5512         * configure.in: Invoke AM_INSTALL_LIBBFD.
5513         * Makefile.am (install-data-local): Revert 2002-05-13.  Move to..
5514         (install_libbfd): .. New target.
5515         (uninstall_libbfd): Likewise.
5516         (install-bfdlibLTLIBRARIES): Likewise.
5517         (uninstall-bfdlibLTLIBRARIES): Likewise.
5518         (bfdlibdir): New.
5519         (bfdincludedir): New.
5520         (lib_LTLIBRARIES): Rename to bfdlib_LTLIBRARIES.
5521         * aclocal.m4: Regenerate.
5522         * configure: Regenerate.
5523         * Makefile.in: Regenerate.
5524
5525 2002-05-17  Stuart Balfour <sbalfour@cisco.com>
5526
5527         * hash.c (bfd_hash_lookup): Remove computation of len from inside
5528         hash loop.
5529
5530 2002-05-16  Nick Clifton  <nickc@cambridge.redhat.com>
5531
5532         * config.bfd: Add targets for sh64-linux (little endian and
5533         big endian).
5534
5535 2002-05-15  Laurent Pinchart <laurent.pinchart@skynet.be>
5536
5537         * peXXigen.c (pe_print_idata): Do not assume that the first thunk
5538         is located in the same section as the import table.  Instead
5539         check, and if necessary load the section containing the thunk.
5540
5541 2002-05-15  Nick Clifton  <nickc@cambridge.redhat.com>
5542
5543         * aix5ppc-core.c (xcoff64_core_p): Replace bfd_read with
5544         bfd_bread.
5545         (xcoff64_core_file_matches_executable_p): Replace bfd_read
5546         with bfd_bread.
5547
5548 2002-05-15  Alan Modra  <amodra@bigpond.net.au>
5549
5550         * aix5ppc-core.c: Warning fixes.
5551         * aout-adobe.c (aout_32_bfd_link_just_syms): Define.
5552         * aout-target.h (MY_bfd_link_just_syms): Define.
5553         * aout-tic30.c (MY_bfd_link_just_syms): Define.
5554         * bfd.c (bfd_link_just_syms): Define.
5555         * binary.c (binary_bfd_link_just_syms): Define.
5556         * bout.c (b_out_bfd_link_just_syms): Define.
5557         * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update initializer.
5558         * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
5559         * coffcode.h (coff_bfd_link_just_syms): Define.
5560         * elf-bfd.h (enum elf_link_info_type): Add ELF_INFO_TYPE_JUST_SYMS.
5561         (elf_discarded_section): Check for ELF_INFO_TYPE_JUST_SYMS.
5562         (_bfd_elf_link_just_syms): Declare.
5563         * elf.c (_bfd_elf_link_just_syms): New function.
5564         * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Check that
5565         sections haven't already been discarded by the linker.
5566         * elflink.h (elf_link_add_object_symbols): Likewise for stab
5567         sections and SEC_MERGE sections.
5568         (elf_bfd_discard_info): Similarly here.
5569         * elfxx-target.h (bfd_elfNN_bfd_link_just_syms): Define.
5570         * i386msdos.c (msdos_bfd_link_just_syms): Define.
5571         * i386os9k.c (os9k_bfd_link_just_syms): Define.
5572         * ieee.c (ieee_bfd_link_just_syms): Define.
5573         * ihex.c (ihex_bfd_link_just_syms): Define.
5574         * libbfd-in.h (_bfd_nolink_bfd_link_just_syms): Define.
5575         (_bfd_generic_link_just_syms): Declare.
5576         * libecoff.h (_bfd_ecoff_bfd_link_just_syms): Define.
5577         * linker.c (_bfd_generic_link_just_syms): New function.
5578         * mmo.c (mmo_bfd_link_just_syms): Define.
5579         * nlm-target.h (nlm_bfd_link_just_syms): Define.
5580         * oasys.c (oasys_bfd_link_just_syms): Define.
5581         * ppcboot.c (ppcboot_bfd_link_just_syms): Define.
5582         * som.c (som_bfd_link_just_syms): Define.
5583         * srec.c (srec_bfd_link_just_syms): Define.
5584         * targets.c (struct bfd_target): Add _bfd_link_just_syms.
5585         (BFD_JUMP_TABLE_LINK): And here.
5586         * tekhex.c (tekhex_bfd_link_just_syms): Define.
5587         * versados.c (versados_bfd_link_just_syms): Define.
5588         * vms.c (vms_bfd_link_just_syms): Define.
5589         * libbfd.h: Regenerate.
5590         * bfd-in2.h: Regenerate.
5591
5592 2002-05-15  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5593
5594         * elf32-mips.c: Remove superfluous definitions copied from
5595         elfxx-mips.c.
5596         (bfd_elf32_bigmips_vec,bfd_elf32_littlemips_vec): Use the
5597         SGIish vectors to check the special case.
5598         (mips_elf_hi16_reloc): Fix comment.
5599         (mips_elf_got16_reloc): Likewise.
5600         (_bfd_mips_elf32_gprel16_reloc): Likewise.
5601         (elf_reloc_map): Code cleanup.
5602         (mips_reloc_map): Add comment.
5603         (bfd_elf23_bfd_reloc_type_lookup): Code cleanup.
5604         (mips_elf32_rtype_to_howto): Likewise.
5605         (mips_elf32_discard_info): Likewise.
5606         (elf32_mips_irix_compat): Invert logic: Only SGIish vectors
5607         lead to IRIX compatibility now.
5608
5609 2002-05-15  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5610
5611         * elfxx-mips.c: Call it IRIX, not Irix in comments.
5612
5613 2002-05-13  Jason Thorpe  <thorpej@wasabisystems.com>
5614
5615         * config.bfd (shle-*-netbsdelf*): Add target which includes
5616         sh64 support.
5617
5618 2002-05-13  David Edelsohn  <edelsohn@gnu.org>
5619
5620         * configure.in: Revert 2002-04-07.  Instead, auto-configure
5621         HAVE_ST_C_IMPL.
5622         * configure: Regenerate.
5623         * config.in: Regenerate.
5624         * rs6000-core.c (CNEW_IMPL): Guard use of c_impl with HAVE_ST_C_IMPL
5625         or AIX_5_CORE.
5626
5627 2002-05-11  Federico G. Schwindt <fgsch@olimpo.com.br>
5628
5629         * configure.in (sparc*-*-openbsd*): Support sparc64-openbsd
5630         corefiles as well.2
5631         * configure: Regenerate.
5632
5633 2002-05-13  Alan Modra  <amodra@bigpond.net.au>
5634
5635         * Makefile.am (install-data-local): Install headers to
5636         $(exec_prefix)/include.
5637         * Makefile.in: Regenerate.
5638
5639 2002-05-11  Ralf Corsepius  <corsepiu@faw.uni-ulm.de>
5640             Daniel Jacobowitz  <drow@mvista.com>
5641
5642         * coff-sh.c (sh_reloc_map): Map to R_SH_IMM32 for non-PE.  Don't
5643         map BFD_RELOC_RVA.
5644
5645 2002-05-11  Federico G. Schwindt <fgsch@olimpo.com.br>
5646
5647         * config.bfd (alpha*-*-openbsd*, sparc64*-*-openbsd*,
5648         hppa*-*-openbsd*): New targets.
5649         * configure.in (alpha*-*-openbsd*): Set COREFILE.
5650         * configure: Regenerate.
5651
5652 2002-05-10  Tom Rix  <trix@redhat.com>
5653
5654         * coff64-rs6000.c (xcoff64_reloc_type_br): New function for
5655         xcoff64_ppc_relocate_section.
5656         * coff-rs6000.c : Extern common xcoff_reloc_type functions.
5657         * libxcoff.h: Common xcoff_reloc_type function declaration.
5658
5659 2002-05-10  Alan Modra  <amodra@bigpond.net.au>
5660
5661         * elf32-i386.c (elf_i386_relocate_section): Remove overflow checks
5662         added in 2002-05-09 commit.
5663
5664         * elf32-hppa.c (elf32_hppa_size_stubs): Revert part of 2002-05-04,
5665         don't look for stubs on all undefined syms.
5666
5667 2002-05-09  Alan Modra  <amodra@bigpond.net.au>
5668
5669         * elf64-ppc.c (RA_REGISTER_MASK, RA_REGISTER_SHIFT): Delete.
5670         (ppc64_elf_howto_raw <R_PPC64_RELATIVE>): Not pc_relative or
5671         pcrel_offset.
5672
5673         * elf32-i386.c (elf_howto_table): Comments.
5674         (elf_i386_relocate_section): Handle more relocs for relocatable
5675         linking and against SEC_MERGE sections.
5676
5677 2002-05-08  Alan Modra  <amodra@bigpond.net.au>
5678
5679         * elf32-ppc.c (ppc_elf_create_got): New function.
5680         (ppc_elf_create_dynamic_sections): Call ppc_elf_create_got before
5681         _bfd_elf_create_dynamic_sections.  Correct .plt flags.
5682         (ppc_elf_check_relocs): Use ppc_elf_create_got in place of
5683         _bfd_elf_create_got_section.
5684
5685 2002-05-07  Alan Modra  <amodra@bigpond.net.au>
5686
5687         * elf-bfd.h (struct elf_backend_data): Add rela_normal.
5688         * elfxx-target.h (elf_backend_rela_normal): Define.
5689         (elfNN_bed): Init rela_normal.
5690         * elflink.h (elf_link_input_bfd <emit_relocs>): Handle adjustment
5691         for section symbols here if rela_normal.  Simplify abs section test.
5692         * elf-m10200.c (mn10200_elf_relocate_section): If relocatable,
5693         return immediately.  Remove code handling relocatable linking.
5694         * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
5695         * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
5696         * elf32-i370.c (i370_elf_relocate_section): Likewise.
5697         * elf32-i860.c (elf32_i860_relocate_section): Likewise.
5698         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
5699         * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
5700         * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
5701         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
5702         * elf32-s390.c (elf_s390_relocate_section): Likewise.
5703         * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
5704         * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
5705         * elf64-s390.c (elf_s390_relocate_section): Likewise.
5706         * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
5707         * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
5708         * elf32-arm.h (elf32_arm_relocate_section): Likewise #ifndef USE_REL.
5709         * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
5710         * elf-m10200.c (elf_backend_rela_normal): Define.
5711         * elf-m10300.c (elf_backend_rela_normal): Define.
5712         * elf32-fr30.c (elf_backend_rela_normal): Define.
5713         * elf32-i370.c (elf_backend_rela_normal): Define.
5714         * elf32-i860.c (elf_backend_rela_normal): Define.
5715         * elf32-m68k.c (elf_backend_rela_normal): Define.
5716         * elf32-mcore.c (elf_backend_rela_normal): Define.
5717         * elf32-openrisc.c (elf_backend_rela_normal): Define.
5718         * elf32-ppc.c (elf_backend_rela_normal): Define.
5719         * elf32-s390.c (elf_backend_rela_normal): Define.
5720         * elf32-xstormy16.c (elf_backend_rela_normal): Define.
5721         * elf64-ppc.c (elf_backend_rela_normal): Define.
5722         * elf64-s390.c (elf_backend_rela_normal): Define.
5723         * elf64-x86-64.c (elf_backend_rela_normal): Define.
5724         * elfxx-ia64.c (elf_backend_rela_normal): Define.
5725         * elf32-arm.h (elf_backend_rela_normal): Define #ifndef USE_REL.
5726         * elf32-m32r.c (elf_backend_rela_normal): Likewise.
5727
5728 2002-05-06  Nick Clifton  <nickc@cambridge.redhat.com>
5729
5730         * elf32-arm.h (elf32_arm_final_link_relocate): Convert
5731         'reloc_signed_max' and 'reloc_signed_min' into half-word offsets.
5732
5733 2002-05-06  Alan Modra  <amodra@bigpond.net.au>
5734
5735         * elflink.h (elf_link_input_bfd <emit_relocs>): Adjust r_offset
5736         when not relocatable.  Fix reloc_emitter call for K&R.
5737
5738 2002-05-04  Alan Modra  <amodra@bigpond.net.au>
5739
5740         * elf64-ppc.c (ppc64_elf_relocate_section): Reinstate code
5741         reloading local sym addend mistakenly removed in 2002-05-01 change.
5742
5743         * dwarf2.c (struct line_head): Make prologue_length a bfd_vma.
5744         (read_abbrevs): Change "offset" param to bfd_vma.
5745         (parse_comp_unit): Change "version" and addr_size to unsigned ints.
5746         Change "abbrev_offset" to bfd_vma.
5747         (read_indirect_string): Use correct conversion chars in error
5748         message format string, cast bfd_vma's to unsigned long.
5749         (read_abbrevs): Likewise.
5750         (read_attribute_value): Likewise.
5751         (decode_line_info): Likewise.
5752         (scan_unit_for_functions): Likewise.
5753         (parse_comp_unit): Likewise.
5754
5755 2002-05-04  Tom Rix  <trix@redhat.com>
5756
5757         * coffswap.h (coff_swap_reloc_in): Remove XCOFF support.
5758         (coff_swap_reloc_out): Same.
5759         * coff-rs6000.c: (xcoff_swap_reloc_in): Moved from coffswap.h.
5760         (xcoff_swap_reloc_out): Same.
5761         (xcoff_rtype2howto): Renamed from _bfd_xcoff_rtype2howto. Special
5762         case some 16 bit relocs. Add reloc value to output.
5763         (xcoff_howto_table): Remove 64 bit R_POS, add 16 bit
5764         R_RBR. Improve names.
5765         (_bfd_xcoff_reloc_type_lookup): Adjust for removal of 64 bit R_POS.
5766         (bfd_xcoff_backend_data): Update with new reloc swap names.
5767         (bfd_pmac_xcoff_backend_data) : Same.
5768         * coff64-rs6000.c: (xcoff64_swap_reloc_in): Moved from coffswap.h.
5769         (xcoff64_swap_reloc_out): Same.
5770         (xcoff64_rtype2howto): Special case some 16 bit relocs and 32 bit
5771         R_POS. Add reloc value to output.
5772         (xcoff64_howto_table): Move 64 bit R_POS to first entry.  Add 16
5773         bit R_RBR. Improve names, masks.
5774         (xcoff64_reloc_type_lookup): Adjust for move of 64 bit R_POS.
5775         (bfd_xcoff_backend_data): Update with new reloc swap names.
5776         (bfd_xcoff_aix5_backend_data) : Same.
5777
5778 2002-05-04  Alan Modra  <amodra@bigpond.net.au>
5779
5780         * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add
5781         bfd_count top_index, input_list, all_local_syms.
5782         (elf32_hppa_setup_section_lists): New function, split from
5783         elf32_hppa_size_stubs.
5784         (elf32_hppa_next_input_section): Likewise.
5785         (group_sections): Likewise.
5786         (get_local_syms): Likewise.
5787         (elf32_hppa_size_stubs): Adjust for split out functions.  Look for
5788         stubs on undefined syms too.
5789         (elf32_hppa_set_gp): Use bfd_link_hash* instead of elf_link_hash*.
5790         Only access htab elf fields when we have an elf hash table.
5791         * elf32-hppa.h (elf32_hppa_setup_section_lists): Declare.
5792         (elf32_hppa_next_input_section): Declare.
5793
5794 2002-05-04  Bob Byrnes  <byrnes@curl.com>
5795
5796         * opncls.c (_bfd_new_bfd_contained_in): Check return value of
5797         _bfd_new_bfd.
5798
5799 2002-05-03  H.J. Lu  (hjl@gnu.org)
5800
5801         * elfxx-mips.c (mips_elf_link_hash_entry): Add forced_local.
5802         (mips_elf_link_hash_newfunc): Initialize forced_local to false.
5803         (mips_elf_record_global_got_symbol): Call _bfd_mips_elf_hide_symbol
5804         to hide a global symbol.
5805         (_bfd_mips_elf_hide_symbol): Return if forced_local is true. Set
5806         forced_local to true.
5807
5808 2002-05-02  Richard Henderson  <rth@redhat.com>
5809
5810         * elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs
5811         vs SHN_UNDEF to zero.
5812
5813 2002-05-02  Alan Modra  <amodra@bigpond.net.au>
5814
5815         * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_SECTOFF>): Change to a
5816         16 bit reloc.
5817         <R_PPC64_SECTOFF_DS>: Likewise.
5818         (ppc64_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
5819         SECTOFF reloc.
5820         * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_SECTOFF>): Correct.
5821         (ppc_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
5822         SECTOFF reloc.
5823
5824         * elf64-ppc.c (ppc64_elf_addr16_ha_reloc): Delete.
5825         (ppc64_elf_ha_reloc): New function.
5826         (ppc64_elf_brtaken_reloc): New function.
5827         (ppc64_elf_sectoff_reloc): New function.
5828         (ppc64_elf_sectoff_ha_reloc): New function.
5829         (ppc64_elf_toc_reloc): New function.
5830         (ppc64_elf_toc_ha_reloc): New function.
5831         (ppc64_elf_toc64_reloc): New function.
5832         (ppc64_elf_unhandled_reloc): New function.
5833         (ppc64_elf_howto_raw): Use the above.
5834         <R_PPC64_RELATIVE>: Mark pc_relative, pcrel_offset.
5835         <R_PPC64_SECTOFF>: Not pc_relative or pcrel_offset.  Fix dst_mask.
5836         <R_PPC64_SECTOFF_DS>: Likewise.
5837         (IS_ABSOLUTE_RELOC): Update.
5838         (struct ppc_link_hash_table): Add have_undefweak.
5839         (ppc64_elf_link_hash_table_create): Init.
5840         (func_desc_adjust): Set have_undefweak.
5841         (ppc64_elf_func_desc_adjust): Call func_desc_adjust earlier.  Only
5842         add the .sfpr blr when have_undefweak.
5843         (ppc64_elf_setup_section_lists): Check hash table flavour.
5844         (ppc64_elf_next_input_section): Move output_section->owner test to
5845         ppc64elf.em.
5846         (ppc64_elf_set_toc): Rename to ppc64_elf_toc, remove info param
5847         and relocatable test.  Return TOCstart and don't set elf_gp.
5848         (ppc64_elf_relocate_section): Correct BRTAKEN/BRNTAKEN branch
5849         offset calculation.  Add assert on weak sym branch tweaks.
5850         * elf64-ppc.h (ppc64_elf_set_toc): Delete.
5851         (ppc64_elf_toc): Declare.
5852         (ppc64_elf_next_input_section): Update.
5853
5854 2002-05-01  Alan Modra  <amodra@bigpond.net.au>
5855
5856         * syms.c (_bfd_stab_section_find_nearest_line): Don't bomb on NULL
5857         file_name.
5858
5859 2002-05-01  Alan Modra  <amodra@bigpond.net.au>
5860
5861         * elf64-ppc.c (CROR_151515, CROR_313131): Define.
5862         (ppc64_elf_relocate_section): Use them.  Don't look for plt calls
5863         on R_PPC64_ADDR24 relocs.  Require a nop or no link reg on plt
5864         call branches.  Correct undefined weak destination.
5865         (ppc64_elf_func_desc_adjust): Always create at least one blr in
5866         .sfpr, and correct case where either only savef* or restf* is
5867         needed.
5868
5869         Long branch stubs, multiple stub sections.
5870         * elf64-ppc.h (ppc64_elf_setup_section_lists): Declare.
5871         (ppc64_elf_next_input_section): Declare.
5872         * elf64-ppc.c: Move linker-only prototypes.
5873         (STUB_SUFFIX): Define.
5874         (enum ppc_stub_type): New.
5875         (struct ppc_stub_hash_entry): New.
5876         (struct ppc_branch_hash_entry): New.
5877         (struct ppc_link_hash_entry): Add stub_cache, oh.
5878         (struct ppc_link_hash_table): Add stub_hash_table etc.  Remove
5879         sstub.  Add sbrlt, srelbrlt, has_14bit_branch, stub_iteration.
5880         Rename plt_overflow to stub_error.
5881         (ppc_stub_hash_lookup): Define.
5882         (ppc_branch_hash_lookup): Define.
5883         (stub_hash_newfunc): New function.
5884         (branch_hash_newfunc): New function.
5885         (link_hash_newfunc): Init new fields.
5886         (ppc64_elf_link_hash_table_create): Likewise.
5887         (ppc64_elf_link_hash_table_free): New function.
5888         (ppc_stub_name): New function.
5889         (ppc_get_stub_entry): New function.
5890         (ppc_add_stub): New function.
5891         (create_linkage_sections): Use bfd_make_section_anyway.  Create
5892         .branch_lt and .rela.branch_lt sections.  Don't create .stub.
5893         (ppc64_elf_check_relocs): Set has_14bit_branch on R_PPC64_REL14*,
5894         and set up for plt call stubs.  Link func and func desc syms.
5895         (ppc64_elf_gc_sweep_hook): Handle REL14* as per REL24.
5896         (func_desc_adjust): Avoid hash lookup when func desc sym available
5897         via shortcut, and set links when processing.
5898         (ppc64_elf_hide_symbol): Likewise.
5899         (allocate_dynrelocs): Don't allocate stub section here.
5900         (ppc64_elf_size_dynamic_sections): Handle sbrlt and srelbrlt.
5901         Remove sstub code.
5902         (ppc_type_of_stub): New function.
5903         (build_one_stub): Delete.
5904         (ppc_build_one_stub): New function.
5905         (ppc_size_one_stub): New function.
5906         (ppc64_elf_setup_section_lists): New function.
5907         (ppc64_elf_next_input_section): New function.
5908         (group_sections): New function.
5909         (get_local_syms): New function.
5910         (ppc64_elf_size_stubs): Rewrite.
5911         (ppc64_elf_build_stubs): Rewrite.
5912         (ppc64_elf_relocate_section): Look up stub entry for REL24
5913         relocs.  Don't propagate REL14* to dynamic objects.  Look for long
5914         branch stubs if REL14* or REL24 relocs won't reach.
5915         (bfd_elf64_bfd_link_hash_table_free): Define.
5916
5917 2002-04-30  Mark Mitchell  <mark@codesourcery.com>
5918
5919         * config.bfd: Add support for powerpc-*-windiss.
5920
5921 2002-04-30  Tom Rix  <trix@redhat.com>
5922
5923         * xcofflink.c (xcoff_link_add_symbols): Always copy undef C_EXT
5924         symbol names into the hash table.
5925
5926 2002-04-28  Tom Rix  <trix@redhat.com>
5927
5928         * coff-rs6000.c (xcoff_calculate_relocation) : Function table for
5929         calulating relocations.
5930         (xcoff_complain_overflow) : Function table for relocation errors.
5931         (xcoff_ppc_relocate_section): Use relocation and complain function
5932         tables.
5933         (xcoff_complain_overflow_unsigned_func): New complain function.
5934         (xcoff_complain_overflow_signed_func): Same.
5935         (xcoff_complain_overflow_bitfield_func): Same.
5936         (xcoff_complain_overflow_dont_func): Same.
5937         (xcoff_reloc_type_crel): New recot function.
5938         (xcoff_reloc_type_br): Same.
5939         (xcoff_reloc_type_ba): Same.
5940         (xcoff_reloc_type_toc): Same.
5941         (xcoff_reloc_type_rel): Same.
5942         (xcoff_reloc_type_neg): Same.
5943         (xcoff_reloc_type_pos): Same.
5944         (xcoff_reloc_type_fail): Same.
5945         (xcoff_reloc_type_noop): Same.
5946         * libxcoff.h : Declare common parts for xcoff64.
5947         * coff64-rs6000.c (xcoff64_ppc_relocate_section): Use relocation
5948         and complain function tables.
5949
5950 2002-04-28  Alan Modra  <amodra@bigpond.net.au>
5951
5952         * elf64-x86-64.c (struct elf64_x86_64_dyn_relocs): Comment typo.
5953         * elf32-hppa.c (elf32_hppa_final_link): Formatting.
5954
5955 2002-04-26  Alan Modra  <amodra@bigpond.net.au>
5956
5957         * opncls.c (bfd_make_readable): Call bfd_section_list_clear.
5958         * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
5959
5960         * elflink.h (elf_bfd_final_link): Ensure input bfd class is the
5961         same as the output before calling elf_link_input_bfd.
5962
5963         * coffcode.h (coff_compute_section_file_positions): Set
5964         section_tail after shuffling section list.
5965
5966 2002-04-24  Christian Groessler <chris@groessler.org>
5967
5968         * coff-z8k.c (extra_case): Fix R_IMM32 relocations: The
5969         addresses are 23bit with a special layout, not plain 32bit
5970         values.  Prevent relocation of immediate values.
5971
5972 2002-04-24  Chris G. Demetriou  <cgd@broadcom.com>
5973
5974         * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): If MDMX or
5975         MIPS-16 ASE flags are set, print something to indicate that.
5976
5977 2002-04-23  Alan Modra  <amodra@bigpond.net.au>
5978
5979         * elf32-hppa.c (hppa_type_of_stub): Correct and simplify condition
5980         under which a plt call stub is used.
5981         (final_link_relocate): Similarly.
5982         (allocate_plt_static): Clear h-plabel except when plt entry is
5983         exclusively used for a plabel.
5984         (allocate_dynrelocs): Use the above to simplify plt sizing.
5985         (struct elf32_hppa_link_hash_table): Add has_22bit_branch.
5986         (elf32_hppa_link_hash_table_create): Init.
5987         (BL22_RP): Define.
5988         (hppa_build_one_stub): Use BL22_RP if has_22bit_branch.
5989         (elf32_hppa_check_relocs): Set has_22bit_branch.
5990
5991         * elf32-hppa.c (elf32_hppa_check_relocs): Remove debug message.
5992         (final_link_relocate): Likewise.
5993
5994 2002-04-22  Jakub Jelinek  <jakub@redhat.com>
5995
5996         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't build
5997         search table if some FDE is DW_EH_PE_aligned encoded either.
5998         (_bfd_elf_write_section_eh_frame): Handle terminating FDE specially.
5999
6000 2002-04-22  Richard Smith  <richard@ex-parrot.com>
6001             Jakub Jelinek  <jakub@redhat.com>
6002
6003         * elf-eh-frame.c (struct eh_cie_fde): Add per_encoding_relative.
6004         (_bfd_elf_discard_section_eh_frame): Set it for CIEs with pcrel
6005         encoded personality.
6006         (_bfd_elf_write_section_eh_frame): Adjust pcrel encoded personality
6007         for CIE/FDE removal.
6008
6009 2002-04-20  Tom Rix  <trix@redhat.com>
6010
6011         * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Fix C_FILE auxent.
6012
6013 2002-04-20  Alan Modra  <amodra@bigpond.net.au>
6014
6015         * archures.c (bfd_lookup_arch): Move the list order comment..
6016         (struct bfd_arch_info): ..to where it belongs.
6017         * bfd-in2.h: Regenerate.
6018
6019         * archures.c (bfd_lookup_arch): Add comment on list order.
6020         (bfd_default_set_arch_mach): Use bfd_lookup_arch.
6021         * cpu-powerpc.c (bfd_powerpc_archs): Re-order so that the default
6022         is always at head of list.
6023
6024 2002-04-18  Nick Clifton  <nickc@cambridge.redhat.com>
6025
6026         * coff-arm.c (coff_thumb_pcrel_12, coff_thumb_pcrel_9,
6027         insert_thumb_branch, record_thumb_to_arm_glue): Suppress
6028         definition of these functions for ARM_WINCE builds as they are
6029         not used.
6030         (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define
6031         for ARM_WINCE builds.
6032
6033 2002-04-18  Nick Clifton  <nickc@cambridge.redhat.com>
6034
6035         * coff-arm.c (bfd_arm_process_before_allocation):
6036
6037 2002-04-17  J"orn Rennecke <joern.rennecke@superh.com>
6038
6039         * cpu-sh.c (scan_mach): Delete.
6040         (arch_info_struct): Replace scan_mach with bfd_default_scan.
6041         (bfd_sh_arch): Likewise.
6042
6043 2002-04-16  Nick Clifton  <nickc@cambridge.redhat.com>
6044
6045         * ihex.c (ihex_write_object_contents): Fix check for records
6046         crossing 64K boundaries.
6047
6048 2002-04-16  Alan Modra  <amodra@bigpond.net.au>
6049
6050         * elf32-m32r.c (m32r_elf_add_symbol_hook): Check the hash table
6051         type rather than just assuming entries are ELF.
6052         * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
6053         * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
6054         * elf64-sparc.c (sparc64_elf_add_symbol_hook): Likewise.
6055         * elf64-mmix.c (mmix_elf_add_symbol_hook): Use bfd_link_hash_entry
6056         rather than elf_link_hash_entry.
6057
6058 2002-04-15  Richard Henderson  <rth@redhat.com>
6059
6060         * elf32-mips.c (mips_elf32_object_p): Revert 0404 fragment: allow
6061         n32 binaries.
6062
6063 2002-04-15  Michael Snyder  <msnyder@redhat.com>
6064
6065         * opncls.c (bfd_close): Write contents if writeable.
6066         Minor formatting tidy-ups.
6067
6068 2002-04-15  Alan Modra  <amodra@bigpond.net.au>
6069
6070         * elf32-ppc.c (ppc_elf_add_symbol_hook): Check the hash table type.
6071
6072 2002-04-12  Michael Snyder  <msnyder@redhat.com>
6073
6074         * bfd-in.h (bfd_get_section_lma): New access macro.
6075         Minor white-space fix-up.
6076
6077 2002-04-12  Alan Modra  <amodra@bigpond.net.au>
6078
6079         * elf.c (prep_headers): Don't zero EI_OSABI, EI_ABIVERSION or
6080         header pad.
6081
6082 2002-04-09  DJ Delorie  <dj@redhat.com>
6083
6084         * elfarm-nabi.c (elf32_arm_howto_table): Fix ABS16 masks.
6085
6086 2002-04-09  Casper S. Hornstrup <chorns@users.sourceforge.net>
6087
6088         * coffcode.h (coff_read_word): New.
6089         (coff_compute_checksum): New.
6090         (coff_apply_checksum): New.
6091         (coff_write_object_contents): Call coff_apply_checksum () to
6092         apply checksum to PE image.
6093
6094 2002-04-08  Randolph Chung  <tausq@debian.org>
6095
6096         * elf32-hppa.c (hppa_unwind_entry_compare): Move to elf-hppa.h.
6097         (elf32_hppa_final_link): Split out sorting logic to..
6098         * elf-hppa.h (elf_hppa_sort_unwind): ..here.
6099         (elf_hppa_final_link): Call elf_hppa_sort_unwind.
6100
6101 2002-04-07  Andrew Cagney  <ac131313@redhat.com>
6102
6103         * configure.in: Add missing ``|'' to powerpc-*-aix4.[4-9]*
6104         pattern.
6105         * configure: Re-generate.
6106
6107 2002-04-07  Andrew Cagney  <ac131313@redhat.com>
6108
6109         * configure.in: Only define AIX_CORE_DUMPX_CORE when AIX version
6110         is greater or equal to 4.3.3.
6111         * configure: Regenerate.
6112         Fix PR gdb/344.
6113
6114 2002-04-05  Hans-Peter Nilsson  <hp@axis.com>
6115
6116         * elf32-cris.c (cris_elf_howto_table) <R_CRIS_16_PCREL,
6117         R_CRIS_32_PCREL>: Fix typo in name.
6118         (cris_elf_check_relocs): Always create .rela.got here when
6119         R_CRIS_16_GOTPLT or R_CRIS_32_GOTPLT is seen.
6120         (elf_cris_adjust_gotplt_to_got): Don't create .rela.got here;
6121         assume it's created.
6122
6123 2002-04-04  Daniel Jacobowitz  <drow@mvista.com>
6124
6125         * aout-adobe.c (aout_32_bfd_link_hash_table_free): Define.
6126         * aout-target.h (MY_bfd_link_hash_table_free): Conditionally
6127         define.
6128         * aout-tic30.c (MY_bfd_link_hash_table_free): Likewise.
6129         * bfd.c (bfd_link_hash_table_free): Define.
6130         * binary.c (binary_bfd_link_hash_table_free): Define.
6131         * bout.c (b_out_bfd_link_hash_table_free): Define.
6132         * coff-rs6000.c (rs6000coff_vec): Include
6133         _bfd_generic_link_hash_table_free.
6134         (pmac_xcoff_vec): Likewise.
6135         * coff64-rs6000.c (rs6000coff64_vec): Likewise.
6136         (aix5coff64_vec): Likewise.
6137         * coffcode.h (coff_bfd_link_hash_table_free): Conditionally define.
6138         * elf-m10300.c (elf32_mn10300_link_hash_table_free): New function.
6139         (bfd_elf32_bfd_link_hash_table_free): Define.
6140         * elf32-hppa.c (elf32_hppa_link_hash_table_free): New function.
6141         (bfd_elf32_bfd_link_hash_table_free): Define.
6142         * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Conditionally
6143         define.
6144         * i386msdos.c (msdos_bfd_link_hash_table_free): Define.
6145         * i386os9k.c (os9k_bfd_link_hash_table_free): Define.
6146         * ieee.c (ieee_bfd_link_hash_table_free): Define.
6147         * ihex.c (ihex_bfd_link_hash_table_free): Define.
6148         * libbfd-in.h (_bfd_nolink_bfd_link_hash_table_free): Define.
6149         (_bfd_generic_link_hash_table_free): Add prototype.
6150         * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Add prototype.
6151         * libecoff.h (_bfd_ecoff_bfd_link_hash_table_free): Define.
6152         * linker.c (_bfd_generic_link_hash_table_free): New function.
6153         * mmo.c (mmo_bfd_link_hash_table_free): Define.
6154         * nlm-target.h (nlm_bfd_link_hash_table_free): Define.
6155         * oasys.c (oasys_bfd_link_hash_table_free): Define.
6156         * ppcboot.c (ppcboot_bfd_link_hash_table_free): Define.
6157         * som.c (som_bfd_link_hash_table_free): Define.
6158         * srec.c (srec_bfd_link_hash_table_free): Define.
6159         * tekhex.c (tekhex_bfd_link_hash_table_free): Define.
6160         * versados.c (versados_bfd_link_hash_table_free): Define.
6161         * vms.c (vms_bfd_link_hash_table_free): New function.
6162         * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_free): New function.
6163
6164         * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_malloc
6165         instead of bfd_alloc.
6166         * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
6167         * coff-mcore.c (coff_mcore_link_hash_table_create): Likewise.
6168         * coff-ppc.c (ppc_coff_link_hash_table_create): Likewise.
6169         * cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
6170         * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
6171         * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
6172         * elf.c (_bfd_elf_link_hash_table_create): Likewise.
6173         * elf32-arm.h (elf32_arm_link_hash_table_create): Likewise.
6174         * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
6175         * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
6176         * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
6177         * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
6178         * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
6179         * elf32-sh.c (sh_elf_link_hash_table_create): Likewise.
6180         * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create): Likewise.
6181         * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
6182         * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
6183         * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
6184         * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create): Likewise.
6185         * elf64-x86-64.c (elf64_x86_64_link_hash_table_create): Likewise.
6186         * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
6187         * linker.c (_bfd_generic_link_hash_table_create): Likewise.
6188         * m68klinux.c (linux_link_hash_table_create): Likewise.
6189         * sparclinux.c (linux_link_hash_table_create): Likewise.
6190         * sunos.c (sunos_link_hash_table_create): Likewise.
6191         * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
6192
6193         * targets.c: Add _bfd_link_hash_table_free to xvec.
6194
6195         * bfd-in2.h: Regenerate.
6196         * libbfd.h: Regenerate.
6197         * libcoff.h: Regenerate.
6198
6199 2002-04-04  Alan Modra  <amodra@bigpond.net.au>
6200
6201         * dep-in.sed: Cope with absolute paths.
6202         * Makefile.am (dep.sed): Subst TOPDIR, and not INCDIR.
6203         Run "make dep-am".
6204         * Makefile.in: Regenerate.
6205         * coff-arm.c: Fix copyright date.
6206         * cpu-h8300.c: Likewise.
6207         * cpu-i370.c: Likewise.
6208         * cpu-s390.c: Likewise.
6209         * cpu-mips.c: Likewise.
6210         * po/SRC-POTFILES.in: Regenerate.
6211
6212 2002-04-04  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6213
6214         * Makefile.am: Add elfxx-mips.c to the known backends.
6215         (elf32-mips.lo): remove dependency to coff/external.h.
6216         * Makefile.in: Regenerate.
6217         * configure.in: Add elfxx-mips.lo to all vectors using elf32-mips.lo
6218         Remove elf32-mips.lo from 64 bit vectors. Update dependencies
6219         accordingly.
6220         * configure: Regenerate.
6221         * elf-bfd.h: Move all MIPS ELF specific prototypes to elfxx-mips.h.
6222         (irix_compat_t): IRIX compatibility level, moved from elf32-mips.c.
6223         (elf_backend_mips_irix_compat, elf_backend_mips_rtype_to_howto): New
6224         MIPS specific backend functions.
6225         * elf32-mips.c: Moved most code to elfxx-mips.c.
6226         (mips_elf_hi16_reloc): Rename from _bfd_mips_elf_hi16_reloc and make
6227         static.
6228         (mips_elf_lo16_reloc): Likewise, was _bfd_mips_elf_lo16_reloc.
6229         (mips_elf_got16_reloc): Likewise, was _bfd_mips_elf_got16_reloc.
6230         (mips_elf_gprel32_reloc): Likewise, was _bfd_mips_elf_gprel32_reloc.
6231         (mips_elf32_rtype_to_howto): Rename from mips_rtype_to_howto. Changed
6232         interface to allow selection of the right REL or RELA howto table.
6233         (mips_elf32_object_p): Rename from _bfd_mips_elf_object_p and made
6234         static. Let it refuse n32 objects.
6235         (elf32_mips_grok_prstatus): Rename from _bfd_elf32_mips_grok_prstatus.
6236         (elf32_mips_grok_psinfo): Rename from _bfd_elf32_mips_grok_psinfo.
6237         (elf32_mips_discard_info): Rename from _bfd_elf32_mips_discard_info.
6238         (elf32_mips_ignore_discarded_relocs): Rename from
6239         _bfd_elf32_mips_ignore_discarded_relocs.
6240         (elf32_mips_write_section): Rename from _bfd_elf32_mips_write_section.
6241         (elf32_mips_irix_compat): New function, replaces IRIX_COMPAT.
6242         (elf_mips_howto_table_rela): Remove.
6243         * elf64-mips.c: Moved most code to elfxx-mips.c.
6244         (bfd_elf64_bfd_reloc_type_lookup): Make static.
6245         (mips_elf64_rtype_to_howto): New function.
6246         (mips_elf64_object_p): Likewise.
6247         (elf64_mips_irix_compat): Likewise.
6248         * elfxx-mips.c: New file containing common code merged together from
6249         elf32-mips.c and elf64-mips.c.
6250         * elfxx-mips.h: New file containing MIPS specific prototypes from
6251         elf-bfd.h.
6252         * elfxx-target.h: Add handling for elf_backend_mips_irix_compat and
6253         elf_backend_mips_rtype_to_howto.
6254
6255 2002-04-04  Alan Modra  <amodra@bigpond.net.au>
6256
6257         * srec.c (MAXCHUNK, Chunk): Revise comments.
6258         (srec_write_record): Correct buffer size.
6259         (srec_write_header): Do without intermediate buffer.
6260         (srec_write_section): Validate Chunk.
6261         (srec_write_terminator): Pass NULL instead of dummy buffer.
6262         (srec_write_symbols): Pass file and symbol names directly to
6263         bfd_bwrite so sprintf won't overflow buffer.
6264
6265 2002-04-03  Jakub Jelinek  <jakub@redhat.com>
6266
6267         * elf32-sparc.c (elf32_sparc_relocate_section): Don't emit dynamic
6268         PC relative relocs against hidden symbols.
6269         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
6270
6271 2002-04-03  Alan Modra  <amodra@bigpond.net.au>
6272
6273         * elf.c (_bfd_elf_make_section_from_shdr): When setting section
6274         LMAs, loop over segments until p_vaddr and p_memsz specify an
6275         extent enclosing the section.
6276
6277 2002-04-02  Nick Clifton  <nickc@cambridge.redhat.com>
6278
6279         * ihex.c (ihex_write_object_contents): Do not allow records to
6280         cross a 64K boundary - wrap if necessary.
6281
6282 2002-04-01  Nathan Williams  <nathanw@wasabisystems.com>
6283
6284         * elf.c (elfcore_netbsd_get_lwpid): Fix off-by-one error
6285         which caused the returned LWP ID to always be 0.
6286
6287 2002-04-01  Richard Henderson  <rth@redhat.com>
6288
6289         * elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
6290         (elf32_sparc_relocate_section): Use it to figure out when to
6291         initialize .got entries.
6292         * elf64-sparc.c: Similarly.
6293
6294 2002-03-28  Alan Modra  <amodra@bigpond.net.au>
6295
6296         * linker.c (link_action): Ignore duplicate warning syms.
6297         (_bfd_generic_link_write_global_symbol): Follow warning symbol link.
6298         * elflink.h (elf_adjust_dynstr_offsets): Likewise.
6299         (elf_adjust_dynamic_symbol): Likewise.
6300         (elf_export_symbol): Likewise.
6301         (elf_link_find_version_dependencies): Likewise.
6302         (elf_link_assign_sym_version): Likewise.
6303         (elf_link_sec_merge_syms): Likewise.
6304         (elf_link_output_extsym): Likewise.
6305         (elf_gc_sweep_symbol): Likewise.
6306         (elf_gc_propagate_vtable_entries_used): Likewise.
6307         (elf_gc_smash_unused_vtentry_relocs): Likewise.
6308         (elf_gc_allocate_got_offsets): Likewise.
6309         (elf_collect_hash_codes): Likewise.
6310         * elflink.c (elf_link_renumber_hash_table_dynsyms): Likewise.
6311         * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
6312         (elf_hppa_remark_useless_dynamic_symbols): Likewise.
6313         * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
6314         * elf32-arm.h (elf32_arm_discard_copies): Likewise.
6315         * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Likewise.
6316         (elf_cris_discard_excess_dso_dynamics): Likewise.
6317         * elf32-hppa.c (clobber_millicode_symbols): Likewise.
6318         (mark_PIC_calls): Likewise.
6319         (allocate_plt_static): Likewise.
6320         (allocate_dynrelocs): Likewise.
6321         (readonly_dynrelocs): Likewise.
6322         * elf32-i386.c (allocate_dynrelocs): Likewise.
6323         (readonly_dynrelocs): Likewise.
6324         * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
6325         * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
6326         * elf32-mips.c (mips_elf_output_extsym): Likewise.
6327         (mips_elf_sort_hash_table_f): Likewise.
6328         (mips_elf_check_mips16_stubs): Likewise.
6329         * elf32-s390.c (allocate_dynrelocs): Likewise.
6330         (readonly_dynrelocs): Likewise.
6331         * elf32-sh.c (sh_elf_discard_copies): Likewise.
6332         * elf32-xstormy16.c (xstormy16_relax_plt_check): Likewise.
6333         (xstormy16_relax_plt_realloc): Likewise.
6334         * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
6335         (elf64_alpha_output_extsym): Likewise.
6336         * elf64-hppa.c (elf64_hppa_mark_exported_functions): Likewise.
6337         * elf64-mips.c (mips_elf64_sort_hash_table_f): Likewise.
6338         (mips_elf64_check_mips16_stubs): Likewise.
6339         (mips_elf64_output_extsym): Likewise.
6340         * elf64-ppc.c (func_desc_adjust): Likewise.
6341         (allocate_dynrelocs): Likewise.
6342         (readonly_dynrelocs): Likewise.
6343         * elf64-s390.c (allocate_dynrelocs): Likewise.
6344         (readonly_dynrelocs): Likewise.
6345         * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
6346         * elf64-x86-64.c (allocate_dynrelocs): Likewise.
6347         (readonly_dynrelocs): Likewise.
6348         * elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise.
6349         * aoutx.h (aout_link_write_other_symbol): Likewise.
6350         * cofflink.c (_bfd_coff_write_task_globals): Likewise.
6351         (_bfd_coff_write_global_sym): Likewise.
6352         * i386linux.c (linux_tally_symbols): Likewise.
6353         * m68klinux.c (linux_tally_symbols): Likewise.
6354         * sparclinux.c (linux_tally_symbols): Likewise.
6355         * pdp11.c (aout_link_write_other_symbol): Likewise.
6356         * sunos.c (sunos_scan_dynamic_symbol): Likewise.
6357         * xcofflink.c (xcoff_build_ldsyms): Likewise.
6358         (xcoff_write_global_symbol): Likewise.
6359
6360         * cofflink.c (_bfd_coff_final_link): Formatting.
6361         * cpu-mips.c (mips_compatible): Make static, prototype.
6362         * elf32-i386.c (elf_i386_check_relocs): Formatting.
6363         * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
6364         * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
6365         * elf64-mips.c (mips_elf64_sort_hash_table): Likewise.
6366         (mips_elf64_final_link): Likewise.
6367         * elflink.h (elf_link_find_version_dependencies): Remove duplicate
6368         prototype.
6369
6370 2002-03-27  Nick Clifton  <nickc@cambridge.redhat.com>
6371
6372         * coff-arm.c (SWAP_IN_RELOC_OFFSET): Define.
6373         (SWAP_OUT_RELOC_OFFSET): Define.
6374
6375 2002-03-27  Gregory Steuck <greg@nest.cx>
6376
6377         * elf.c (_bfd_elf_get_symtab_upper_bound): Leave space for
6378         terminating NULL if empty symbol table.
6379         (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
6380
6381 2002-03-26  H.J. Lu  (hjl@gnu.org)
6382
6383         * elflink.h (elf_link_input_bfd): Revert the last change since
6384         the gcc exception handling isn't fixed yet.
6385
6386 2002-03-26  H.J. Lu  (hjl@gnu.org)
6387
6388         * elflink.h (elf_link_input_bfd): Complain about relocations
6389         against local symbols in discarded sections.
6390
6391 2002-03-26  Alan Modra  <amodra@bigpond.net.au>
6392
6393         * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
6394
6395 2002-03-23  Alan Modra  <amodra@bigpond.net.au>
6396
6397         * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
6398         section file offset for !SEC_LOAD sections.
6399
6400 2002-03-21  Richard Earnshaw  <rearnsha@arm.com>
6401
6402         * elf32-arm.h (elf32_arm_final_link_relocate <case R_ARM_GOTOFF>,
6403         <case R_ARM_GOT>): Handle relocations to Thumb functions.
6404
6405 2002-03-21  Alan Modra  <amodra@bigpond.net.au>
6406
6407         * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Prototype.
6408         Whitespace changes.
6409         * archive.c: Update copyright date.
6410         * bfd-in2.h: Regenerate.
6411         * libbfd.h: Regenerate.
6412         * Makefile.am: Run "make dep-am"
6413         * Makefile.in: Regenerate.
6414         * po/SRC-POTFILES.in: Regenerate.
6415
6416 2002-03-20  Daniel Jacobowitz  <drow@mvista.com>
6417
6418         * dwarf2.c (struct funcinfo): Move up.
6419         (lookup_address_in_function_table): New argument function_ptr.
6420         Set it.
6421         (lookup_address_in_line_table): New argument function.  If function
6422         is non-NULL, use it to handle ``addr'' before the first line note of
6423         the function.
6424         (comp_unit_find_nearest_line): Update and swap calls to
6425         lookup_address_in_function_table and lookup_address_in_line_table.
6426         * syms.c (_bfd_stab_section_find_nearest_line): Use the first
6427         N_SLINE encountered if we see an N_FUN before any N_SLINE.
6428
6429 2002-03-20  Tom Rix  <trix@redhat.com>
6430
6431         * coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from
6432         _bfd_xcoff_generic_stat_arch_elt.  Fix format check.
6433         * coff64-rs6000.c :  Use _bfd_xcoff_stat_arch_elt.
6434
6435 2002-03-19  Tom Rix  <trix@redhat.com>
6436
6437         * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through all
6438         dynamic objects in archives.
6439
6440 2002-03-19  Hans-Peter Nilsson  <hp@bitrange.com>
6441
6442         * elflink.h (NAME(bfd_elf,record_link_assignment)): Don't set
6443         STT_NOTYPE symbols to STT_OBJECT.
6444
6445 2002-03-18  Jan Hubicka  <jh@suse.cz>
6446
6447         * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
6448
6449 2002-03-18  Tom Rix  <trix@redhat.com>
6450
6451         * aix5ppc.core.c : New file for AIX 5 64 bit core support.
6452         * bfd-in.h : Add bfd_xcoff_ar_archive_set_magic declaration.
6453         * coff-rs6000 (do_pad) : New function for archive padding.
6454         (do_copy) : New function for object file copying in archives.
6455         (do_shared_object_padding) : New function for padding shared
6456         objects to their text section alignment in archives.
6457         (bfd_xcoff_ar_achive_set_magic) : Stub.
6458         (xcoff_write_armap_big) : Use do_copy and do_pad.
6459         (xcoff_write_archive_contents_big) : Use do_shared_object_padding,
6460         do_copy and do_pad.
6461         * coff64-rs6000.c (xcoff64_write_ojbect_contents) : Use
6462         bfd_xcoff_magic_number.
6463         (xcoff64_bad_format_hook) : New function for _bfd_bad_format_hook
6464         fop.
6465         (xcoff_backend_data_r) : Use xcoff64_bad_format_hook.
6466         (bfd_xcoff_aix5_backend_data) : New Aix 5 backend data.
6467         (aix5coff64_vec) : New Aix 5 target aix5coff64-rs6000.
6468         * rs6000-core.c : Update copyright date.
6469         * xcofflink.c (bfd_xcoff_size_dynamic_sections): Check for NULL
6470         csectpp.
6471         * coffcode.h (coff_new_section_hook) : Use new accessor macros.
6472         (coff_set_arch_mach_hook) : Add Aix 5 U64_TOCMAGIC magic #.
6473         (coff_set_flags) : Use bfd_xcoff_magic_number.
6474         * libxcoff.h (bfd_xcoff_is_xcoff64): Add U64_TOCMAGIC.
6475         * configure.in : Add powerpc-*-aix5 and rs6000-*-aix5 support.
6476         * Makefile.am : Same.
6477         * config.bfd : Same.
6478         * targets.c : Same.
6479         * configure : Regnerate.
6480         * Makefile.in : Same.
6481         * bfd-in2.h : Same.
6482
6483 2002-03-18  Nick Clifton  <nickc@cambridge.redhat.com>
6484
6485         * po/fr.po: Updated version.
6486
6487 2002-03-18  Alan Modra  <amodra@bigpond.net.au>
6488
6489         * libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success.
6490         * libbfd.h: Regenerate.
6491         * archive.c (coff_write_armap): Pass on failures from
6492         bfd_write_bigendian_4byte_int.
6493
6494 2002-03-14  H.J. Lu <hjl@gnu.org>
6495
6496         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the BFD
6497         error to bfd_error_nonrepresentable_section for reinit_array
6498         section in DSO.
6499
6500 2002-03-14  Nick Clifton  <nickc@cambridge.redhat.com>
6501
6502         * coffcode.h (coff_slurp_symbol_table): When adding BSF_WEAK flag,
6503         OR it in rather than replacing previously selected flags.
6504
6505         * elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15.
6506         (TARGET_LITTLE_SYM): Set ar_max_namelen to 15.
6507
6508 2002-03-14  Alan Modra  <amodra@bigpond.net.au>
6509
6510         * cpu-mips.c (mips_compatible): New.  Don't check bits_per_word.
6511         (N): Use the above.
6512         * elflink.h (elf_bfd_final_link): Revert last change.  Instead,
6513         ensure reloc size matches before calling elf_link_input_bfd.
6514         Add an assert to check reloc size when counting output relocs.
6515
6516 2002-03-14  Nick Clifton  <nickc@cambridge.redhat.com>
6517
6518         * mmo.c (mmo_get_loc): Return NULL rather than false.
6519
6520 2002-03-13  Nick Clifton  <nickc@cambridge.redhat.com>
6521
6522         * po/fr.po: Updated version.
6523
6524 2002-03-13  Alan Modra  <amodra@bigpond.net.au>
6525
6526         * archures.c (bfd_default_compatible): Test bits_per_word.
6527         * cpu-i386.c (i386_compatible): Remove.  Replace occurrences with
6528         bfd_default_compatible.
6529         * cpu-i370.c (i370_compatible): Likewise.
6530         * cpu-sparc.c (sparc_compatible): Likewise.
6531         * cpu-h8300.c (compatible): Test in->arch == out->arch.
6532
6533         * elflink.h: Formatting fixes.
6534         (elf_link_output_extsym): Merge undefined and undef weak cases.
6535
6536         * elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd
6537         when word size of input matches output word size.
6538
6539 2002-03-12  Andreas Jaeger  <aj@suse.de>
6540
6541         * cpu-i386.c (i386_compatible): New.  Use it instead of
6542         bfd_default_compatible.
6543
6544 2002-03-07  H.J. Lu  (hjl@gnu.org)
6545
6546         * coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type
6547         as the type for bfd_reloc_val.
6548
6549 2002-03-05  John David Anglin  <dave@hiauly1.hia.nrc.ca>
6550
6551         * elf-hppa.h (elf_hppa_is_dynamic_loader_symbol): New function.
6552         (elf_hppa_relocate_section): Ignore undefined dynamic loader symbols.
6553         (elf_hppa_final_link_relocate): Correct relocations for indirect
6554         references to local data through the DLT.  Fix .opd creation for
6555         local symbols using R_PARISC_LTOFF_FPTR32 and R_PARISC_FPTR64
6556         relocations.  Use e_lsel selector for R_PARISC_DLTIND21L,
6557         R_PARISC_LTOFF_FPTR21L and R_PARISC_LTOFF_TP21L as per
6558         "Processor-Specific ELF for PA_RISC, Version 1.43" document.
6559         Similarly, use e_rsel for DLT and LTOFF 'R' relocations.
6560         * elf32-hppa.c (final_link_relocate): Revise relocation selectors
6561         as per "Processor-Specific ELF for PA_RISC, Version 1.43" document.
6562
6563 2002-03-05  Jakub Jelinek  <jakub@redhat.com>
6564
6565         * merge.c (_bfd_merge_sections): Don't segfault if there
6566         is nothing to merge due to GC.
6567
6568 2002-03-05  Alan Modra  <amodra@bigpond.net.au>
6569
6570         * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep
6571         symbols that have been forced local.
6572
6573         * elflink.h (elf_bfd_final_link): Call elf_link_output_extsym
6574         to output forced local syms for non-shared link.
6575         (elf_link_output_extsym): Tweak condition for calling backend
6576         adjust_dynamic_symbol so that previous behaviour is kept.
6577         Whitespace changes throughout file.
6578
6579 2002-03-04  H.J. Lu <hjl@gnu.org>
6580
6581         * elf.c (bfd_section_from_shdr): Handle special sections,
6582         .init_array, .fini_array and .preinit_array.
6583         (elf_fake_sections): Likewise.
6584
6585         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Create the
6586         DT entry only if the section is in output for .init_array,
6587         .fini_array and .preinit_array. Complain about .preinit_array
6588         section in DSO.
6589         (elf_bfd_final_link): Warn zero size for .init_array,
6590         .fini_array and .preinit_array sections.
6591
6592         * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Remove
6593         SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY.
6594         (elfNN_ia64_fake_sections): Remove .init_array, .fini_array and
6595         .preinit_array.
6596
6597 2002-03-04  Alan Modra  <amodra@bigpond.net.au>
6598
6599         * configure.in (WIN32LIBADD): Don't eval PICFLAG assignment.
6600         * configure: Regenerate.
6601
6602 2002-03-02  Tom Rix  <trix@redhat.com>
6603
6604         * coff64-rs6000.c (xcoff64_howto_table): Replace howto types with
6605         symbolic equiv.
6606         * coff-rs6000.c (xcoff_howto_table): Same.
6607
6608 2002-03-01  David Mosberger  <davidm@hpl.hp.com>
6609
6610         * elflink.h (size_dynamic_sections): If section named
6611         ".preinit_array" exists, create DT_PREINIT_ARRAY and
6612         DT_PREINIT_ARRAYSZ entries in dynamic table.  Analogously for
6613         ".init_array" and ".fini_array".
6614         (elf_bfd_final_link): Handle DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ,
6615         DT_FINI_ARRAYSZ, DT_PREINIT_ARRAY, DT_INIT_ARRAY, and
6616         DT_FINI_ARRAY.
6617
6618 2002-02-26  Andrew Macleod  <amacleod@cygnus.com>
6619
6620         * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local
6621         dynsyms.
6622
6623 2002-02-25  Alan Modra  <amodra@bigpond.net.au>
6624
6625         * elf64-hppa.h: Update copyright date.
6626
6627         * elf64-ppc.c (ppc64_elf_check_relocs): Warning fix.
6628         (ppc64_elf_relocate_section): Don't generate power4 style branch
6629         hints for *_BRTAKEN and *_BRNTAKEN relocs.
6630
6631 2002-02-22  Jakub Jelinek  <jakub@redhat.com>
6632
6633         * elf64-sh64.c (sh_elf64_relocate_section): Fix a typo from my
6634         last patch.
6635         * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
6636
6637 2002-02-21  Andreas Jaeger  <aj@suse.de>
6638
6639         * elf64-x86-64.c: Major rework that introduces all recent changes
6640         to the x86-64 backend.  Get a closer match to elf32-i386.
6641         (struct elf64_x86_64_dyn_relocs): Rename from
6642         elf64_x86_64_pcrel_relocs_copied, add additional fields.  Change
6643         all users.
6644         (struct elf64_x86_64_link_hash_table): Add short cuts to some
6645         sections.
6646         (link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc,
6647         remove casts, initialize new hash members.
6648         (create_got_section): New.
6649         (elf64_x86_64_create_dynamic_sections): New.
6650         (elf64_x86_64_copy_indirect_symbol): New.
6651         (elf64_x86_64_check_relocs): Don't allocate space for dynamic
6652         relocs, .got or .relgot here but do it in allocate_dynrelocs.
6653         Reference count possible .plt and .got entries.  Don't test input
6654         section SEC_READONLY here to try to avoid copy relocs, and keep
6655         dyn_relocs regardless of ELF_LINK_NON_GOT_REF.  Don't set
6656         DF_TEXTREL here.  Delay setting of variables until needed.  Cache
6657         pointer to "sreloc" section in elf_section_data. Tweak condition
6658         under which .got created.  Report files with bad relocation
6659         section names.
6660         (elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
6661         Reference count possible .plt entries.  Don't deallocate .got and
6662         .relgot space here.
6663         (elf64_x86_64_adjust_dynamic_symbol): Handle nocopyreloc.  Don't
6664         do copy reloc processing for weakdefs.  Remove redundant casts and
6665         aborts.  Delay setting of vars until needed.  Move creation of
6666         dynamic symbols and allocation of .plt and .rela.plt to
6667         allocate_dynrelocs.  Replace BFD_ASSERT with abort.
6668         (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
6669         (allocate_dynrelocs): New.
6670         (readonly_dynrelocs): New.
6671         (elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs.
6672         Allocate space for dyn relocs.  Replace BFD_ASSERT with abort.
6673         Zero out the dynamic allocated content space.
6674         (elf64_x86_64_discard_copies): Removed.
6675         (elf64_x86_64_relocate_section): Make use of dynamic section
6676         short-cuts.  Localise vars, and delay setting.  Better error
6677         reporting, replace BFD_ASSERT with abort.  Check
6678         ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the
6679         regular object file and tread the weak definition as the normal
6680         one.  Don't discard relocs for undefweak or undefined symbols and
6681         check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy
6682         relocs.
6683         (elf64_x86_64_finish_dynamic_symbol): Don't copy relocs for
6684         symbols that have been forced local.  Use same test to decide if
6685         we can use a relative reloc for got as relocate_section.  Expand
6686         SHN_UNDEF comment.  Move expressions out of function calls.
6687         Replace BFD_ASSERT with abort.
6688         (bfd_elf64_bfd_final_link): Removed.
6689         (elf_backend_copy_indirect_symbol): Define.
6690
6691 2002-02-20  Tom Rix  <trix@redhat.com>
6692
6693         * coff-rs6000.c (xcoff_howto_table): Add 16 bit R_BA.
6694         (_bfd_xcoff_reloc_type_lookup): Use it.
6695         * coff64-rs6000.c (xcoff64_howto_table): Same.
6696         (xcoff64_reloc_type_lookup): Same.
6697
6698 2002-02-20  Peter Schauer  <pes@regent.e-technik.tu-muenchen.de>
6699
6700         * osf-core.c (osf_core_vec):  OSF/1 (Digital Unix) core files are
6701         little endian.
6702
6703 2002-02-19  Martin Schwidefsky  <schwidefsky@de.ibm.com>
6704
6705         * archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31.
6706         (bfd_mach_s390_esame): Rename to bfd_mach_s390_64.
6707         * bfd-in2.h: Regenerate.
6708         * cpu-s390.c (arch_info_struct): Use renamed architecture defines.
6709         Replace architecture name "s390" with "s390:31-bit" and "s390:esame"
6710         with "s390:64-bit".
6711         * elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations.
6712         (elf_s390_reloc_type_lookup): Likewise.
6713         (elf_s390_check_relocs): Likewise.
6714         (elf_s390_gc_sweep_hook): Likewise.
6715         (elf_s390_relocate_section): Likewise.
6716         (elf_s390_object_p): Use renamed architecture define.
6717         * elf64-s390.c (elf_s390_object_p): Use renamed architecture define.
6718
6719 2002-02-19  Frank Ch. Eigler  <fche@redhat.com>
6720
6721         * syms.c (stt[]): Sorted.  Added .init/.fini -> "t" mapping.
6722
6723 2002-02-19  Jakub Jelinek  <jakub@redhat.com>
6724
6725         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
6726         absptr -> pcrel optimization for shared libs.
6727         Only create minimal .eh_frame_hdr if absptr FDE encoding in shared
6728         library cannot be converted to pcrel.
6729         (_bfd_elf_eh_frame_section_offset): Return -2 if making absptr
6730         relative.
6731         * elf32-i386.c (elf_i386_relocate_section): If
6732         _bfd_elf_section_offset returned -2, skip, but make sure the
6733         relocation is installed.
6734         * elf32-arm.h (elf32_arm_final_link_relocate): Likewise.
6735         * elf32-cris.c (cris_elf_relocate_section): Likewise.
6736         * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
6737         * elf32-i370.c (i370_elf_relocate_section): Likewise.
6738         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
6739         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
6740         * elf32-s390.c (elf_s390_relocate_section): Likewise.
6741         * elf32-sh.c (sh_elf_relocate_section): Likewise.
6742         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
6743         * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
6744         * elf64-s390.c (elf_s390_relocate_section): Likewise.
6745         * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
6746         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
6747         * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
6748         * elf64-alpha.c (elf64_alpha_relocate_section): Handle
6749         _bfd_elf_section_offset returning -2 the same way as -1.
6750         * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
6751         * elf32-mips.c (mips_elf_create_dynamic_relocation): Add FIXME
6752         and BFD_ASSERT.
6753         * elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise.
6754
6755 2002-02-18  Tom Rix  <trix@redhat.com>
6756
6757         * xcofflink.c (bfd_xcoff_link_gernate_rtinit): Add -brtl support.
6758         (bfd_xcoff_size_dynamic_sections): Same.
6759         * bfd-in.h (bfd_xcoff_link_generate_rtinit): Same.
6760         (bfd_xcoff_size_dynamic_sections): Same.
6761         * coff-rs6000.c (xcoff_generate_rtinit): Same.
6762         * coff-rs646000.c (xcoff64_generate_rtinit): Same.
6763         * libxcoff.h (struct xcoff_backend_data_rec): Same.
6764         * xcofflink.c (xcoff_build_ldsyms, xcoff_link_add_symbols): Clean.
6765         * bfd-in2.h: Regenerate.
6766
6767 2002-02-18  Alan Modra  <amodra@bigpond.net.au>
6768
6769         * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define.
6770         (struct ppc_link_hash_table): Add sfpr.
6771         (ppc64_elf_link_hash_table_create): Init it.
6772         (ppc64_elf_create_dynamic_sections): Split creation of .stub and
6773         .glink out to..
6774         (create_linkage_sections): ..here.  Make .sfpr too.
6775         (ppc64_elf_check_relocs): Call create_linkage_sections, and set
6776         dynobj early.
6777         (MIN_SAVE_FPR, MAX_SAVE_FPR): Define.
6778         (ppc64_elf_func_desc_adjust): Look for missing ._savef* and
6779         ._restf* functions, and create as needed.
6780         (func_desc_adjust): Only force_local for shared libs.
6781
6782 2002-02-18  David O'Brien  <obrien@FreeBSD.org>
6783
6784         * configure.in: Bump version number post 2.12 branching.
6785         * configure: Regenerate.
6786
6787 2002-02-17  Hans-Peter Nilsson  <hp@bitrange.com>
6788
6789         * mmo.c: Correct and improve comments.
6790         (mmo_write_chunk): Store trailing byte in bfd buffer; don't
6791         zero-pad.  Use input to fill up non-empty bfd buffer.
6792         (mmo_flush_chunk): New function.
6793         (mmo_write_loc_chunk): Add parameter last_vmap, all callers
6794         changed.  Don't emit location specifier if VMA is same as
6795         *LAST_VMAP after omitting leading zero contents.  Call
6796         mmo_flush_chunk before emitting location specifier.
6797         (mmo_write_loc_chunk_list): Call mmo_flush_chunk when finished
6798         with mmo_write_loc_chunk calls.
6799         (mmo_internal_write_section): Call mmo_flush_chunk after
6800         mmo_write_chunk.
6801         (mmo_write_symbols_and_terminator): Move :Main to first position
6802         in symbol array.  Add faked one if it does not exist if there are
6803         other symbols.  Don't add it if there are no symbols at all.  Move
6804         out test for value of :Main from symbol loop.  Rename table
6805         fakemain to maintable and variable mainsym to fakemain.
6806
6807 2002-02-15  Richard Henderson  <rth@redhat.com>
6808
6809         * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target
6810         section with no got matches any got.  Simplify error generaion.
6811
6812 2002-02-15  Alan Modra  <amodra@bigpond.net.au>
6813
6814         Support arbitrary length fill patterns.
6815         * linker.c (bfd_new_link_order): Zero all fields with bfd_zalloc.
6816         (_bfd_default_link_order): Remove bfd_fill_link_order code.
6817         Call default_data_link_order.
6818         (default_fill_link_order): Delete.
6819         (default_data_link_order): New function.
6820         * elf32-mips.c (_bfd_mips_elf_final_link): Replace occurrences
6821         of bfd_fill_link_order with bfd_data_link_order.
6822         * elf64-alpha.c (elf64_alpha_final_link): Likewise.
6823         * elf64-mips.c (mips_elf64_final_link): Likewise.
6824
6825         * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value.
6826         Correct value returned in "end" for "0x<non-hex>".
6827
6828 2002-02-14  Nick Clifton  <nickc@cambridge.redhat.com>
6829
6830         * cpu-arm.c (processors): Replace 'arch' field with 'mach'.
6831         (scan): Test against 'mach' field in info structure.
6832
6833 2002-02-14  Alan Modra  <amodra@bigpond.net.au>
6834
6835         * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
6836
6837 2002-02-14  Matt Fredette  <fredette@netbsd.org>
6838
6839         * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
6840         EF_M68000.
6841
6842 2002-02-13  Nick Clifton  <nickc@cambridge.redhat.com>
6843
6844         * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on
6845         non-zero physical addresses when adjusting the LMAs of new
6846         sections.
6847
6848 2002-02-12  John David Anglin  <dave@hiauly1.hia.nrc.ca>
6849
6850         * elf-hppa.h (elf_hppa_reloc_final_type): New function stripped
6851         from _bfd_elf_hppa_gen_reloc_type.
6852         (_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype.
6853         * elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype.
6854         * elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h.
6855         * elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype.
6856
6857 2002-02-12  Alexandre Oliva  <aoliva@redhat.com>
6858
6859         * elf-m10300.c (mn10300_elf_relax_section): Skip section before
6860         loading its contents if there's nothing to do in it.
6861
6862 2002-02-12  Alan Modra  <amodra@bigpond.net.au>
6863
6864         * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for crossing
6865         64k boundary.
6866
6867         * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Add dynamic
6868         DT_PPC64_OPD and DT_PPC64_OPDSZ tags.
6869         (ppc64_elf_finish_dynamic_sections): Set values for them.
6870
6871 2002-02-11  Michael Snyder  <msnyder@redhat.com>
6872
6873         * elf-bfd.h (elfcore_write_lwpstatus): Add prototype.
6874         * elf.c (elfcore_grok_pstatus): Add prototype.
6875         (elfcore_grok_lwpstatus): Add prototype.
6876         (elfcore_write_lwpstatus): New function.
6877         (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy.
6878
6879 2002-02-11  Alexandre Oliva  <aoliva@redhat.com>
6880
6881         * elf32-sh.c: Added missing prototypes.
6882         * elf32-sh64.c: Likewise.
6883         (sh_elf_align_loads): Mark unused args as such.
6884         * elf64-sh64.c: Added missing prototypes.
6885         (struct elf_sh64_link_hash_entry): Fix typo.
6886         (sh_elf64_relocate_section): Fix info argument passed to
6887         _bfd_elf_section_offset.
6888
6889 2002-02-11  Alan Modra  <amodra@bigpond.net.au>
6890
6891         * Makefile.am: "make dep-am".
6892         * Makefile.in: Regenerate.
6893         * aclocal.m4: Regenerate.
6894         * config.in: Regenerate.
6895         * configure: Regenerate.
6896
6897 2002-02-10  Daniel Jacobowitz  <drow@mvista.com>
6898
6899         * coff-rs6000.c (xcoff_generate_rtinit): Silence uninitialized
6900         variable warnings.
6901         * elf32-sh.c (sh_elf_relax_section): Silence signed/unsigned
6902         comparison warning.
6903         * trad-core.c (trad_unix_core_file_p): Silence pointer/integer
6904         cast warnings for the common case.
6905
6906 2002-02-10  Hans-Peter Nilsson  <hp@bitrange.com>
6907
6908         * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64
6909         vectors.
6910         (sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64
6911         vectors.
6912
6913 2002-02-09  Richard Henderson  <rth@redhat.com>
6914
6915         * elf64-alpha.c (elf64_alpha_howto): Add R_ALPHA_BRSGP.
6916         (elf64_alpha_reloc_map, elf64_alpha_check_relocs): Likewise.
6917         (elf64_alpha_relocate_section): Likewise.
6918         * reloc.c (BFD_RELOC_ALPHA_BRSGP): New.
6919         * bfd-in2.h, libbfd.h: Rebuild.
6920
6921 2002-02-09  Hans-Peter Nilsson  <hp@bitrange.com>
6922
6923         * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs): Check
6924         that base-plus-offset reloc accounting is consistent.
6925         (mmix_elf_relax_section): Keep base-plus-offset reloc accounting
6926         up to date for undefined symbols.
6927
6928 2002-02-08  Eric Christopher  <echristo@redhat.com>
6929
6930         From Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
6931
6932         * elf32-mips.c (_bfd_mips_elf_fake_sections): Don't create .rela
6933         sections for the O32 ABI.
6934
6935 2002-02-08  Chris Demetriou  <cgd@broadcom.com>
6936
6937         * elf32-arm.h: Fix formatting of _("...").
6938         * elf32-d10v.c: Likewise.
6939         * elf32-m68k.c: Likewise.
6940         * elf32-mips.c: Likewise.
6941
6942 2002-02-08  Ivan Guzvinec <ivang@opencores.org>
6943
6944         * coff-or32.c: Fix compile time warning messages.
6945
6946 2002-02-08  Alexandre Oliva  <aoliva@redhat.com>
6947
6948         Contribute sh64-elf.
6949         2002-01-23  Alexandre Oliva  <aoliva@redhat.com>
6950         * reloc.c (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
6951         R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
6952         R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
6953         R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
6954         R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
6955         R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
6956         R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
6957         R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, R_SH_GOTPLT10BY8,
6958         R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, R_SH_RELATIVE64):
6959         New relocs.
6960         * libbfd.h, bfd-in2.h: Rebuilt.
6961         * elf32-sh.c (sh_elf_howto_table): Define new relocs.
6962         (sh_reloc_map): Map them.
6963         (PLT_ENTRY_SIZE, elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
6964         elf_sh_plt_entry_be, elf_sh_plt_entry_le, elf_sh_pic_plt_entry_be,
6965         elf_sh_pic_plt_entry_le, elf_sh_plt0_entry, elf_sh_plt_entry,
6966         elf_sh_pic_plt_entry, elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
6967         elf_sh_plt0_gotplt_offset, elf_sh_plt_temp_offset,
6968         elf_sh_plt_symbol_offset, elf_sh_plt_reloc_offset,
6969         movi_shori_putval) [INCLUDE_SHMEDIA]: New.
6970         (elf_sh_link_hash_entry) [INCLUDE_SHMEDIA]: Add
6971         datalabel_got_offset.
6972         (sh_elf_link_hash_newfunc): Initialize it.
6973         (sh_elf_relocate_section): Augment the scope of
6974         seen_stt_datalabel.  Introduce GOTPLT support.  Extend GOTPC, PLT,
6975         GOT and GOTOFF handling to new SHmedia relocation types.  Support
6976         GOT_BIAS.
6977         (sh_elf_check_relocs): Likewise.
6978         (sh_elf_finish_dynamic_symbol) [TARGET_SHMEDIA]: Set up values in
6979         PLT entries using movi_shori_putval.  Support GOT_BIAS.
6980         (sh_elf_finish_dynamic_sections): Likewise.
6981         * elf32-sh64.c (shmedia_prepare_reloc): Do not add addend to
6982         relocation, it's now done by the caller.
6983         (GOT_BIAS): New.
6984         * elf64-sh64.c (GOT_BIAS, PLT_ENTRY_SIZE, elf_sh64_sizeof_plt,
6985         elf_sh64_plt_plt0_offset, elf_sh64_plt0_gotplt_offset,
6986         elf_sh64_plt_temp_offset, elf_sh64_plt_symbol_offset,
6987         elf_sh64_plt_reloc_offset, ELF_DYNAMIC_INTERPRETER,
6988         elf_sh64_pcrel_relocs_copied, elf_sh64_link_hash_entry,
6989         elf_sh64_link_hash_table, sh64_elf64_link_hash_traverse,
6990         sh64_elf64_hash_table): New.
6991         (sh_elf64_howto_table): Introduce new relocs.
6992         (sh_elf64_info_to_howto): Accept new PIC relocs.
6993         (sh_elf64_relocate_section): Augment the scope of
6994         seen_stt_datalabel.  Support new PIC relocs.
6995         (sh_elf64_check_relocs): Support new PIC relocs.
6996         (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le,
6997         elf_sh64_plt_entry_be, elf_sh64_plt_entry_le,
6998         elf_sh64_pic_plt_entry_be, elf_sh64_pic_plt_entry_le,
6999         elf_sh64_plt0_entry, elf_sh64_plt_entry, elf_sh64_pic_plt_entry,
7000         sh64_elf64_link_hash_newfunc, sh64_elf64_link_hash_table_create,
7001         movi_shori_putval, movi_3shori_putval,
7002         sh64_elf64_create_dynamic_sections,
7003         sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies,
7004         sh64_elf64_size_dynamic_sections,
7005         sh64_elf64_finish_dynamic_symbol,
7006         sh64_elf64_finish_dynamic_sections): New.
7007         (elf_backend_create_dynamic-sections,
7008         bfd_elf64_bfd_link_hash_table_create,
7009         elf_backend_adjust_dynamic_symbol,
7010         elf_backend_size_dynamic_sections,
7011         elf_backend_finish_dynamic_symbol,
7012         elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
7013         elf_backend_plt_readonly, elf_backend_want_plt_sym,
7014         elf_backend_got_header_size, elf_backend_plt_header_size):
7015         Define.
7016         2001-05-16  Alexandre Oliva  <aoliva@redhat.com>
7017         * elf32-sh.c: Renumbered and renamed some SH5 relocations to
7018         match official numbers and names; moved unmaching ones to the
7019         range 0xf2-0xff.
7020         * elf32-sh64.c, elf64-sh64.c: Likewise.
7021         2001-03-12  DJ Delorie  <dj@redhat.com>
7022         * elf32-sh.c (sh_elf_relax_section): Don't relax SHmedia
7023         sections.
7024         2001-03-12  DJ Delorie  <dj@redhat.com>
7025         * elf32-sh64.c (shmedia_prepare_reloc): Validate relocs that must
7026         be aligned.
7027         * elf64-sh64.c (sh_elf64_relocate_section): Ditto.
7028         2001-01-14  Hans-Peter Nilsson  <hpn@cygnus.com>
7029         * elf32-sh64.c (bfd_elf32_bfd_copy_private_section_data): Define.
7030         (sh64_elf_fake_sections): Set type to SHT_SH5_CR_SORTED for a
7031         .cranges section with SEC_SORT_ENTRIES set.
7032         (sh64_backend_section_from_shdr): Set SEC_SORT_ENTRIES on an
7033         incoming sorted .cranges section.
7034         (sh64_bfd_elf_copy_private_section_data): New.
7035         (sh64_elf_final_write_processing): Only sort .cranges and modify
7036         start address if called by linker.
7037         2001-01-08  Ben Elliston  <bje@redhat.com>
7038         * elf32-sh64.c (sh64_elf_final_write_processing): Activate
7039         Hans-Peter Nilsson's set bit 0 patch from       2001-01-06.
7040         * elf64-sh64.c (sh64_elf64_final_write_processing): Ditto.
7041         2001-01-06  Hans-Peter Nilsson  <hpn@cygnus.com>
7042         * elf64-sh64.c (sh_elf64_howto_table): No open brace at start of
7043         line.  Add comments before all entries.
7044         <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct and clarify describing
7045         comment.
7046         (sh_elf64_reloc): Correct head comment.
7047         (sh_elf64_relocate_section): Correct spacing.
7048         <relocating for a local symbol>: Do not honour STO_SH5_ISA32;
7049         instead call reloc_dangerous callback.
7050         <case R_SH_SHMEDIA_CODE>: New case.
7051         (sh_elf64_gc_mark_hook): Correct spacing.
7052         (sh_elf64_check_relocs): Ditto.
7053         * elf32-sh64.c (shmedia_prepare_reloc) <case R_SH_SHMEDIA_CODE>:
7054         New case.
7055         * elf32-sh.c: Correct #endif comments for #ifndef-wrapped
7056         functions.
7057         (sh_elf_howto_table) <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct,
7058         clarify describing comment.  Add comments before all entries.
7059         (sh_elf_relocate_section) <relocating for a local symbol>: Do not
7060         honour STO_SH5_ISA32; instead call reloc_dangerous callback.
7061         2001-01-06  Hans-Peter Nilsson  <hpn@cygnus.com>
7062         Sort .cranges section in final link.  Prepare to set bit 0 on
7063         entry address.
7064         * elf32-sh64.c (struct sh64_find_section_vma_data): New.
7065         (sh64_elf_link_output_symbol_hook): Fix typo in prototype.
7066         (sh64_elf_set_mach_from_flags): Set SEC_DEBUGGING on incoming
7067         .cranges section.
7068         (sh64_backend_section_from_shdr): New, to recognize
7069         SHT_SH5_CR_SORTED on incoming .cranges section.
7070         (elf_backend_section_from_shdr): Define.
7071         (sh64_elf_final_write_processing): Sort outgoing .cranges
7072         section.  (New, temporarily disabled:) Set bit 0 on entry address
7073         according to ISA type.
7074         (sh64_find_section_for_address): New.
7075         (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb,
7076         crange_bsearch_cmpl): Move here from opcodes/sh64-dis.c.
7077         (sh64_address_in_cranges): Move here from opcodes/sh64-dis.c.  Use
7078         bfd_malloc, not xmalloc.
7079         (sh64_get_contents_type): Move here from opcodes/sh64-dis.c.  Make
7080         global.
7081         * elf32-sh64.c (sh64_elf64_final_write_processing): New, (but
7082         temporarily disabled) setting bit 0 on entry address.
7083         (elf_backend_final_write_processing): Define.
7084         2001-01-05  Hans-Peter Nilsson  <hpn@cygnus.com>
7085         * elf32-sh.c (sh_elf_howto_table) <R_SH_PT_16>: Adjust fields to
7086         be a proper relocation for PTA and PTB rather than a marker.
7087         <R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
7088         R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
7089         R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
7090         R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
7091         R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL>:
7092         Zero src_mask.
7093         * elf64-sh64.c: Ditto.
7094         (sh_elf64_relocate_section) <case R_SH_PT_16>: New case.
7095         * elf32-sh64.c: Include opcodes/sh64-opc.h
7096         (shmedia_prepare_reloc): Take a bfd_link_info pointer as first
7097         argument.  Drop const qualifiers from "bfd *" and "bfd_byte *"
7098         parameters.  No unused parameters.  Caller changed.
7099         <case R_SH_PT_16>: New case.
7100         * Makefile.am (elf32-sh64.lo): Add dependency on sh64-opc.h.
7101         * Makefile.in: Regenerate.
7102         2000-12-30  Hans-Peter Nilsson  <hpn@cygnus.com>
7103         * elf64-sh64.c (sh64_elf64_fake_sections): Set SHF_SH5_ISA32 for
7104         all code sections.
7105         (sh_elf64_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
7106         (sh64_elf_merge_private_data): Ditto.
7107         * elf32-sh64.c (sh64_elf_fake_sections): Use sh64_elf_section_data
7108         to access stored section flags.
7109         (sh64_elf_final_write_processing): Return immediately unless
7110         called by linker.  Use sh64_elf_section_data (cranges) to get size
7111         of linker-generated cranges entries.
7112         (sh64_elf_copy_private_data): Add missing "return true".
7113         (sh64_elf_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
7114         (sh_elf64_merge_private_data): Ditto.
7115         2000-12-19  Hans-Peter Nilsson  <hpn@cygnus.com>
7116         * elf64-sh64.c (sh64_elf64_fake_sections): New, copy of
7117         elf64-sh64.c:sh64_elf_fake_sections.
7118         (elf_backend_fake_sections): Define as sh64_elf64_fake_sections.
7119         2000-12-18  Hans-Peter Nilsson  <hpn@cygnus.com>
7120         * elf32-sh64.c (sh64_elf_copy_private_data_internal): Delete.
7121         (sh64_elf_final_write_processing): New.
7122         (elf_backend_final_write_processing): Define.
7123         (sh64_elf_fake_sections): Get header flags from tdata field.
7124         (sh64_elf_copy_private_data): Do not call
7125         sh64_elf_copy_private_data_internal, just copy e_flags field.
7126         (sh64_elf_merge_private_data): Do not call
7127         sh64_elf_copy_private_data_internal.
7128         2000-12-12  Hans-Peter Nilsson  <hpn@cygnus.com>
7129         Remove EF_SH64_ABI64, let ELF size make difference.
7130         Remove SH64-specific BFD section flag.
7131         * elf32-sh64.c (sh64_elf_fake_sections): Recognize section as
7132         containing SHmedia through elf_section_data (asect)->tdata
7133         non-zero, not using a BFD section flag.
7134         (sh64_elf_set_mach_from_flags): Don't recognize EF_SH64_ABI64.
7135         (sh64_elf_merge_private_data): Similar.
7136         (elf_backend_section_flags): Don't define.
7137         (sh64_elf_backend_section_flags): Delete.
7138         * elf64-sh64.c (sh_elf64_set_mach_from_flags): Recognize EF_SH64,
7139         not EF_SH64_ABI64.
7140         (sh_elf64_merge_private_data): Similar.
7141         * section.c (Section flags definitions): Don't define
7142         SEC_SH_ISA_SHMEDIA.
7143         (bfd-in2.h): Regenerate.
7144         2000-12-09  Hans-Peter Nilsson  <hpn@cygnus.com>
7145         Make DataLabel references work with partial linking.
7146         * elf32-sh64.c: Fix formatting.
7147         (sh64_elf_link_output_symbol_hook): New.
7148         (elf_backend_link_output_symbol_hook): Define to
7149         sh64_elf_link_output_symbol_hook.
7150         (sh64_elf_add_symbol_hook): Make DataLabel symbol just global
7151         undefined if partial linking.  Adjust sanity check.
7152         * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): New.
7153         (elf_backend_link_output_symbol_hook): Define to
7154         sh64_elf64_link_output_symbol_hook.
7155         (sh64_elf64_add_symbol_hook): Make DataLabel symbol just global
7156         undefined if partial linking.  Adjust sanity check.
7157         2000-12-07  Hans-Peter Nilsson  <hpn@cygnus.com>
7158         Implement semantics for inter-file DataLabel references.
7159         * elf64-sh64.c (DATALABEL_SUFFIX): Define.
7160         (sh64_elf64_add_symbol_hook): New.
7161         (sh_elf64_relocate_section): If passing an indirect symbol with
7162         st_type STT_DATALABEL on the way to a symbol with st_other
7163         STO_SH5_ISA32, do not bitor 1 to the relocation.
7164         (elf_backend_add_symbol_hook): Define to
7165         sh64_elf64_add_symbol_hook.
7166         * elf64-sh32.c: Tweak comments.
7167         (DATALABEL_SUFFIX): Define.
7168         (sh64_elf_add_symbol_hook): New.
7169         (elf_backend_add_symbol_hook): Define to sh64_elf_add_symbol_hook.
7170         * elf32-sh.c (sh_elf_relocate_section): If passing an indirect
7171         symbol with st_type STT_DATALABEL on the way to a symbol with
7172         st_other STO_SH5_ISA32, do not bitor 1 to the relocation.
7173         2000-12-05  Hans-Peter Nilsson  <hpn@cygnus.com>
7174         Pass through STT_DATALABEL.
7175         * elf32-sh64.c (sh64_elf_get_symbol_type): New.
7176         (elf_backend_get_symbol_type): Define.
7177         * elf64-sh64.c (sh64_elf64_get_symbol_type): New.
7178         (elf_backend_get_symbol_type): Define.
7179         2000-11-30  Hans-Peter Nilsson  <hpn@cygnus.com>
7180         * elf32-sh64.c: Tweak comments.
7181         (sh64_elf_copy_private_data_internal): Add prototype.
7182         (bfd_elf32_bfd_set_private_flags): Define.
7183         (sh64_elf_copy_private_data_internal): Compare machine name, not
7184         textual BFD target name, to check whether to copy section flag
7185         SHF_SH5_ISA32.
7186         (sh64_elf_merge_private_data): Validize bfd_get_arch_size.
7187         Tweak section-contents-type-mismatch message.
7188         (shmedia_prepare_reloc): Add ATTRIBUTE_UNUSED markers.
7189         Validize reloc-types.
7190         * elf64-sh64.c: New file.
7191         * targets.c (bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec): Declare.
7192         * Makefile.am (BFD64_BACKENDS): Add elf64-sh64.lo.
7193         (BFD64_BACKENDS_CFILES): Add elf64-sh64.c.
7194         Regenerate dependencies.
7195         * Makefile.in: Regenerate.
7196         * config.bfd (sh64-*-elf*): Add bfd_elf64_sh64_vec and
7197         bfd_elf64_sh64l_vec.
7198         * configure.in: Handle bfd_elf64_sh64_vec and
7199         bfd_elf64_sh64l_vec.
7200         * configure: Regenerate.
7201         * po/POTFILES.in: Regenerate.
7202         * po/bfd.pot: Regenerate.
7203         2000-11-29  Hans-Peter Nilsson  <hpn@cygnus.com>
7204         * elf32-sh64.c (sh64_elf_set_mach_from_flags): Do not recognize
7205         anything else but EF_SH64 and EF_SH64_ABI64.
7206         (sh64_elf_merge_private_data): Emit error for anything else but
7207         EF_SH64 and EF_SH64_ABI64.
7208         * config.bfd: Remove bfd_elf32_shblin_vec and bfd_elf32_shlin_vec
7209         from targ_selvecs.
7210         * configure.in: Add cofflink.lo to bfd_elf32_sh64_vec and
7211         bfd_elf32_sh64l_vec as a temporary measure.
7212         * configure: Regenerate.
7213         2000-11-27  Hans-Peter Nilsson  <hpn@cygnus.com>
7214         * cpu-sh.c (arch_info_struct): Include sh5 item
7215         unconditionalized.
7216         * config.bfd (sh64-*-elf*): Do not set targ_cflags.
7217         Add targ_selvecs bfd_elf32_sh_vec, bfd_elf32_shl_vec,
7218         bfd_elf32_shblin_vec and bfd_elf32_shlin_vec.
7219         * elf32-sh64.c: Tweak comments.
7220         (sh64_elf_set_mach_from_flags): Recognize all machine flags that
7221         are proper subsets of SH64 as bfd_mach_sh5.  Add EF_SH64_ABI64.
7222         (sh64_elf_copy_private_data_internal): Wrap long line.
7223         (sh64_elf_merge_private_data): Rewrite to allow objects from
7224         SH64 subsets to be linked together.
7225         (INCLUDE_SHMEDIA): Define.
7226         * elf32-sh.c (sh_elf_relocate_section) <local symbol>:
7227         Parenthesize plus-expression inside or-expression.
7228         <global symbol>: Ditto.
7229         (sh_elf_set_mach_from_flags): Remove code refusing
7230         deleted EF_SH64_32BIT_ABI flag.
7231         2000-11-26  Hans-Peter Nilsson  <hpn@cygnus.com>
7232         * elf32-sh.c (sh_elf_howto_table) <R_SH_IMM_LOW16_PCREL,
7233         R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16_PCREL,
7234         R_SH_IMM_HI16_PCREL, R_SH_64_PCREL>: Set pcrel_offset to true.
7235         (sh_elf_relocate_section) <local symbol>: Or 1 in
7236         calculation of relocation if sym->st_other & STO_SH5_ISA32.
7237         <global symbol>: Ditto if h->other & STO_SH5_ISA32.
7238         * elf32-sh64.c (shmedia_prepare_reloc): Add rel->r_addend to
7239         relocation.
7240         2000-11-24  Hans-Peter Nilsson  <hpn@cygnus.com>
7241         * Makefile.am (BFD32_BACKENDS): Add elf32-sh64.lo.
7242         (BFD32_BACKENDS_CFILES): Add elf32-sh64.c.
7243         Regenerate dependencies.
7244         * Makefile.in: Regenerate.
7245         * archures.c: Add bfd_mach_sh5.
7246         * config.bfd: Map targ_cpu sh* to bfd_sh_arch.
7247         Handle sh64-*-elf*.  Set targ_cflags to -DINCLUDE_SHMEDIA.
7248         * configure.in: Handle bfd_elf32_sh64_vec and bfd_elf32_sh64l_vec.
7249         * configure: Regenerate.
7250         * reloc.c (BFD_RELOC_SH_SHMEDIA_CODE, BFD_RELOC_SH_IMMU5,
7251         BFD_RELOC_SH_IMMS6, BFD_RELOC_SH_IMMS6BY32, BFD_RELOC_SH_IMMU6,
7252         BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
7253         BFD_RELOC_SH_IMMS10BY4, BFD_RELOC_SH_IMMS10BY8,
7254         BFD_RELOC_SH_IMMS16, BFD_RELOC_SH_IMMU16, BFD_RELOC_SH_IMM_LOW16,
7255         BFD_RELOC_SH_IMM_LOW16_PCREL, BFD_RELOC_SH_IMM_MEDLOW16,
7256         BFD_RELOC_SH_IMM_MEDLOW16_PCREL, BFD_RELOC_SH_IMM_MEDHI16,
7257         BFD_RELOC_SH_IMM_MEDHI16_PCREL, BFD_RELOC_SH_IMM_HI16,
7258         BFD_RELOC_SH_IMM_HI16_PCREL, BFD_RELOC_SH_PT_16): New relocations.
7259         * cpu-sh.c [INCLUDE_SHMEDIA] (arch_info_struct): Define and link
7260         in item for SH5.
7261         * elf32-sh.c [INCLUDE_SHMEDIA] (sh_elf_howto_table): Add howto items
7262         for SHmedia relocs.
7263         [INCLUDE_SHMEDIA] (sh_rel): Add mappings for SHmedia relocs.
7264         [INCLUDE_SHMEDIA] (sh_elf_relocate_section) [default]: Call
7265         shmedia_prepare_reloc, goto final_link_relocate if it returns
7266         non-zero, else fail as before.
7267         (sh_elf_set_mach_from_flags): Provide function only if not defined
7268         as macro.  Do not recognize objects with EF_SH64_32BIT_ABI set.
7269         (sh_elf_set_private_flags): Provide function only if not defined
7270         as a macro.
7271         (sh_elf_copy_private_data): Similar.
7272         (sh_elf_merge_private_data): Similar.
7273         * section.c (SEC_SH_ISA_SHMEDIA): New.
7274         * targets.c (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec): Declare.
7275         * elf32-sh64.c: New file.
7276         * libbfd.h: Regenerate.
7277         * bfd-in2.h: Regenerate.
7278         * po/POTFILES.in: Regenerate.
7279         * po/bfd.pot: Regenerate.
7280         * bfd-in2.h: Regenerate.
7281         * libbfd.h: Regenerate.
7282
7283 2002-02-07  Daniel Jacobowitz  <drow@mvista.com>
7284
7285         * bfd-in.h: Update <stdbool.h> check to only see if <stdbool.h> has
7286         been included, not drag it in.
7287         * bfd-in2.h: Regenerate.
7288
7289 2002-02-06  H.J. Lu  (hjl@gnu.org)
7290
7291         * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
7292         the mach and ISA fields if necessary.
7293
7294 2002-02-06  Nick Clifton  <nickc@cambridge.redhat.com>
7295
7296         * coffcode.h (coff_set_arch_mach_hook): Select the highest known
7297         ARM architecture when an F_ARM_5 flag is detected, since we cannot
7298         be sure exactly which architecture this represents.
7299
7300 2002-02-05  Nick Clifton  <nickc@redhat.com>
7301
7302         * po/tr.po: Updated translation.
7303
7304 2002-02-05  Alan Modra  <amodra@bigpond.net.au>
7305
7306         From Jimi X <jimix@watson.ibm.com>
7307         * archures (bfd_mach_ppc64): Define.
7308         (bfd_powerpc_arch): Rename to bfd_powerpc_archs.
7309         (bfd_powerpc_arch): Define.
7310         * bfd-in2.h: Regenerate.
7311         * cpu-powerpc.c (arch_info_struct): Rename to bfd_powerpc_archs.
7312         (bfd_powerpc_arch): Move to tail of bfd_powerpc_archs.
7313         (bfd_powerpc_archs): Add default powerpc64 arch.
7314
7315 2002-02-05  Alan Modra  <amodra@bigpond.net.au>
7316
7317         * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Check for relocs
7318         against section syms in readonly sections.  Don't do the global
7319         sym check if we find one.
7320         * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
7321         * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
7322         * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
7323         * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
7324         (elf_s390_grok_prstatus): Add missing prototype.
7325
7326 2002-02-04  Hans-Peter Nilsson  <hp@bitrange.com>
7327
7328         * elf64-mmix.c (mmix_dump_bpo_gregs): New function.
7329         (mmix_elf_check_common_relocs) <case R_MMIX_BASE_PLUS_OFFSET>:
7330         Call bfd_get_section_by_name only once.  Initialize
7331         bpodata->n_bpo_relocs_this_section.
7332         (_bfd_mmix_prepare_linker_allocated_gregs): Remove comment
7333         referring to DSOs.
7334         (bpo_reloc_request_sort_fn): Don't use difference of values as
7335         return-value.
7336
7337 2002-02-02  David O'Brien  <obrien@FreeBSD>
7338
7339         * configure.in: Tweak the FreeBSD 4.x recognition more.  Only treat
7340         version 4.5 and later the same as 5-CURRENT.
7341         * configure: Re-generate.
7342
7343 2002-02-02  Jason Thorpe  <thorpej@wasabisystems.com>
7344
7345         * config.bfd (hppa*-*-netbsd*): New target.
7346
7347 2002-01-31  Philipp Thomas  <pthomas@suse.de>
7348
7349         * coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR
7350         to front of message. Unify messages with elf32-arm.h. Use
7351         commas where neccessary.
7352         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase
7353         ERROR in messages. Unify messages with coff-arm.c. Correct
7354         VFP/FPA error message.
7355         (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and
7356         APCS-32 for translation.
7357
7358 2002-02-01  Hans-Peter Nilsson  <hp@bitrange.com>
7359
7360         Perform on-demand global register allocation from
7361         R_MMIX_BASE_PLUS_OFFSET relocs.
7362         * elf64-mmix.c (struct bpo_reloc_section_info, struct
7363         bpo_reloc_request, struct bpo_greg_section_info): New.
7364         (mmix_elf_check_common_relocs, mmix_elf_gc_sweep_hook,
7365         bpo_reloc_request_sort_fn, mmix_elf_relax_section,
7366         _bfd_mmix_check_all_relocs,
7367         _bfd_mmix_prepare_linker_allocated_gregs,
7368         _bfd_mmix_finalize_linker_allocated_gregs): New functions.
7369         (elf_mmix_howto_table): Correct src_mask for most relocs.
7370         (mmix_elf_perform_relocation) <case R_MMIX_BASE_PLUS_OFFSET>: New
7371         case.
7372         (mmix_final_link_relocate) <case R_MMIX_BASE_PLUS_OFFSET>: New
7373         case.  Fix typo in comment.  New label do_mmix_reloc.
7374         (mmix_elf_check_relocs): Abuse bfd_link_info member base_file to
7375         store first object file with a base-plus-offset reloc.  Call
7376         mmix_elf_check_common_relocs for the part common with mmo.
7377         (mmix_elf_final_link): Write out linker-allocated register
7378         contents section.
7379         (elf_backend_gc_sweep_hook): Define.
7380         (bfd_elf64_bfd_relax_section): Define.
7381
7382         * mmo.c: Don't include <ctype.h>
7383         (mmo_init): Correct init-once logic.
7384
7385 2002-02-01  Tom Rix  <trix@redhat.com>
7386
7387         * config.bfd: Conditionally support <aiaff> for pre AIX 4.3.
7388
7389 2002-02-01  Alan Modra  <amodra@bigpond.net.au>
7390
7391         * Makefile.am: Run "make dep-am"
7392         * Makefile.in: Regenerate.
7393
7394 2002-01-31  David O'Brien  <obrien@FreeBSD>
7395
7396         * configure.in: Recognize the differences in core files from FreeBSD
7397         4.{0,1} and later versions of 4.x.  This treats 4.2+ the same as
7398         5-CURRENT.
7399         * configure: Regenerate.
7400
7401 2002-01-31  Ivan Guzvinec  <ivang@opencores.org>
7402
7403         * coff-or32.c: New file.
7404         * cpu-or32.c: New file.
7405         * elf32-or32.c: New file.
7406         * archures.c: Add support for or32.
7407         * targets.c: Add support for or32.
7408         * bfd-in2.h: Regenerate.
7409         * coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
7410         coff_write_object_contents): Add support for or32.
7411         * config.bfd: Add target.
7412         * configure.in: Add support for or32.
7413         * configure: Regenerate.
7414         * Makefile.am: Add support for or32.
7415         * Makefile.in: Regenerate.
7416         * po/SRC-POTFILES.in: Add or32 files.
7417         * po/bfd.pot: Regenerate.
7418
7419 2002-01-31  Nick Clifton  <nickc@cambridge.redhat.com>
7420             Don Lindsay  <lindsayd@cisco.com>
7421
7422         * elf32-mips.c (mips_elf_calculate_relocation): Replace 'return
7423         false' with a return of a bfd_reloc_ error code.
7424
7425 2002-01-31  Hans-Peter Nilsson  <hp@axis.com>
7426
7427         * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
7428         unexport unreferenced symbols when --export-dynamic.  Call
7429         _bfd_elf_strtab_delref when unexporting.
7430
7431 2002-01-30  Daniel Jacobowitz  <drow@mvista.com>
7432
7433         * bfd-in.h: Include <stdbool.h> if it is available.
7434         * bfd-in2.h: Regenerated.
7435
7436 2002-01-31  Alan Modra  <amodra@bigpond.net.au>
7437
7438         * elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
7439         not go via the plt.
7440
7441 2002-01-30  Nick Clifton  <nickc@cambridge.redhat.com>
7442
7443         * archures.c: Tidy up formatting of embedded comments.
7444         * bfd.c: Tidy up formatting of embedded comments.
7445         * bfd-in.h: Fix formatting of comments.
7446         * reloc.c: Tidy up formatting of ordinary & embedded comments.
7447         * section.c: Tidy up formatting of embedded comments.
7448         * syms.c: Tidy up formatting of embedded comments.
7449         * targets.c: Tidy up formatting of embedded comments.
7450
7451         * bfd-in2.h: Regenerate.
7452
7453 2002-01-30  Nick Clifton  <nickc@cambridge.redhat.com>
7454
7455         * vms-tir.c (cmd_name): New function.
7456         (tir_cmd_name): New function.
7457         (etir_sta, etir_sto, etir_opr, etir_stc): Use cmd_name().
7458         (tir_opr, tir_ctl, tir_cmd): use tir_cmd_name().
7459         Fix formatting.
7460
7461         * peXXigen.c (pe_print_idata): Rearrange message to aid in
7462         translation.
7463         (pe_print_pdata):  Rearrange message to aid in translation.
7464
7465         * libbfd.c (warn_deprecated): Rearrange error message to aid in
7466         translation.
7467
7468         * ihex.c (ihex_write_object_contents): Fix spelling typo.
7469
7470         * ieee.c (ieee_slurp_external_symbols): Remove spurious space.
7471
7472         * elf64-sparc.c (sparc64_elf_add_symbol_hook): Rearrange error
7473         message to aid in translation.
7474
7475         * elf64-mmix.c (mmix_final_link_relocate): Rearrange error message
7476         to aid in translation.
7477
7478         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix typo.
7479
7480 2002-01-30  Philipp Thomas  <pthomas@suse.de>
7481
7482         * coff-arm.c, elf32-elf.h: Unify messages.
7483
7484 2002-01-30  Nick Clifton <nickc@redhat.com>
7485
7486         * po/sv.po: Updated translation.
7487
7488 2002-01-30  Philipp Thomas  <pthomas@suse.de>
7489
7490         * dwarf2.c (read_abbrev): Use full section name in error message.
7491         (decode_line_info): Likewise.
7492
7493         * elf.c (_bfd_elf_symbol_from_bfd_symbol): Don't translate debugging
7494         message.
7495
7496 2002-01-30  Alan Modra  <amodra@bigpond.net.au>
7497
7498         * elf64-ppc.c (func_desc_adjust): Only provide missing function
7499         descriptor symbols for undefined function code syms.  Clear
7500         ELF_LINK_NON_ELF so that they can stay weak.
7501
7502 2002-01-29  Chris Demetriou  <cgd@broadcom.com>
7503             Mitch Lichtenberg  <mpl@broadcom.com>
7504
7505         * bfd-in.h (bfd_mips_elf32_create_embedded_relocs): New prototype.
7506         * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): New function
7507         to handle 32-bit ELF embedded reloc (ld --embedded-relocs)
7508         generation.
7509         * bfd-in2.h: Regenerate.
7510
7511 2002-01-29  Chris Demetriou  <cgd@broadcom.com>
7512
7513         * elf32-mips.c: Add additional comments about HI16 relocation
7514         processing.
7515         (_bfd_mips_elf_hi16_reloc): Don't subtract address here for
7516         pc-relative relocations.  (Reverts change made on 2001-10-31.)
7517         (_bfd_mips_elf_lo16_reloc): Subtract address of LO16 part here
7518         for pc-relative relocations.
7519         (mips_elf_calculate_relocation): Add a comment about a kludge
7520         in the R_MIPS_GNU_REL_HI16 handling.
7521         (_bfd_mips_elf_relocate_section): Implement that kludge;
7522         adjust pc-relative HI16 relocation for difference in HI16 and
7523         LO16 addresses, since it can't easily be done in
7524         mips_elf_calculate_relocation.
7525
7526 2002-01-29  Martin Schwidefsky  <schwidefsky@de.ibm.com>
7527
7528         * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32
7529         relocations with PC32 relocations for undefined or weak symbols.
7530         * elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise.
7531         * elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise.
7532
7533 2002-01-28  Jason Thorpe  <thorpej@wasabisystems.com>
7534
7535         * elfcore.h (elf_core_file_p): Improve comment for last change.
7536
7537 2002-01-27  Daniel Jacobowitz  <drow@mvista.com>
7538
7539         * configure: Regenerated.
7540
7541 2002-01-27  Jason Thorpe  <thorpej@wasabisystems.com>
7542
7543         * elfcore.h (elf_core_file_p): Set the machine architecture
7544         before processing the program headers.
7545
7546 2002-01-26  Hans-Peter Nilsson  <hp@bitrange.com>
7547
7548         * configure.in <64-bit configuration>: If using gcc, check and
7549         emit error for egcs-1.1.2.
7550         * configure: Regenerate.
7551
7552 2002-01-26  Egor Duda  <deo@logos-m.ru>
7553
7554         * elf.c (elfcore_grok_win32pstatus): Copy only as much information
7555         as possible to avoid stack corruption.
7556
7557 2002-01-26  Richard Henderson  <rth@redhat.com>
7558
7559         * elf64-alpha.c (elf64_alpha_check_relocs): Don't set reltext
7560         for non-allocated sections.
7561
7562 2002-01-25  Mark Kettenis  <kettenis@gnu.org>
7563
7564         * elf.c (elfcore_write_prstatus): Make sure we pass the address of
7565         prstat.pr_reg even if it is a struct.
7566
7567 2002-01-25  Steve Ellcey <sje@cup.hp.com>
7568
7569         * elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
7570
7571 2002-01-25  Philipp Thomas  <pthomas@suse.de>
7572
7573         * coffgen.c (coff_print_symbol): Don't mark info message
7574         for translation.
7575
7576 2002-01-25  Nick Clifton <nickc@redhat.com>
7577
7578         * po/fr.po: Updated translation.
7579         * po/es.po: Updated translation.
7580
7581 2002-01-25  Philipp Thomas  <pthomas@suse.de>
7582
7583         * coff-alpha.c (alpha_relocate_section): Unify warning message
7584         for GP relative relocations without GP defined.
7585         * coff-mips.c (mips_relocate_section): Likewise.
7586
7587 2002-01-25  Alan Modra  <amodra@bigpond.net.au>
7588
7589         * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
7590         unsigned overflow when new_offset < old_offset.
7591
7592 2002-01-24  Philipp Thomas  <pthomas@suse.de>
7593
7594         * bfd.c (_bfd_abort): Fix typo.
7595
7596 2002-01-23  Richard Henderson  <rth@redhat.com>
7597
7598         * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
7599         plt entries for undefweak symbols.
7600
7601 2002-01-23  Steve Ellcey <sje@cup.hp.com>
7602
7603         * targets.c (bfd_elf32_ia64_hpux_big_vec): Add to DEFAULT_VECTOR.
7604         (bfd_elf64_ia64_hpux_big_vec): Ditto.
7605         (bfd_elf32_h8300_vec): Ditto.
7606
7607 2002-01-23  Alan Modra  <amodra@bigpond.net.au>
7608
7609         * elf64-ppc.c: Remove stale part of ABI comment.
7610         (NO_OPD_RELOCS): Define.
7611         (ppc64_elf_check_relocs): Use it.
7612         (ppc64_elf_relocate_section): Here too.
7613         (build_one_stub): Don't point function syms at the stub.  Instead,
7614         hijack plt.offset.
7615         (ppc64_elf_relocate_section): Check whether REL24 relocs should
7616         really go to the stub.  Make all dynamic relocs in opd against
7617         locals.
7618         (ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
7619         plt.offset.
7620
7621 2002-01-22  Richard Henderson  <rth@redhat.com>
7622
7623         * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp.
7624
7625 2002-01-22  Alan Modra  <amodra@bigpond.net.au>
7626
7627         * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
7628         TOC_BASE_OFF adjustment.
7629
7630         * Makefile.am: Run "make dep-am".
7631         * Makefile.in: Regenerate.
7632         * po/SRC-POTFILES.in: Regenerate.
7633
7634 2002-01-22  John David Anglin  <dave@hiauly1.hia.nrc.ca>
7635
7636         * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
7637         host defines.
7638
7639 2002-01-21  Hans-Peter Nilsson  <hp@axis.com>
7640
7641         * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
7642         Check for and emit error if sgot is NULL at this point.
7643
7644 2002-01-21  Jason Thorpe  <thorpej@wasabisystems.com>
7645
7646         * config.bfd (ia64*-*-netbsd*): New target.
7647
7648 2002-01-21  Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
7649
7650         * som.c (som_write_space_strings): Comment typo fix.
7651
7652 2002-01-21  Alan Modra  <amodra@bigpond.net.au>
7653
7654         * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
7655         is_func_descriptor fields.
7656         (link_hash_newfunc): Init them.
7657         (ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
7658         dot are candidates for plt entries.  When processing .opd relocs,
7659         set function descriptor strings to point inside function code
7660         string, and set new ppc_link_hash_entry fields.
7661         (ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
7662         (ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
7663         function descriptors.  It's now done in..
7664         (func_desc_adjust): New.
7665         (ppc64_elf_func_desc_adjust): New.
7666         (define elf_backend_always_size_sections): Define.
7667         (ppc64_elf_hide_symbol): New.
7668         (define elf_backend_hide_symbol): Define.
7669         (allocate_dynrelocs): Remove code looking up function descriptors
7670         as that has been done earlier.
7671         (ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
7672         table.
7673         (ppc64_elf_finish_dynamic_symbol): Likewise.  Remove code looking
7674         up function descriptor.
7675         (build_one_stub): Look up the function code sym.  Check for
7676         invalid plt offsets.
7677         (ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
7678         Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
7679
7680         * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
7681         boolean param.
7682         (_bfd_elf_link_hash_hide_symbol): Likewise.
7683         * elflink.h (elf_link_add_object_symbols): Adjust call to
7684         elf_backend_hide_symbol.
7685         (elf_fix_symbol_flags): Likewise.
7686         (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
7687         than bfd_alloc.
7688         * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
7689         Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
7690         * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
7691         (clobber_millicode_symbols): Adjust to suit new hide_symbol.
7692         * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
7693         and adjust to suit.
7694         * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
7695         _bfd_elf_link_hash_hide_symbol rather than duplicating code.
7696         * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
7697
7698 2002-01-18  Alan Modra  <amodra@bigpond.net.au>
7699
7700         * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
7701         dynamic function descriptor symbol, not the associated function
7702         symbol.
7703
7704 2002-01-17  Eric Christopher  <echristo@redhat.com>
7705
7706         * elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
7707
7708 2002-01-17  Nick Clifton  <nickc@cambridge.redhat.com>
7709
7710         * po/bfd.pot: Regenerate.
7711         * po/fr.po: Regenerate.
7712
7713 2002-01-17  Alan Modra  <amodra@bigpond.net.au>
7714
7715         * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
7716         Remove "Elf_Internal_Shdr *" param.
7717         (_bfd_mips_elf_section_from_bfd_section): Ditto.
7718         * elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
7719         * elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
7720         * elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
7721         * elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
7722         * elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
7723         * elf.c (_bfd_elf_section_from_bfd_section): Allow backend
7724         function to override special sections.  Remove hdr arg from
7725         backend call, and don't loop.
7726
7727 2002-01-16  Eric Christopher  <echristo@redhat.com>
7728
7729         * elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
7730         on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
7731         relocations requiring gp0 and gp.
7732
7733 2002-01-16  Richard Earnshaw  <rearnsha@arm.com>
7734
7735         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
7736         EF_ARM_VFP_FLOAT.
7737         (elf32_arm_print_private_bfd_data): Likewise.
7738
7739 2002-01-16  Nick Clifton  <nickc@cambridge.redhat.com>
7740
7741         * po/tr.po: Import new version.
7742
7743 2002-01-16  Alan Modra  <amodra@bigpond.net.au>
7744
7745         * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
7746         (ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
7747         (ORI_R0_R0_0): Correct.
7748
7749 2002-01-16  Alan Modra  <amodra@bigpond.net.au>
7750
7751         * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
7752         when plt_not_loaded.
7753         * elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
7754         clear .plt SEC_CODE here.  Create .stub and correct .glink flags.
7755         (PLT_INITIAL_ENTRY_SIZE): Set to 24.
7756         (ppc64_elf_glink_code): Delete.
7757         (PPC64_ELF_GLINK_SIZE): Delete.
7758         (ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
7759         BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
7760         ORI_R0_R0_0): Define.
7761         (PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
7762         (struct ppc_link_hash_table): Add sstub and plt_overflow.
7763         (ppc64_elf_link_hash_table_create): Init them.
7764         (ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
7765         Don't copy to shared lib.
7766         (ppc64_elf_check_relocs): Call bfd_set_error on errors.
7767         (ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
7768         (allocate_dynrelocs <plt>): Don't change function sym here.  Make
7769         room for .stub and .glink code.
7770         (ppc64_elf_size_dynamic_sections): Handle .stub.  Make entry for
7771         DT_PPC64_GLINK.
7772         (ppc64_elf_final_link): Rename to ppc64_elf_set_toc.  Don't call
7773         bfd_elf64_bfd_final_link.
7774         (bfd_elf64_bfd_final_link): Don't define.
7775         (ppc64_elf_size_stubs): New.
7776         (build_plt_stub): New.
7777         (build_one_stub): New.
7778         (ppc64_elf_build_stubs): New.
7779         (ppc64_elf_relocate_section <toc relocs>): Remove assert.
7780         (ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
7781         (ppc64_elf_finish_dynamic_symbol): Don't build stubs here.  Set
7782         DT_PPC64_GLINK entry.  Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
7783         case output sections not separate.  Adjust DT_RELASZ to not
7784         include plt relocs.  Set reserved got entry.  Set got and plt
7785         entry size.
7786         (elf_backend_got_header_size): Set to 8.
7787         * elf64-ppc.h: New file.
7788
7789 2002-01-16  Alan Modra  <amodra@bigpond.net.au>
7790
7791         * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
7792         sections, use bfd_section_list_remove.
7793         * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
7794         * elflink.h (elf_link_add_object_symbols): When removing all
7795         sections, use bfd_section_list_clear.
7796
7797 2002-01-15  Nick Clifton  <nickc@cambridge.redhat.com>
7798
7799         * po/sv.po: New file: Swedish translation.
7800         * configure.in (ALL_LINGUAS): Add sv.
7801         * configure: Regenerate.
7802
7803 2002-01-15  Jakub Jelinek  <jakub@redhat.com>
7804
7805         * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
7806         * elf.c (merge_sections_remove_hook): New function.
7807         (_bfd_elf_merge_sections): Pass it as 3rd argument to
7808         _bfd_merge_sections.
7809         * libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
7810         * libbfd.h: Rebuilt.
7811         * merge.c (_bfd_merge_sections): Add remove_hook argument.
7812         Call remove_hook if a SEC_EXCLUDE section is encountered.
7813
7814 2002-01-15  Nick Clifton  <nickc@cambridge.redhat.com>
7815
7816         * elf32-xstormy16.c (xstormy16_reloc_map): Add new field 'table'.
7817         (xstormy16_reloc_map): Initialise new field with correct howto
7818         table.
7819         (xstormy16_reloc_type_lookup): Use 'table' field to locate correct
7820         howto entry.
7821
7822 2002-01-10  Michael Snyder  <msnyder@redhat.com>
7823
7824         * elf.c (elfcore_write_prstatus): Use long instead of pid_t;
7825         (elfcore_write_pstatus): Use long instead of pid_t;
7826         * elf-bfd.h: Change prototypes to use long instead of pid_t;
7827
7828 2002-01-09  Jason Thorpe  <thorpej@wasabisystems.com>
7829
7830         * elf.c: Update copyright years.
7831         (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
7832         and NT_NETBSDCORE_FIRSTMACH.  Improve a comment.
7833
7834 2002-01-08  Michael Snyder  <msnyder@redhat.com>
7835
7836         Add capability to write corefile note sections, for gdb.
7837         * elf.c (elfcore_write_note): New function.
7838         (elfcore_write_prpsinfo): New function.
7839         (elfcore_write_prstatus): New function.
7840         (elfcore_write_pstatus): New function.
7841         (elfcore_write_prfpreg): New function.
7842         (elfcore_write_prxfpreg): New function.
7843         * elf-bfd.h: Add prototypes for above functions.
7844
7845 2002-01-08  Alexandre Oliva  <aoliva@redhat.com>
7846
7847         * elf.c (elf_fake_sections): Propagate errors from
7848         elf_backend_fake_section.
7849
7850 2002-01-07  Jason Thorpe  <thorpej@wasabisystems.com>
7851
7852         * Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
7853         (BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
7854         (elf32-sh-nbsd.lo): New rule.
7855         * Makefile.in: Regenerate.
7856         * config.bfd (sh*le-*-netbsdelf*): New target.
7857         (sh*-*-netbsdelf*): New target.
7858         * configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
7859         (bfd_elf32_shnbsd_vec): New vector.
7860         (bfd_elf32_shlnbsd_vec): New vector.
7861         * configure: Regenerate.
7862         * elf32-sh-nbsd.c: New file.
7863         * targets.c: Update copyright years.
7864         (_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
7865         bfd_elf32_shnbsd_vec.
7866
7867 2002-01-07  Aldy Hernandez  <aldyh@redhat.com>
7868
7869         * coff-rs6000.c (READ20): Use bfd_scan_vma.
7870
7871 2002-01-07  Geoffrey Keating  <geoffk@redhat.com>
7872
7873         * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
7874         of a symbol in a section that will be deleted.
7875
7876 2002-01-07  Nick Clifton  <nickc@cambridge.redhat.com>
7877
7878         * po/es.po: New file: Spanish translation.
7879         * configure.in (ALL_LINGUAS): Add es.
7880         * configure: Regenerate.
7881
7882 2002-01-06  Steve Ellcey  <sje@cup.hp.com>
7883
7884         * elfxx-ia64.c (is_unwind_section_name): Add target vector as
7885         argument so we can handle HP-UX specially.
7886         (elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
7887         (elfNN_hpux_backend_section_from_bfd_section): New for support
7888         of SHN_IA_64_ANSI_COMMON.
7889         (elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
7890         (is_unwind_section_name): Add special HP-UX support.
7891         (elfNN_ia64_section_from_shdr): Add support for more sections.
7892         (elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
7893         add support for more sections.
7894         (elfNN_ia64_additional_program_headers): Modify
7895         is_unwind_section_name call.
7896         (elfNN_ia64_modify_segment_map): Remove assumption that there is
7897         only one unwind section in segment.
7898
7899 2002-01-06  Alan Modra  <amodra@bigpond.net.au>
7900
7901         * syms.c (_bfd_generic_make_empty_symbol): New function.
7902         * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
7903         _bfd_generic_make_empty_symbol.
7904         * libbfd.h: Regenerate.
7905         * bfd-in2.h: Regenerate.
7906         * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
7907         (hppabsd_core_get_symtab_upper_bound): Don't define.
7908         (hppabsd_core_get_symtab): Likewise.
7909         (hppabsd_core_print_symbol): Likewise.
7910         (hppabsd_core_get_symbol_info): Likewise.
7911         (hppabsd_core_bfd_is_local_label_name): Likewise.
7912         (hppabsd_core_get_lineno): Likewise.
7913         (hppabsd_core_find_nearest_line): Likewise.
7914         (hppabsd_core_bfd_make_debug_symbol): Likewise.
7915         (hppabsd_core_read_minisymbols): Likewise.
7916         (hppabsd_core_minisymbol_to_symbol): Likewise.
7917         (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
7918         Formatting fixes.
7919         * hpux-core.c: Similarly.
7920         * irix-core.c: Similarly.
7921         * osf-core.c: Similarly.
7922         * sco5-core.c: Similarly.
7923         * binary.c (binary_make_empty_symbol): Remove function, define as
7924         _bfd_generic_make_empty_symbol.
7925         * ihex.c (ihex_make_empty_symbol): Likewise.
7926         * mmo.c (mmo_make_empty_symbol): Likewise.
7927         * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
7928         * srec.c (srec_make_empty_symbol): Likewise.
7929         * versados.c (versados_make_empty_symbol): Likewise.
7930         * vms.c (_bfd_vms_make_empty_symbol): Remove.
7931         (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
7932         * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
7933         rather than _bfd_vms_make_empty_symbol.
7934         * vms-misc.c (new_symbol): Likewise.
7935
7936 2002-01-05  Alan Modra  <amodra@bigpond.net.au>
7937
7938         * section.c (bfd_section_init): Remove unnecessary initialisations.
7939         (bfd_section_list_clear): New function.
7940         (bfd_section_list_remove, bfd_section_list_insert): New macros.
7941         (_bfd_strip_section_from_output): Use them.
7942         * coffcode.h (coff_set_alignment_hook): Likewise.
7943         * elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
7944         * elf64-mips.c (mips_elf64_final_link): Likewise.
7945         * elf64-mmix.c (mmix_elf_final_link): Likewise.
7946         * sunos.c (sunos_add_dynamic_symbols): Likewise.
7947         * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
7948         * bfd-in2.h: Regenerate.
7949
7950         * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
7951         rather than doing our own section handling.  Clean up after errors
7952         with bfd_release and bfd_section_list_clear.  Handle unexpected
7953         flags.
7954         * aoutf1.h (sunos4_core_file_p): Likewise.
7955         * aix386-core.c (aix386_core_file_p): Likewise.
7956         * cisco-core.c (cisco_core_file_validate): Likewise.
7957         * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
7958         * trad-core.c (trad_unix_core_file_p): Likewise.
7959
7960         * hppabsd-core.c (hppabsd_core_core_file_p):  Clean up after errors
7961         with bfd_release and bfd_section_list_clear.
7962         * hpux-core.c (hpux_core_core_file_p): Likewise.
7963         * irix-core.c (irix_core_core_file_p): Likewise.
7964         * lynx-core.c (lynx_core_file_p): Likewise.
7965         * osf-core.c (osf_core_core_file_p): Likewise.
7966         * rs6000-core.c (rs6000coff_core_p): Likewise.
7967         * sco5-core.c (sco5_core_file_p): Likewise.
7968
7969         * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
7970         sign extension adjustments without conditionals.
7971
7972 2002-01-04  Jakub Jelinek  <jakub@redhat.com>
7973
7974         * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
7975         CIE at .eh_frame start is removed due to no FDEs referencing it.
7976
7977 2002-01-04  Jason Thorpe  <thorpej@wasabisystems.com>
7978
7979         * config.bfd (x86_64-*-netbsd*): New target.
7980         * configure.in (x86_64-*-netbsd*): Set COREFILE
7981         to netbsd-core.lo.
7982         * configure: Regenerated.
7983
7984 2002-01-03  Tom Rix  <trix@redhat.com>
7985
7986         * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
7987         for recent bfd_make_section_anyway change.
7988
7989 2002-01-03  Nick Clifton  <nickc@cambridge.redhat.com>
7990
7991         * elf32-arm.h (elf32_arm_final_link_relocate): Handle
7992         R_ARM_THM_PC11 reloc.
7993
7994 2002-01-02  Nick Clifton  <nickc@cambridge.redhat.com>
7995
7996         * configure.in (LINGUAS): Add ja.
7997         * configure: Regenerate.
7998         * po/ja.po: Import from translation project's web site.
7999
8000 2002-01-02  Nick Clifton  <nickc@cambridge.redhat.com>
8001
8002         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
8003         messages to ease translation into other languages.
8004
8005 For older changes see ChangeLog-0001
8006 \f
8007 Local Variables:
8008 mode: change-log
8009 left-margin: 8
8010 fill-column: 74
8011 version-control: never
8012 End: