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