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