Add support for msp430x21xx variants
[binutils.git] / bfd / ChangeLog
blob9fd5c3b16bb57d0b7b53e6f095dea87e31961710
1 2005-08-08  Eric Dönges <Eric.Doenges@betty-tv.com>
3         * archures.c (bfd_mach_msp21): New MSP430 machine number.
4         * bfd-in2.h: Regenerate.
5         * cpu-msp430.c (arch_info_struct): Add support for msp430x21xx
6         variants.
8 2005-08-07  Nick Clifton  <nickc@redhat.com>
9             Paul Brook  <paul@codesourcery.com>
11         PR 1147
12         * elf32-arm.c (bfd_elf32_close_and_cleanup): Define.
13         (elf32_arm_close_and_cleanup): New function - walk over the
14         sections in the bfd that is being closed removing them from the
15         list of recorded sections.
16         (unrecord_section_via_map_over_sections): New helper function.
17         (record_section_with_arm_elf_section_data): Call bfd_malloc
18         instead of bfd_alloc.  Remove unneeded abfd parameter.
19         (elf32_arm_new_section_hook): Do not pass bfd to
20         record_section_with_arm_elf_section_data.
22         * elfxx-target.h (bfd_elfNN_close_and_cleanup): Only define if not
23         already defined by the target.
25 2005-08-05  Fred Fish  <fnf@specifix.com>
27         * dwarf2.c (read_rangelist): Use addr_size instead of offset_size
28         to determine how many bytes to read from each rangelist entry.
30 2005-08-05  H.J. Lu  <hongjiu.lu@intel.com>
32         * bfd.c (bfd_hide_symbol): New.
33         * bfd-in2.h: Regenerated.
35 2005-08-04  H.J. Lu  <hongjiu.lu@intel.com>
37         * elf64-x86-64.c (elf64_x86_64_merge_symbol): When mixing a
38         large common symbol and a normal common symbol, always turn
39         the large common symbol into a normal one.
41 2005-08-04  Alan Modra  <amodra@bigpond.net.au>
43         * elf32-ppc.c (struct elf_linker_section): Replace sym_val field
44         with sym.
45         (ppc_elf_relocate_section): Adjust for above.
46         (create_sdata_sym): New function.
47         (ppc_elf_create_linker_section): Call it.
48         (ppc_elf_check_relocs): Correct has_sda_refs and non_got_refs.
49         Create sdata syms for all SDA relocs.
50         (ppc_elf_adjust_dynamic_symbol): Don't special case _SDA_BASE_
51         and _SDA2_BASE_.
52         (ppc_elf_set_sdata_syms): Delete.
53         * elflink.c (bfd_elf_size_dynamic_sections): Don't create DT_INIT
54         and DT_FINI tags unless associated section has input.
55         (bfd_elf_set_symbol, _bfd_elf_provide_symbol): Delete.
56         (_bfd_elf_provide_section_bound_symbols): Delete.
57         * bfd-in.h (_bfd_elf_provide_symbol): Delete.
58         (_bfd_elf_provide_section_bound_symbols): Delete.
59         * bfd-in2.h: Regenerate.
61 2005-08-04  Alan Modra  <amodra@bigpond.net.au>
63         * elflink.c (fix_syms, _bfd_elf_fix_excluded_sec_syms): Move to..
64         * linker.c (fix_syms, _bfd_fix_excluded_sec_syms): ..here.
65         * bfd-in.h (_bfd_fix_excluded_sec_syms): Rename.
66         * bfd-in2.h: Regenerate.
68 2005-08-03  H.J. Lu  <hongjiu.lu@intel.com>
70         * elfxx-ia64.c (elfNN_ia64_relax_section): Resize .rela.got
71         only if it isn't NULL.
73 2005-08-03  H.J. Lu  <hongjiu.lu@intel.com>
75         * elf32-i386.c (elf_howto_table): Undo the overflow change for
76         R_386_PC16 made on 2005-07-18.
78         * elf64-x86-64.c (x86_64_elf_howto_table): Undo the overflow
79         change for R_X86_64_PC16 made on 2005-07-18.
81 2005-08-03  Alan Modra  <amodra@bigpond.net.au>
83         * elf32-ppc.c (struct ppc_elf_link_hash_table): Remove hgot.  Use
84         elf.hgot throughout file.
86 2005-08-03  Alan Modra  <amodra@bigpond.net.au>
88         * elf32-ppc.c (ppc_elf_size_dynamic_sections): Correct value of
89         _GLOBAL_OFFSET_TABLE_ for > 32k GOT.
91 2005-08-02  Andreas Schwab  <schwab@suse.de>
93         * elfxx-ia64.c (struct elfNN_ia64_allocate_data): Add only_got.
94         (elfNN_ia64_relax_section): Reallocate .rela.got when .got has
95         changed.
96         (allocate_dynrel_entries): Look only at GOT relocations when
97         only_got is true.
98         (elfNN_ia64_size_dynamic_sections): Set only_got to false before
99         calling allocate_dynrel_entries.
101 2005-08-02  Nick Clifton  <nickc@redhat.com>
103         PR 1147
104         * elf32-arm.c (struct _arm_elf_section_data): Turn into a typedef
105         and make the mapcount field unsigned.
106         (struct section_list): New: Used to keep track of which sections
107         have an _arm_elf_section_data structure.
108         (record_section_with_arm_elf_section_data): New function.
109         (get_arm_elf_section_data): New function.
110         (unrecord_section_with_arm_elf_section_data): New function.
111         (elf32_arm_output_symbol_hook): Use get_arm_elf_section_data.
112         (elf32_arm_new_section_hook): Call
113         record_section_with_arm_elf_section_data.
114         (elf32_arm_write_section): Use get_arm_elf_section_data and
115         unrecord_section_with_arm_elf_section_data.
117 2005-08-01  Richard Sandiford  <richard@codesourcery.com>
119         * elfxx-mips.c (mips_mach_extends_p): Treat MIPS64 as an extension
120         of MIPS32 and MIPS64r2 as an extension of MIPS32r2.
122 2005-07-30  David Daney  <ddaney@avtrex.com>
124         * elflink.c (elf_gc_sweep):  Set dynsymcount to correct value.
126 2005-07-29  David Daney  <ddaney@avtrex.com>
128         * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook):  Ignore _gp_disp
129         if it is in the *ABS* section.
131 2005-07-29  Paul Brook  <paul@codesourcery.com>
133         * reloc.c: Add BFD_RELOC_ARM_T32_ADD_PC12.
134         * bfd-in2.h: Regenerate.
135         * libbfd.h: Regenerate.
137 2005-07-29  Paul Brook  <paul@codesourcery.com>
139         * reloc.c (BFD_RELOC_ARM_T32_IMM12): Add.
140         * bfd-in2.h: Regeenrate.
141         * libbfd.h: Regenerate.
143 2005-07-29  Pavel Kankovsky  <peak@argo.troja.mff.cuni.cz>
145         * peXXigen.c (pe_print_edata): Compute the size of the export
146         table from the size field in the DataDictionary and not the size
147         of the section.  Some linkers embed the export table inside a
148         larger section.
150 2005-07-29  Alan Modra  <amodra@bigpond.net.au>
152         * elf-bfd.h (struct elf_backend_data): Add action_discarded.
153         (enum action_discarded): Move from..
154         * elflink.c (enum action_discarded): ..here.
155         (_bfd_elf_default_action_discarded): Rename from elf_action_discarded.
156         Remove target specific section checks.
157         (elf_link_input_bfd): Adjust.
158         * elfxx-target.h (elf_backend_action_discarded): Define.
159         (elfNN_bed): Init new field.
160         * bfd-in.h (_bfd_elf_default_action_discarded): Declare.
161         * bfd-in2.h: Regenerate.
162         * elf-hppa.h (elf_hppa_action_discarded): New function.
163         * elf32-hppa.c (elf_backend_action_discarded): Define.
164         * elf64-hppa.c (elf_backend_action_discarded): Define.
165         * elf32-ppc.c (ppc_elf_action_discarded): New function.
166         (elf_backend_action_discarded): Define.
168 2005-07-27  Alan Modra  <amodra@bigpond.net.au>
170         * elflink.c (fix_syms): Handle symbols defined in input sections.
172 2005-07-27  Jan Beulich  <jbeulich@novell.com>
174         * elf64-x86-64.c (R_X86_64_standard, R_X86_64_vt_offset): New.
175         (elf64_x86_64_info_to_howto): Use them.
177 2005-07-27  Alan Modra  <amodra@bigpond.net.au>
179         * elflink.c (_bfd_elf_merge_symbol): Skip weak redefinition
180         regardless of strength of previous definition.
182 2005-07-26  Alan Modra  <amodra@bigpond.net.au>
184         * elflink.c (elf_gc_mark_dynamic_ref_symbol): Handle -shared.
185         (bfd_elf_gc_sections): Allow -gc-sections when -shared.
186         * elf32-ppc.c (ppc_elf_gc_sweep_hook): Correct for -shared.
188 2005-07-26  Alan Modra  <amodra@bigpond.net.au>
190         * elflink.c (elf_gc_sweep): Move gcc_except_table code..
191         (bfd_elf_gc_sections): ..to here.
193 2005-07-25  DJ Delorie  <dj@redhat.com>
195         * reloc.c: Remove unused M32C relocs, add BFD_RELOC_M32C_HI8.
196         * libbfd.h: Regenerate.
197         * bfd-in2.h: Regenerate.
199         * elf32-m32c.c (m32c_elf_howto_table): Add R_M32C_8, R_M32C_LO16,
200         R_M32C_HI8, R_M32C_HI16.
201         (m32c_reloc_map): Likewise.
202         (m32c_elf_relocate_section): Add R_M32C_HI8 and R_M32C_HI16.
204 2005-07-25  Jan Hubicka  <jh@suse.cz>
205             H.J. Lu  <hongjiu.lu@intel.com>
207         * elf-bfd.h (_bfd_elf_large_com_section): New.
208         * elf.c (_bfd_elf_large_com_section): New. Defined.
210         * elf64-x86-64.c (elf64_x86_64_add_symbol_hook): New.
211         (elf64_x86_64_elf_section_from_bfd_section): New.
212         (elf64_x86_64_symbol_processing): New.
213         (elf64_x86_64_common_definition): New.
214         (elf64_x86_64_common_section_index): New.
215         (elf64_x86_64_common_section): New.
216         (elf64_x86_64_merge_symbol): New.
217         (elf64_x86_64_additional_program_headers): New.
218         (elf64_x86_64_special_sections): New.
219         (elf_backend_section_from_bfd_section): New. Defined.
220         (elf_backend_add_symbol_hook): Likewise.
221         (elf_backend_common_section_index): Likewise.
222         (elf_backend_common_section): Likewise.
223         (elf_backend_common_definition): Likewise.
224         (elf_backend_merge_symbol): Likewise.
225         (elf_backend_special_sections): Likewise.
226         (elf_backend_additional_program_headers): Likewise.
228 2005-07-25  H.J. Lu  <hongjiu.lu@intel.com>
230         * elf-bfd.h (elf_backend_data): Add common_definition,
231         common_section_index, common_section, and merge_symbol.
232         (_bfd_elf_common_definition): New.
233         (_bfd_elf_common_section_index): New.
234         (_bfd_elf_common_section): New.
236         * elf.c (elf_fake_sections): Don't clear sh_flags.
238         * elflink.c (_bfd_elf_merge_symbol): Call backend merge_symbol
239         if it is available.
240         (is_global_data_symbol_definition): Call backend
241         common_definition instead of checking SHN_COMMON.
242         (elf_link_add_object_symbols): Likewise.
243         (elf_link_output_extsym): Call backend common_section_index
244         for common section index.
245         (_bfd_elf_common_definition): New.
246         (_bfd_elf_common_section_index): New.
247         (_bfd_elf_common_section): New.
249         * elfxx-target.h (elf_backend_common_definition): New.
250         (elf_backend_common_section_index): New.
251         (elf_backend_common_section): New.
252         (elf_backend_merge_symbol): New.
253         (elfNN_bed): Initialize common_definition, common_section_index,
254         common_section, and merge_symbol.
256         * section.c (BFD_FAKE_SECTION): New.
257         (STD_SECTION): Use it.
258         * bfd-in2.h: Regenerated.
260 2005-07-23  Olaf Hering <olh@suse.de>
262         * elflink.c (elf_link_input_bfd): Add '\n' for linker einfo
263         callback.
265 2005-07-21  Ralf Corsepius  <ralf.corsepius@rtems.org>
267         * config.bfd: Remove i[3-7]86-*-rtemself*.
268         Remove sparc-*-rtemself*.
270 2005-07-22  Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
272         * elf32-m32r.c (m32r_elf_check_relocs): Fix pc count for
273         R_M32R_REL32.
275 2005-07-21  Ben Elliston  <bje@gnu.org>
277         * Makefile.am (BFD32_BACKENDS): Remove cf-m68klynx.lo.
278         (BFD32_BACKENDS): Likewise, remove m68klynx.lo.
279         (BFD32_BACKENDS_CFILES): Remove cf-m68klynx.c, m68klynx.c.
280         (cf-m68klynx.lo, m68klynx.lo): Remove targets.
281         * Makefile.in: Regenerate.
282         * cf-m68klynx.c: Remove.
283         * m68klynx.c: Likewise.
284         * configure.in (m68klynx_aout_vec): Remove vector.
285         (m68klynx_coff_vec): Likewise.
286         * configure: Regenerate.
287         * targets.c (m68klynx_aout_vec): Remove extern.
288         (m68klynx_coff_vec): Likewise.
289         (_bfd_target_vector): Remove m68klynx_{aout,coff}_vec.
290         * po/SRC-POTFILES.in: Remove cf-m68klynx.c, m68klynx.c.
292 2005-07-20  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.com>
294         * elf32-m32r.c (m32r_elf_howto_table): Support R_M32R_REL32.
295         (m32r_reloc_map): Likewise.
296         (m32r_elf_relocate_section): Likewise.
297         (m32r_elf_gc_sweep_hook): Likewise.
298         (m32r_elf_check_relocs): Likewise.
300 2005-07-18  Nick Clifton  <nickc@redhat.com>
302         * reloc.c: Add M32C and MS1 relocs.
303         * bfd-in2.h: Regenerate.
304         * libbfd.h: Regenerate.
306 2005-07-18  Nick Clifton  <nickc@redhat.com>
308         * config.bfd: Move m32c entry to correct location.
309         * archures.c: Likewise.
310         * configure.in: Likewise.
311         * configure: Regenerate.
312         * targets.c: Move ms1 vector to correct location.
314 2005-07-18  Jan Beulich  <jbeulich@novell.com>
316         * elf32-i386.c (elf_howto_table): Adjust overflow complaint handler
317         for R_386_PC16.
318         * elf64-x86-64.c (x86_64_elf_howto_table): Adjust overflow complaint
319         handler for R_X86_64_PC16, R_X86_64_8, and R_X86_64_DTPOFF.
321 2005-07-16  Eric Botcazou  <ebotcazou@libertysurf.fr>
323         PR ld/1021
324         PR ld/1031
325         * elflink.c (elf_link_add_object_symbols): Also append the version
326         name to non-hidden absolute symbols that are functions.
328 2005-07-16  Alan Modra  <amodra@bigpond.net.au>
330         * elf32-ppc.c (ppc_elf_set_sdata_syms): Return void.  Remove hack
331         for zero size sections.  Don't set .sbss syms here.
332         * elf32-ppc.h (ppc_elf_set_sdata_syms): Adjust prototype.
334 2005-07-16  Alan Modra  <amodra@bigpond.net.au>
336         * Makefile.am: Run "make dep-am".
337         * Makefile.in: Regenerate.
339 2005-07-15  Bob Wilson  <bob.wilson@acm.org>
341         * elf32-xtensa.c (vsprint_msg): Add prototype.
342         (build_encoding_error_message): Delete.  Code moved into....
343         (elf_xtensa_do_reloc): ....here, and changed to give better
344         error messages for out of range literals.
346 2005-07-15  Alan Modra  <amodra@bigpond.net.au>
348         * elflink.c (bfd_elf_record_link_assignment): Remove output_bfd param.
349         (_bfd_elf_provide_symbol): Allow redefinition of weak syms and those
350         defined in output sections.  Call bfd_elf_record_link_assignment.
351         * bfd-in.h (bfd_elf_record_link_assignment): Update prototype.
352         * bfd-in2.h: Regenerate.
354 2005-07-14  Jim Blandy  <jimb@redhat.com>
356         Add support for m32c-*-elf (Renesas m32c and m16c).
357         * Makefile.am (ALL_MACHINES): Add cpu-m32c.lo.
358         (ALL_MACHINES_CFILES): Add cpu-m32c.c.
359         (BFD32_BACKENDS): Add elf32-m32c.lo.
360         (BFD32_BACKENDS_CFILES): Add elf32-m32c.c.
361         (cpu-m32c.lo, elf32-m32c.lo): New rules, generated by 'make dep-am'.
362         * Makefile.in: Regenerated.
363         * archures.c (bfd_arch_m32c, bfd_mach_m16c, bfd_mach_m32c): New
364         arch and mach codes.
365         (bfd_m32c_arch): New arch info object.
366         (bfd_archures_list): List bfd_m32c_arch.
367         * bfd-in2.h: Regenerated.
368         * config.bfd: Add case for the m32c.
369         * configure.in: Add case for the m32c.
370         * configure: Regenerated.
371         * cpu-m32c.c, elf32-m32c.c: New files.
372         * libbfd.h: Regenerated.
373         * targets.c (bfd_elf32_m32c_vec): Declare.
374         (_bfd_target_vector): List bfd_elf32_m32c_vec.
376 2005-07-14  Alan Modra  <amodra@bigpond.net.au>
378         * bfd-in.h (_bfd_elf_fix_excluded_sec_syms): Declare.
379         (_bfd_elf_provide_section_bound_symbols): Remove param name.
380         Formatting.
381         * bfd-in2.h: Regenerate.
382         * elflink.c (bfd_elf_gc_sections): Don't call generic function.
383         (_bfd_elf_provide_symbol): Formatting.
384         (_bfd_elf_provide_section_bound_symbols): Remove all hacks, just
385         create section relative syms.
386         (fix_syms, _bfd_elf_fix_excluded_sec_syms): New functions.
387         * elf32-ppc.c (ppc_elf_set_sdata_syms): Use
388         _bfd_elf_provide_section_bound_symbols.
389         * reloc.c (bfd_mark_used_section): Delete.
390         (bfd_generic_gc_sections): Don't call the above.
392 2005-07-14  Paul Woegerer <paul.woegerer@nsc.com>
394         PR 1063
395         * cache.c (bfd_last_cache): Initialise to NULL.
397 2005-07-14  Daniel Marques  <marques@cs.cornell.edu>
398             Nick Clifton  <nickc@redhat.com>
400         * coff-alpha.c (alpha_ecoff_bad_format_hook): Detect compressed
401         Alpha binaries and issue a helpful error message.
402         (alpha_ecoff_swap_reloc_out): Increase maximum allowed internal
403         symbol index to 15 to allow for binaries produced by DEC
404         compilers.
406 2005-07-13  Steve Ellcey  <sje@cup.hp.com>
408         * bfd.m4 (BFD_NEED_DECLARATION): Remove.
410 2005-07-12  Alan Modra  <amodra@bigpond.net.au>
412         * elf64-ppc.c (ppc64_elf_relocate_section): Don't use a plt stub
413         when !can_plt_call.
415 2005-07-12  Alan Modra  <amodra@bigpond.net.au>
417         * elf32-xtensa.c (bfd_elf_xtensa_reloc): Warning fix.
419 2005-07-12  Alan Modra  <amodra@bigpond.net.au>
421         * elf32-ppc.c (ppc_elf_set_sdata_syms): Correct __sbss_start value.
423 2005-07-11  H.J. Lu  <hongjiu.lu@intel.com>
425         * elflink.c (_bfd_elf_symbol_refs_local_p): Revert the last
426         change.
428 2005-07-08  Paul Koning  <pkoning@equallogic.com>
430         * dwarf2.c (read_address): Check sign_extend_vma to handle targets
431         where addresses are sign extended.
433 2005-07-08  Ralf Corsepius <ralf.corsepius@rtems.org>
435         * config.bfd: Mark i960-*-rtems*, or32-*-rtems* as obsolete.
436         Mark a29k-*rtems*, hppa*-*-rtems*, *-go32-rtems*,
437         i[3-7]86*-*-rtemscoff*, mips*el-*-rtems*, powerpcle-*-rtems*,
438         sparc*-*-rtemsaout* as removed
440 2005-07-08  Alan Modra  <amodra@bigpond.net.au>
442         * elf-hppa.h (elf_hppa_final_link): Use gp val of zero when none
443         of the usual sections are found.
444         * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Tidy.
445         Strip .dynbss if it is zero size.
446         * elf32-arm.c (elf32_arm_size_dynamic_sections): Likewise.
447         * elf32-cris.c (elf_cris_size_dynamic_sections): Likewise.
448         * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
449         * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise, and
450         .dynsbss.
451         (i370_elf_finish_dynamic_sections): Don't attempt to write .got
452         when it is zero size.
453         * elf32-i386.c (elf_i386_size_dynamic_sections): Correct handling
454         of .dynbss and zero size sections.
455         * elf32-m32r.c (m32r_elf_size_dynamic_sections): Strip .dynbss if
456         it is zero size.
457         * elf32-m68k.c (elf_m68k_size_dynamic_sections): Tidy.  Strip
458         .dynbss if zero size.
459         * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise, .dynsbss
460         too.
461         * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
462         * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
463         * elf32-vax.c (elf_vax_size_dynamic_sections): Likewise.
464         * elf32-xtensa.c (elf_xtensa_size_dynamic_sections): Tidy.  Strip
465         .plt.* and .got.plt.* if zero size.
466         * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Tidy.  Strip
467         .got* and .dynbss if zero size.
468         * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Tidy.  Strip
469         * elf64-ppc.c (create_linkage_sections): Create branch lookup table
470         in .data.rel.ro.brlt or .rodata.brlt, and similarly for associated
471         reloc section.
472         (create_got_section): Always create new .got and .rela.got sections.
473         (ppc64_elf_size_dynamic_sections): Tidy.  Strip .dynbss if zero size.
474         * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
475         * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
476         * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections): Handle
477         dynamic bss sections correctly.
478         * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Tidy.
479         * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Tidy.  Strip
480         .dynbss if zero size.
482 2005-07-08  Ben Elliston  <bje@au.ibm.com>
484         * elf32-xtensa.c: Include <stdarg.h> unconditionally, not only
485         when ANSI_PROTOTYPES is defined.  Remove #ifdef logic.
487 2005-07-07  H.J. Lu  <hongjiu.lu@intel.com>
489         * elf-bfd.h (elf_backend_data): Add special_sections.
491         * elf.c (_bfd_elf_get_sec_type_attr): Check special_sections
492         first.
494         * elf32-arm.c (elf_backend_get_sec_type_attr): Removed.
495         (elf_backend_special_sections): New. Defined.
496         * elf32-m32r.c: Likewise.
497         * elf32-m68hc11.c: Likewise.
498         * elf32-m68hc12.c: Likewise.
499         * elf32-mcore.c: Likewise.
500         * elf32-sh64.c: Likewise.
501         * elf32-v850.c: Likewise.
502         * elf32-xtensa.c: Likewise.
503         * elf64-alpha.c: Likewise.
504         * elf64-hppa.c: Likewise.
505         * elf64-ppc.c: Likewise.
506         * elf64-sh64.c: Likewise.
507         * elfxx-ia64.c: Likewise.
508         * elfxx-mips.c: Likewise.
509         * elfxx-mips.h: Likewise.
511         * elfxx-target.h (elf_backend_special_sections): New.
512         (elfNN_bed): Initialize special_sections.
514 2005-07-07  Bob Wilson  <bob.wilson@acm.org>
516         * xtensa-modules.c: Update tables with Xtensa MMU features.
518 2005-07-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
520         * elf32-xtensa.c (vsprint_msg): Add format attribute.  Fix
521         format bugs.
522         * vms.h (_bfd_vms_debug): Add format attribute.
523         (_bfd_vms_debug, _bfd_hexdump): Fix typos.
525 2005-07-07  H.J. Lu  <hongjiu.lu@intel.com>
527         PR 975
528         * elflink.c (_bfd_elf_symbol_refs_local_p): Only undefined
529         symbol with default visibility is local.
531 2005-07-07  Ben Elliston  <bje@gnu.org>
533         * config.bfd: Mark m68*-*-rtemscoff as obsolete.
535 2005-07-06  H.J. Lu  <hongjiu.lu@intel.com>
537         * dwarf2.c (varinfo): Add addr.
538         (lookup_symbol_in_variable_table): Also check addr.
539         (scan_unit_for_symbols): Set addr for variable.
540         (comp_unit_find_line): Updated.
542 2005-07-06  Nick Clifton  <nickc@redhat.com>
544         * coff-alpha.c (alpha_adjust_reloc_in): Issue an informative error
545         message if an unknown reloc is encountered.
546         (alpha_relocate_section): Likewise.
548         * ecoff.c (_bfd_ecoff_write_object_contents): Cope with a reloc
549         with a missing howto field.
551 2005-07-06  Alan Modra  <amodra@bigpond.net.au>
553         * po/SRC-POTFILES.in: Add cpu-ms1.c, elf32-ms1.c, elf-vxworks.c,
554         elfxx-sparc.c.
556 2005-07-05  Paul Brook  <paul@codesourcery.com>
558         * elf32-ppc.c (ppc_elf_vxworks_special_sections): Remove.
559         (ppc_elf_vxworks_get_sec_type_attr): New function.
560         (elf_backend_special_sections): Remove vxwords definition.
561         (elf_backend_get_sec_type_attr): Define for vxworks.
563 2005-07-05  Nick Clifton  <nickc@redhat.com>
565         * elf64-ppc.c (ppc64_elf_info_to_howto): Fix typo.
567 2005-07-05  Paul Brook  <paul@codesourcery.com>
569         * config.bfd: Add separate case for ppc-vxworks.
570         * configure: Regenerate.
571         * configure.in: Include elf-vxworks.lo on ppc targets.
572         * elf-vxworks.c (elf_vxworks_final_write_processing): Handle
573         .rela.plt.unloaded.
574         * elf32-ppc.c: Add VxWorks target vec.  Include elf-vxworks.h.
575         (PLT_ENTRY_SIZE, PLT_INITIAL_ENTRY_SIZE, PLT_SLOT_SIZE): Remove.
576         (VXWORKS_PLT_ENTRY_SIZE, ppc_elf_vxworks_plt_entry,
577         ppc_elf_vxworks_pic_plt_entry, VXWORKS_PLT_INITIAL_ENTRY_SIZE,
578         ppc_elf_vxworks_plt0_entry, ppc_elf_vxworks_pic_plt0_entry,
579         VXWORKS_PLT_NON_JMP_SLOT_RELOCS, VXWORKS_PLTRESOLVE_RELOCS,
580         VXWORKS_PLTRESOLVE_RELOCS_SHLIB): New.
581         (ppc_elf_link_hash_table): Add srelplt2, sgotplt, hgot, hplt,
582         is_vxworks, plt_entry_size, plt_slot_size, plt_initial_entry_size.
583         (ppc_elf_link_hash_table_create): Initialize hadtab plt fields.
584         (ppc_elf_create_got): Create .got.plt for VxWorks.
585         (ppc_elf_create_dynamic_sections): Create unloaded plt relocation
586         section for VxWorks.
587         (ppc_elf_select_plt_layout): Handle VxWorks plt format.
588         (allocate_got): VxWorks does not need a got header.
589         (allocate_dynrelocs): Handle VxWorks plt format.
590         (ppc_elf_size_dynamic_sections): Save _G_O_T_ and _P_L_T_ symbols for
591         VxWorks.  Handle VxWorks plt/got.
592         (ppc_elf_finish_dynamic_sections): Fill in VxWorks plt.
593         (ppc_elf_vxworks_special_sections): New.
594         (ppc_elf_vxworks_link_hash_table_create,
595         ppc_elf_vxworks_add_symbol_hook,
596         elf_i386_vxworks_link_output_symbol_hook,
597         ppc_elf_vxworks_final_write_processing): New functions.
598         * targets.c (bfd_elf32_powerpc_vxworks_vec): Declare.
599         (_bfd_target_vector): Use it.
601 2005-07-05  Jakub Jelinek  <jakub@redhat.com>
603         * libbfd-in.h (struct artdata): Add extended_names_size field.
604         * libbfd.h: Rebuilt.
605         * coff-rs600.c (_bfd_xcoff_archive_p): Don't clear fields in freshly
606         allocated object by bfd_zalloc.
607         * coff64-rs6000.c (xcoff64_archive_p): Likewise.
608         * ecoff.c (_bfd_ecoff_archive_p): Likewise.
609         * archive.c (_bfd_generic_mkarchive, bfd_generic_archive_p): Likewise.
610         (get_extended_arelt_filename): Fail if index is bigger or equal to
611         extended_names_size.
612         (_bfd_generic_read_ar_hdr_mag): Don't set bfd_error_malformed_archive,
613         get_extended_arelt_filename already did that.
614         (_bfd_slurp_extended_name_table): Initialize extended_names_size field.
615         Allocate one extra byte and clear it, in case extended names table
616         is not terminated.
618         * libbfd-in.h (bfd_malloc2, bfd_realloc2, bfd_zmalloc2, bfd_alloc2,
619         bfd_zalloc2): New prototypes.
620         * bfd-in.h (HALF_BFD_SIZE_TYPE): Define.
621         * libbfd.c (bfd_malloc2, bfd_realloc2, bfd_zmalloc2): New functions.
622         * opncls.c (bfd_alloc2, bfd_zalloc2): New functions.
623         * elf.c (bfd_elf_get_elf_syms, setup_group, assign_section_numbers,
624         elf_map_symbols, map_sections_to_segments,
625         assign_file_positions_for_segments, copy_private_bfd_data,
626         swap_out_syms, _bfd_elf_slurp_version_tables): Use bfd_*alloc2
627         where appropriate.
628         * bfd-in2.h: Rebuilt.
629         * libbfd.h: Rebuilt.
631         * elf.c (_bfd_elf_print_private_bfd_data): Don't crash on bogus
632         verdef or verneed section.
633         (_bfd_elf_slurp_version_tables): Handle corrupt verdef and/or
634         verneed sections gracefully.
635         * elfxx-sparc.c (_bfd_sparc_elf_info_to_howto_ptr): Don't crash on
636         bogus relocation values.
637         * elf64-ppc.c (ppc64_elf_info_to_howto): Likewise.
638         * elf64-s390.c (elf_s390_info_to_howto): Likewise.
639         * elf32-s390.c (elf_s390_info_to_howto): Likewise.
640         * elf64-x86-64.c (elf64_x86_64_info_to_howto): Likewise.
641         * elfxx-ia64.c (lookup_howto): Likewise.
643         * elf.c (bfd_elf_get_str_section): Allocate an extra byte after
644         the end of strtab and clear it.
645         (elf_read): Remove.
647 2005-07-05  Nick Clifton  <nickc@redhat.com>
649         * po/vi.po: New Vietnamese translation.
650         * configure.in (ALL_LINGUAS): Add vi.
651         * configure: Regenerate.
653 2005-07-05  Peter S. Mazinger <ps.m@gmx.net>
655         * elf32-arm.c (elf32_arm_size_dynamic_sections): Fix a typo and
656         touchup logic like i386/ppc.
658 2005-07-05  Alan Modra  <amodra@bigpond.net.au>
660         * elf.c (special_sections): Move const qualifier.
661         (special_sections_b..special_sections_t): Likewise.
662         * elf32-arm.c (elf32_arm_symbian_get_sec_type_attr): Remove duplicate
663         const.
664         (elf32_arm_symbian_special_sections): Move const qualifier.
665         * elf32-m32r.c: Similarly.
666         * elf32-m68hc11.c: Similarly.
667         * elf32-m68hc12.c: Similarly.
668         * elf32-mcore.c: Similarly.
669         * elf32-ppc.c: Similarly.
670         * elf32-sh64.c: Similarly.
671         * elf32-v850.c: Similarly.
672         * elf32-xtensa.c: Similarly.
673         * elf64-alpha.c: Similarly.
674         * elf64-hppa.c: Similarly.
675         * elf64-ppc.c: Similarly.
676         * elf64-sh64.c: Similarly.
677         * elfxx-ia64.c: Similarly.
678         * elfxx-mips.c: Similarly.
680 2005-07-04  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.com>
682         * elf32-m32r.c (m32r_elf_size_dynamic_sections): Use
683         info->executable instead of !info->shared where appropriate.
685 2005-07-04  Alan Modra  <amodra@bigpond.net.au>
687         PR 1042
688         * elf.c (assign_file_positions_for_segments): Remove excluded
689         sections from the segment map.
691 2005-07-04  Alan Modra  <amodra@bigpond.net.au>
693         PR 1004
694         * elf-bfd.h (struct elf_backend_data): Add get_sec_type_attr.  Delete
695         special_sections.
696         (_bfd_elf_get_special_section): Declare.
697         (bfd_elf_special_section): Update prototype.
698         * elf.c (special_sections): Remove unused outer entries.
699         (get_special_section): Delete.
700         (_bfd_elf_get_special_section): New function.
701         (_bfd_elf_get_sec_type_attr): Replace "name" arg with "sec".  Update
702         special_sections indexing.
703         (_bfd_elf_new_section_hook): Call backend get_sec_type_attr.
704         * elf32-arm.c (symbian_special_sections_d): Delete.
705         (symbian_special_sections_g, symbian_special_sections_h): Delete.
706         (symbian_special_sections_i, symbian_special_sections_f): Delete.
707         (symbian_special_sections_p): Delete.
708         (elf32_arm_symbian_special_sections): Merge above to here.
709         (elf32_arm_symbian_get_sec_type_attr): New function.
710         (elf_backend_special_sections): Don't define.
711         (elf_backend_get_sec_type_attr): Define.
712         * elf32-m32r.c: Similarly to elf32-arm.c.
713         * elf32-m68hc11.c: Likewise.
714         * elf32-m68hc12.c: Likewise.
715         * elf32-mcore.c: Likewise.
716         * elf32-sh64.c: Likewise.
717         * elf32-v850.c: Likewise.
718         * elf32-xtensa.c: Likewise.
719         * elf64-alpha.c: Likewise.
720         * elf64-hppa.c: Likewise.
721         * elf64-ppc.c: Likewise.
722         * elf64-sh64.c: Likewise.
723         * elfxx-ia64.c: Likewise.
724         * elfxx-mips.c: Likewise.
725         * elf32-ppc.c: Likewise.
726         (bfd_elf_special_section ppc_alt_plt): New.  Use it if .plt loadable.
727         * elfxx-mips.h (_bfd_mips_elf_get_sec_type_attr): Declare.
728         (_bfd_mips_elf_special_sections, elf_backend_special_sections): Delete.
729         (elf_backend_get_sec_type_attr): Define.
730         * elfxx-target.h (elf_backend_get_sec_type_attr): Define.
731         (elf_backend_special_sections): Don't define.
732         (elfNN_bed): Update.
734 2005-07-01  Nick Clifton  <nickc@redhat.com>
736         * cpu-d10v.c: Update to ISO C90 style function declarations and
737         fix formatting.
738         * cpu-d30v.c: Likewsie.
739         * cpu-i370.c: Likewsie.
740         * cpu-xstormy16.c: Likewsie.
741         * elf32-arc.c: Likewsie.
742         * elf32-d10v.c: Likewsie.
743         * elf32-d30v.c: Likewsie.
744         * elf32-dlx.c: Likewsie.
745         * elf32-i370.c: Likewsie.
746         * elf32-i960.c: Likewsie.
747         * elf32-ip2k.c: Likewsie.
748         * elf32-m32r.c: Likewsie.
749         * elf32-mcore.c: Likewsie.
750         * elf32-openrisc.c: Likewsie.
751         * elf32-or32.c: Likewsie.
752         * elf32-pj.c: Likewsie.
753         * elf32-v850.c: Likewsie.
754         * elf32-xstormy16.c: Likewsie.
756 2005-07-01  Alan Modra  <amodra@bigpond.net.au>
758         * elf64-alpha.c (elf64_alpha_create_got_section): Always create
759         a new .got section.
760         (elf64_alpha_create_dynamic_sections): Always make new sections
761         by using bfd_make_section_anyway_with_flags.  Check that .got not
762         already created.
763         (elf64_alpha_check_relocs): Delete "got_created".  Use tdata->gotobj
764         instead.
766 2005-06-30  Alan Modra  <amodra@bigpond.net.au>
768         * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Ignore dynamic
769         _SDA_BASE_ and _SDA2_BASE_ symbols.
770         * elflink.c (_bfd_elf_provide_symbol): Correct comment.  Define
771         sym if not def_regular.
772         (_bfd_elf_provide_section_bound_symbols): Similarly.
774 2005-06-30  Ben Elliston  <bje@gnu.org>
776         * config.bfd: Mark as obsolete:
777             m68*-apollo-*
778             m68*-apple-aux*
779             m68*-bull-sysv*
781 2005-06-29  Alan Modra  <amodra@bigpond.net.au>
783         * elflink.c (_bfd_elf_gc_mark): Mark sections referenced by
784         .eh_frame specially..
785         (bfd_elf_gc_sections): ..rather than totally ignoring .eh_frame.
786         Don't recheck sections we have already marked.
787         (elf_gc_sweep): Keep non-code sections referenced from .eh_frame.
788         * section.c (struct bfd_section): Add gc_mark_from_eh.
789         (STD_SECTION): Adjust.
790         * ecoff.c (bfd_debug_section): Adjust.
791         * bfd-in2.h: Regenerate.
793 2005-06-29  Alan Modra  <amodra@bigpond.net.au>
795         * elflink.c (elf_gc_sweep): Do not refcount on sections that have
796         not been processed by check_relocs.
798 2005-06-29  Paul Brook  <paul@codesourcery.com>
800         * bfd-in.h (_bfd_elf_provide_symbol): Update prototype.
801         * bfd-in2.h: Regenerate.
802         * elf32-ppc.c (ppc_elf_set_sdata_syms): Make sdata symbols section
803         relative.
804         * elflink.c (bfd_elf_set_symbol): Add section argument.
805         (_bfd_elf_provide_symbol): Ditto.
806         (_bfd_elf_provide_section_bound_symbols): Pass NULL section argument.
808 2005-06-27  Carlos O'Donell <carlos@systemhalted.org>
810         * bfd/elf32-hppa.c (struct elf32_hppa_stub_hash_entry):
811         Use bh_root, and hh.
812         (struct elf32_hppa_link_hash_entry): Use eh, and hsh_cache.
813         (struct elf32_hppa_dyn_reloc_entry): Use hdh_next.
814         (struct elf32_hppa_link_hash_table): Use etab and bstab.
815         (stub_hash_newfunc): Use hh.
816         (hppa_link_hash_newfunc): Use hsh_cache.
817         (elf32_hppa_link_hash_table_create): Use etab, and bstab.
818         (elf32_hppa_link_hash_table_free): Use bstab.
819         (hppa_stub_name): Use eh.
820         (hppa_get_stub_entry): Use hh, hsh_entry, and hsh_cache.
821         (hppa_add_stub): Use bstab.
822         (hppa_type_of_stub): Use eh.
823         (hppa_build_one_stub): Use hh and bh_root.
824         (elf32_hppa_copy_indirect_symbol): Use hdh_next.
825         (elf32_hppa_check_relocs): Use eh, etab, and hdh_next.
826         (elf32_hppa_gc_sweep_hook): Use hdh_next.
827         (elf32_hppa_adjust_dynamic_symbol): Use hdh_next, and etab.
828         (allocate_plt_static): Use etab.
829         (allocate_dynrelocs): Use etab, and hdh_next.
830         (readonly_dynrelocs): Use hdh_next.
831         (elf32_hppa_size_dynamic_sections): Use etab, and hdh_next.
832         (get_local_syms): Use eh, bstab, and hh.
833         (elf32_hppa_size_stubs): Use eh, bstab, and hh.
834         (elf32_hppa_set_gp): Use etab.
835         (elf32_hppa_build_stubs): Use bstab.
836         (final_link_relocate): Use eh, bh_root.
837         (elf32_hppa_relocate_section): Use elf, etab.
838         (elf32_hppa_finish_dynamic_sections): Use etab.
840 2005-06-27  H.J. Lu  <hongjiu.lu@intel.com>
842         * elfxx-ia64.c (elfNN_hpux_backend_symbol_processing): Remove
843         the extra `;'.
845 2005-06-21  Carlos O'Donell <carlos@systemhalted.org>
847         * bfd/elf32-hppa.c (hppa_elf_hash_entry): Define.
848         (hppa_stub_hash_entry): Define.
849         (stub_hash_newfunc): Rename variables.
850         (hppa_link_hash_newfunc): Likewise.
851         (elf32_hppa_link_hash_table_free): Likewise.
852         (hppa_stub_name): Likewise.
853         (hppa_get_stub_entry): Likewise.
854         (hppa_add_stub): Likewise.
855         (hppa_type_of_stub): Likewise.
856         (hppa_build_one_stub): Likewise.
857         (hppa_size_one_stub): Likewise.
858         (elf32_hppa_create_dynamic_sections): Likewise.
859         (elf32_hppa_copy_indirect_symbol): Likewise.
860         (elf32_hppa_check_relocs): Likewise.
861         (elf32_hppa_gc_mark_hook): Likewise.
862         (elf32_hppa_gc_sweep_hook): Likewise.
863         (elf32_hppa_grok_psinfo): Likewise.
864         (elf32_hppa_hide_symbol): Likewise.
865         (elf32_hppa_adjust_dynamic_symbol): Likewise.
866         (allocate_dynrelocs): Likewise.
867         (clobber_millicode_symbols): Likewise.
868         (readonly_dynrelocs): Likewise.
869         (elf32_hppa_size_dynamic_sections): Likewise.
870         (get_local_syms): Likewise.
871         (elf32_hppa_size_stubs): Likewise.
872         (hppa_record_segment_addr): Likewise.
873         (final_link_relocate): Likewise.
874         (elf32_hppa_relocate_section): Likewise.
875         (elf32_hppa_finish_dynamic_symbol): Likewise.
877 2005-06-20  H.J. Lu  <hongjiu.lu@intel.com>
879         PR 1025
880         * elf-m10300.c (mn10300_elf_check_relocs): Handle indirect
881         symbol.
882         * elf32-arm.c (elf32_arm_check_relocs): Likewise.
883         * elf32-avr.c (elf32_avr_check_relocs): Likewise.
884         * elf32-cris.c (cris_elf_check_relocs): Likewise.
885         * elf32-d10v.c (elf32_d10v_check_relocs): Likewise.
886         * elf32-dlx.c (elf32_dlx_check_relocs): Likewise.
887         * elf32-fr30.c (fr30_elf_check_relocs): Likewise.
888         * elf32-frv.c (elf32_frv_check_relocs): Likewise.
889         * elf32-i370.c (i370_elf_check_relocs): Likewise.
890         * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
891         * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
892         * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
893         * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
894         * elf32-mcore.c (mcore_elf_check_relocs): Likewise.
895         * elf32-ms1.c (ms1_elf_check_relocs): Likewise.
896         * elf32-msp430.c (elf32_msp430_check_relocs): Likewise.
897         * elf32-openrisc.c (openrisc_elf_check_relocs): Likewise.
898         * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
899         * elf32-s390.c (elf_s390_check_relocs): Likewise.
900         * elf32-sh.c (sh_elf_check_relocs): Likewise.
901         * elf32-v850.c (v850_elf_check_relocs): Likewise.
902         * elf32-vax.c (elf_vax_check_relocs): Likewise.
903         * elf64-mmix.c (mmix_elf_check_relocs): Likewise.
904         * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
905         * elf64-s390.c (elf_s390_check_relocs): Likewise.
906         * elf64-sh64.c (sh_elf64_check_relocs): Likewise.
907         * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
908         * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
910 2005-06-20  H.J. Lu  <hongjiu.lu@intel.com>
912         PR 1022
913         * elf32-hppa.c (elf32_hppa_check_relocs): Handle indirect
914         symbol.
916 2005-06-20  H.J. Lu  <hongjiu.lu@intel.com>
918         PR 1025
919         * elf32-i386.c (elf_i386_check_relocs): Handle indirect symbol.
920         * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
922 2005-06-18  H.J. Lu  <hongjiu.lu@intel.com>
924         * reloc.c: Add BFD_RELOC_X86_64_GOTOFF64 and
925         BFD_RELOC_X86_64_GOTPC32.
926         * bfd-in2.h: Regenerated.
928 2005-06-17  Jakub Jelinek  <jakub@redhat.com>
930         * elf.c (bfd_section_from_shdr): Kill bogus warning.
932         * elf.c (bfd_section_from_shdr): Fail if sh_entsize is bogus for
933         symbol, relocation, group or versym sections.
935         * coffcode.h (coff_slurp_reloc_table): Don't crash if native_relocs
936         is NULL.
937         * peXXigen.c (pe_print_idata): Don't crash if dll_name or start_address
938         doesn't point into the section.
940 2005-06-17  Jan Beulich  <jbeulich@novell.com>
942         * bfd-in2.h (elf_x86_64_reloc_type): Add BFD_RELOC_X86_64_GOTOFF64
943         and BFD_RELOC_X86_64_GOTPC32.
944         * libbfd.h (bfd_reloc_code_real_names): Likewise.
945         * elf64-x86-64.c (x86_64_elf_howto_table): Add entries for
946         R_X86_64_PC64, R_X86_64_GOTOFF64, and R_X86_64_GOTPC32.
947         (x86_64_reloc_map): Add entries for R_X86_64_PC64, R_X86_64_GOTOFF64,
948         and R_X86_64_GOTPC32.
949         (elf64_x86_64_info_to_howto): Adjust bounding relocation type.
950         (elf64_x86_64_check_relocs): Also handle R_X86_64_PC64,
951         R_X86_64_GOTOFF64, and R_X86_64_GOTPC32.
952         (elf64_x86_64_relocate_section): Likewise.
953         (elf64_x86_64_gc_sweep_hook): Also handle R_X86_64_PC64.
955 2005-06-15  Mark Kettenis  <kettenis@gnu.org>
957         * archive.c: Include "libiberty.h".
959 2005-06-15  Nick Clifton  <nickc@redhat.com>
961         * elf32-v850.c (ELF_MACHINE_ALT2): Define so that binaries
962         produced by the GreenHills toolchain can be assimilated.
964 2005-06-14  Steve Ellcey  <sje@cup.hp.com>
966         * som.c (som_find_inliner_info): New.
968 2005-06-14  H.J. Lu  <hongjiu.lu@intel.com>
970         * elflink.c (_bfd_elf_merge_symbol): Fix a typo in comment.
972 2005-06-14  Jakub Jelinek  <jakub@redhat.com>
974         * elf.c (bfd_section_from_shdr): Fail if name is NULL.
975         Prevent endless recursion on broken objects.
977         * archive.c (do_slurp_coff_armap): Check for overflows.
979 2005-06-10  Daniel Jacobowitz  <dan@codesourcery.com>
981         * elfcode.h (elf_write_relocs): Do nothing if there are no
982         relocations.
984 2005-06-10  Alan Modra  <amodra@bigpond.net.au>
986         * dwarf2.c (decode_line_info): Revert last change.  Instead set
987         initial low_pc to -1 to avoid need to test whether loc_pc has
988         been set.
990 2005-06-09  Christopher Faylor  <cgf@timesys.com>
992         * coffcode.h (sec_to_styp_flags): Set appropriate section flags when
993         either SEC_ALLOC OR SEC_LOAD.
995 2005-06-09  Christopher Faylor  <cgf@timesys.com>
997         * coffcode.h (sec_to_styp_flags): Remove read/write flags from noload
998         section header.  Do not add STYP_NOLOAD since it does not appear to be
999         a valid PE flag.
1001 2005-06-09  H.J. Lu  <hongjiu.lu@intel.com>
1003         PR 1000
1004         * dwarf2.c (lookup_address_in_line_info_table): Restore code
1005         handling NULL function info, removed with 2005-04-03 change.
1007 2005-06-08  Mark Mitchell  <mark@codesourcery.com>
1009         * opncls.c (bfd_fopen): Mark returned BFD as cacheable if FD == -1.
1011 2005-06-09  Alan Modra  <amodra@bigpond.net.au>
1013         * elflink.c (elf_mark_used_section): Delete.
1014         (bfd_elf_gc_sections): Call bfd_generic_gc_sections.
1015         * reloc.c (bfd_mark_used_section): New function.
1016         (bfd_generic_gc_sections): Call bfd_mark_used_section.
1018 2005-06-08  Alan Modra  <amodra@bigpond.net.au>
1020         * opncls.c (bfd_fopen): Don't set bfd_error unconditionally.
1021         (bfd_fdopenr): Same.
1023 2005-06-07  Mark Mitchell  <mark@codesourcery.com>
1025         * opncls.c (bfd_fdopenr): Add missing break statements.
1027 2005-06-07  Mark Mitchell  <mark@codesourcery.com>
1029         * opncls.c (bfd_fopen): New API.
1030         (bfd_openr): Use it.
1031         (bfd_fdopenr): Likewise.
1032         * bfd-in2.h: Regenerated.
1034 2005-06-07  Aldy Hernandez  <aldyh@redhat.com>
1035             Michael Snyder  <msnyder@redhat.com>
1036             Stan Cox  <scox@redhat.com>
1038         * Makefile.am (ALL_MACHINES): Add ms1 support.
1039         (ALL_MACHINES_CFILES): Same.
1040         (BFD32_BACKENDS): Same.
1041         (BFD32_BACKENDS_CFILES): Same.
1043         * Makefile.in: Regenerate.
1045         * archures.c (bfd_architecture): Add ms1 entries.
1046         Externalize bfd_ms1_arch.
1047         (bfd_archures_list): Add bfd_ms1_arch.
1049         * bfd-in2.h: Regenerate.
1051         * cpu-ms1.c: New file.
1053         * elf32-ms1.c: New file.
1055         * targets.c: Define extern of bfd_elf32_ms1_vec.
1056         Add bfd_elf32_ms1_vec to _bfd_target_vector.
1058         * configure.in: Add bfd_elf32_ms1_vec case.
1060         * configure: Regenerate.
1062         * config.bfd: Add ms1-*-elf to table.
1064 2005-06-07  Zack Weinberg  <zack@codesourcery.com>
1066         * coff-i386.c: Change md_apply_fix3 to md_apply_fix in comment.
1068 2005-06-07  Alan Modra  <amodra@bigpond.net.au>
1070         * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Init _bfd_find_line.
1071         * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
1073 2005-06-06  H.J. Lu  <hongjiu.lu@intel.com>
1075         PR 990
1076         * bfd.c (bfd_find_line): New.
1078         * dwarf2.c (comp_unit): Add variable_table.
1079         (funcinfo): Add file, line, and sec.
1080         (varinfo): New.
1081         (lookup_symbol_in_function_table): New.
1082         (lookup_symbol_in_variable_table): New.
1083         (scan_unit_for_functions): Renamed to ...
1084         (scan_unit_for_symbols): This. Handle DW_TAG_entry_point and
1085         DW_TAG_variable.
1086         (comp_unit_find_nearest_line): Updated.
1087         (comp_unit_find_line): New.
1088         (_bfd_dwarf2_find_line): New.
1090         * elf-bfd.h (_bfd_elf_find_line): New.
1091         (_bfd_generic_find_line): New. Defined.
1093         * elf.c (_bfd_elf_find_line): New.
1095         * libbfd-in.h (_bfd_dwarf2_find_line): New.
1096         (_bfd_generic_find_line): New.
1098         * bfd-in2.h: Regenerated.
1099         * libbfd.h: Likewise.
1101         * libbfd.c (_bfd_generic_find_line): New.
1103         * targets.c (BFD_JUMP_TABLE_SYMBOLS): Initialize _bfd_find_line
1104         with _bfd_generic_find_line.
1105         (bfd_target): Add _bfd_find_line.
1107 2005-06-06  H.J. Lu  <hongjiu.lu@intel.com>
1109         * dwarf2.c (decode_line_info): Properly set low_pc.
1111 2005-06-06  Alan Modra  <amodra@bigpond.net.au>
1113         * elf64-pcc.c (ppc64_elf_gc_mark_hook): For the local sym in .opd
1114         case, include addend when indexing .opd section map.
1115         (ppc64_elf_edit_opd): Add no_opd_opt param.  Do nothing besides
1116         clear opd_adjust array if no_opd_opt set.  Tidy code.
1117         Ignore zero size .opd.  Check bfd_alloc return value.
1118         (ppc_stub_name): Return immediately on bfd_malloc fail.
1119         * elf64-ppc.h (ppc64_elf_edit_opd): Update prototype.
1121 2005-06-04  H.J. Lu  <hongjiu.lu@intel.com>
1123         * dwarf2.c (comp_unit): Fix a typo in comment.
1125 2005-06-03  Jan-Benedict Glaw  <jbglaw@lug-owl.de>
1127         * elf32-vax.c (rtype_to_howto): Remove PARAMS.
1128         (reloc_type_lookup): Dito.
1129         (elf_vax_discard_copies): Dito.
1130         (elf_vax_instantiate_got_entries): Dito.
1131         (elf_vax_link_hash_traverse): Dito.
1132         (elf_vax_link_hash_newfunc): Dito.
1133         (elf_vax_link_hash_table_create): Dito.
1134         (elf32_vax_set_private_flags): Dito.
1135         (elf32_vax_merge_private_bfd_data): Dito.
1136         (elf32_vax_print_private_bfd_data): Dito.
1137         (elf_vax_check_relocs): Dito.
1138         (elf_vax_gc_mark_hook): Dito.
1139         (elf_vax_gc_sweep_hook): Dito.
1140         (elf_vax_size_dynamic_sections): Dito.
1141         (elf_vax_discard_copies): Dito.
1142         (elf_vax_instantiate_got_entries): Dito.
1143         (elf_vax_relocate_section): Dito.
1144         (elf_vax_finish_dynamic_symbol): Dito.
1145         (elf_vax_finish_dynamic_sections): Dito.
1146         (elf_vax_hash_table): Break-up of line isn't needed.
1147         (elf_vax_check_relocs): Remove leading whitespace
1148         (elf_vax_relocate_section): Remove redundant whitespace
1149         (elf_vax_link_hash_newfunc): Don't cast NULL.
1150         (elf_vax_link_hash_table_create): Dito.
1151         * cpu-vax.c (bfd_vax_arch) Remove a trailing space.
1153 2005-06-03  Alan Modra  <amodra@bigpond.net.au>
1155         PR 568
1156         * configure.in: Bump version
1157         * configure: Regenerate.
1158         * elflink.c (elf_link_input_bfd): Use einfo linker callback to print
1159         discarded section sym refs and kill linker output.
1160         * simple.c (simple_dummy_einfo): New function.
1161         (bfd_simple_get_relocated_section_contents): Init callbacks.einfo.
1163         * elf32-i386.c (elf_i386_relocate_section): Handle zero symndx
1164         for all reloc types.
1166 2005-06-02  Alan Modra  <amodra@bigpond.net.au>
1168         * elf64-ppc.c (add_symbol_adjust): Set sym visibility to most
1169         restrictive of func code and func descr for undefined syms as well
1170         as defined.
1172 2005-05-31  Jim Blandy  <jimb@redhat.com>
1174         * Makefile.am: Regenerate dependencies with 'make dep-am'.
1175         * Makefile.in: Regenerate.
1177 2005-05-31  Richard Henderson  <rth@redhat.com>
1179         * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_JSRDIRECT): New.
1180         (ALPHA_ELF_LINK_HASH_TLS_IE): Renumber to 0x80.
1181         (ALPHA_ELF_LINK_HASH_LU_PLT): Rename from ALPHA_ELF_LINK_HASH_LU_FUNC.
1182         (elf64_alpha_want_plt): Update to match.
1183         (elf64_alpha_check_relocs): Collect JSRDIRECT in gotent_flags.
1184         (elf64_alpha_relax_with_lituse): Likewise.  Handle JSRDIRECT.
1186 2005-05-31  Zack Weinberg  <zack@codesourcery.com>
1188         * elf32-arm.c (elf32_arm_reloc_type_lookup)
1189         (elf32_arm_nabi_grok_prstatus, elf32_arm_nabi_grok_psinfo):
1190         Use ISO C90 function declaration style.
1192 2005-05-31  James E Wilson  <wilson@specifixinc.com>
1194         * elfcode.h (NAME(bfd_elf,bfd_from_remote_memory)): Check for program
1195         header PF_R flag on PT_LOAD segments.
1197 2005-05-30  Richard Henderson  <rth@redhat.com>
1199         * elf64-alpha.c (elf64_alpha_relocate_section): Use dtp_base for
1200         the zero index relocs produced by elf64_alpha_relax_tls_get_addr.
1202 2005-05-29  Richard Henderson  <rth@redhat.com>
1204         * configure.in (--enable-secureplt): New.
1205         * elf64-alpha.c (INSN_LDA, INSN_LDAH, INSN_LDQ, INSN_BR): New.
1206         (INSN_SUBQ, INSN_S4SUBQ, INSN_JMP): New.
1207         (INSN_A, INSN_AB, INSN_ABC, INSN_ABO, INSN_AD): New.
1208         (elf64_alpha_use_secureplt): New.
1209         (OLD_PLT_HEADER_SIZE, OLD_PLT_ENTRY_SIZE): New.
1210         (NEW_PLT_HEADER_SIZE, NEW_PLT_ENTRY_SIZE): New.
1211         (PLT_HEADER_SIZE, PLT_ENTRY_SIZE): Conditionalize on secureplt.
1212         (ALPHA_ELF_LINK_HASH_PLT_LOC): Remove.
1213         (struct alpha_elf_link_hash_entry): Add plt_offset.
1214         (PLT_HEADER_WORD1, PLT_HEADER_WORD2, PLT_HEADER_WORD3): Remove.
1215         (PLT_HEADER_WORD4, PLT_ENTRY_WORD1, PLT_ENTRY_WORD2): Remove.
1216         (PLT_ENTRY_WORD3): Remove.
1217         (elf64_alpha_create_dynamic_sections): If secureplt, set SEC_READONLY
1218         on .plt and create .got.plt.
1219         (elf64_alpha_output_extsym): Remove .plt frobbing for symbol values.
1220         (get_got_entry): Initialize plt_offset.
1221         (elf64_alpha_want_plt): New.
1222         (elf64_alpha_check_relocs): Use it.
1223         (elf64_alpha_adjust_dynamic_symbol): Likewise.  Don't allocate
1224         plt entries here.
1225         (elf64_alpha_calc_got_offsets_for_symbol): Don't report internal
1226         error as user error.
1227         (elf64_alpha_size_plt_section_1): Allocate one plt entry per
1228         got subsection.
1229         (elf64_alpha_size_plt_section): Size .got.plt section.
1230         (elf64_alpha_size_rela_got_1): Don't allocate relocations if
1231         plt entries used.
1232         (elf64_alpha_size_dynamic_sections): Call elf64_alpha_size_plt_section.
1233         Add PLTRO DYNAMIC entry.
1234         (elf64_alpha_finish_dynamic_symbol): Generate secureplt format.
1235         (elf64_alpha_finish_dynamic_sections): Likewise.
1237 2005-05-28  David Daney  <ddaney@avtrex.com>
1239         * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections):  Move
1240         calculation of DT_RELSZ to occur after all dynamic relocations
1241         are created.
1243 2005-05-28  Eli Zaretskii  <eliz@gnu.org>
1245         * configure.in: Add snprintf and vsnprintf to AC_CHECK_DECLS.
1246         * config.in, configure: Regenerate.
1248 2005-05-26  Mark Kettenis  <kettenis@gnu.org>
1249             Maciej W. Rozycki  <macro@linux-mips.org>
1251         * elfxx-mips.c (_bfd_mips_elf_section_processing): Warn and
1252         stop processing of options if one of invalid size is
1253         encountered.
1254         (_bfd_mips_elf_section_from_shdr): Likewise.
1255         (_bfd_mips_elf_fake_sections): Reset the type of empty special
1256         sections.
1258 2005-05-26  Richard Henderson  <rth@redhat.com>
1260         * elf64-alpha.c (struct alpha_elf_link_hash_entry): Remove
1261         plt_old_section, plt_old_value.
1262         (elf64_alpha_adjust_dynamic_symbol): Don't set it.
1263         (elf64_alpha_size_plt_section_1): Don't use it.
1265 2005-05-26  Jakub Jelinek  <jakub@redhat.com>
1267         * elfcode.h (elf_object_p): Fail if e_shoff != 0, e_shnum == 0 and
1268         first shdr has sh_size == 0.  Fail if e_shnum is large to cause
1269         arithmetic overflow when allocating the i_shdr array.
1270         Sanity check sh_link and sh_info fields.  Fix e_shstrndx sanity check.
1272 2005-05-25  Richard Henderson  <rth@redhat.com>
1274         * elf64-alpha.c: Update all function definitions to ISO C.  Remove
1275         all function prototypes; rearrange functions into def-use order.
1277 2005-05-25  Richard Henderson  <rth@redhat.com>
1279         * elf64-alpha.c (elf64_alpha_merge_gots): Fix gotent iteration
1280         in the presence of deleting elements.
1281         (elf64_alpha_size_got_sections): Zero dead got section size.
1283 2005-05-23  Fred Fish  <fnf@specifixinc.com>
1285         * dwarf2.c (struct dwarf2_debug): Add inliner_chain member.
1286         (struct funcinfo): Add caller_func, caller_file, caller_line.
1287         tag, and nesting_level members.
1288         (lookup_address_in_function_table): Change first passed parameter
1289         from "struct funcinfo *" to "struct comp_unit *".
1290         (lookup_address_in_function_table): Dereference unit to find function
1291         table.
1292         (lookup_address_in_function_table): Traverse the function list to
1293         create a chain of inlined functions back to the first non inlined
1294         function.
1295         (scan_unit_for_functions): Remember tag and nesting level.  Handle
1296         DW_AT_call_file and DW_AT_call_line.
1297         (comp_unit_find_nearest_line): Adjust lookup_address_in_function_table
1298         call to pass unit pointer instead of function table pointer.  For
1299         inlined functions, save pointer to the inliner chain.
1300         (_bfd_dwarf2_find_nearest_line): Initialize inliner_chain to NULL.
1301         (_bfd_dwarf2_find_inliner_info): New function that returns information
1302         from the inliner chain after a call to bfd_find_nearest_line.
1304         * bfd.c (bfd_find_inliner_info): Define using BFD_SEND.
1305         * targets.c (BFD_JUMP_TABLE_SYMBOLS): Add entry for
1306         NAME##_find_inliner_info.
1307         (bfd_target): Add _bfd_find_inliner_info.
1308         * bfd-in2.h: Regenerate.
1310         * libbfd-in.h (_bfd_nosymbols_find_inliner_info): Define as
1311         macro that always returns bfd_false.
1312         (_bfd_dwarf2_find_inliner_info): Declare.
1313         * libbfd.h: Regenerate.
1315         * elf32-arm.c (elf32_arm_find_inliner_info): New function
1316         that calls _bfd_dwarf2_find_inliner_info.
1317         (bfd_elf32_find_inliner_info): Define to elf32_arm_find_inliner_info.
1319         * elfxx-mips.c (_bfd_mips_elf_find_inliner_info): New function
1320         that calls _bfd_dwarf2_find_inliner_info.
1321         * elfxx-mips.h (_bfd_mips_elf_find_inliner_info): Declare.
1322         * elfn32-mips.c (bfd_elf32_find_inliner_info): Define to
1323         _bfd_mips_elf_find_inliner_info.
1324         * elf64-mips.c (bfd_elf64_find_inliner_info): Ditto.
1325         * elf32-mips.c (bfd_elf32_find_inliner_info): Ditto.
1327         * elf.c (_bfd_elf_find_inliner_info): New function that calls
1328         _bfd_dwarf2_find_inliner_info.
1329         * elf-bfd.h (_bfd_elf_find_inliner_info): Declare.
1330         * elfxx-target.h (bfd_elfNN_find_inliner_info): Define to
1331         _bfd_elf_find_inliner_info.
1333         * coffgen.c (coff_find_inliner_info): New function that
1334         calls _bfd_dwarf2_find_inliner_info.
1335         * libcoff-in.h (coff_find_inliner_info): Declare.
1336         * libcoff.h: Regenerate.
1337         * coff-rs6000.c (rs6000coff_vec): Add coff_find_inliner_info.
1338         (pmac_xcoff_vec) Ditto.
1339         * coff64-rs6000.c (rs6000coff64_vec): Ditto.
1340         (aix5coff64_vec): Ditto.
1342         * aout-target.h (MY_find_inliner_info): Define as
1343         _bfd_nosymbols_find_inliner_info.
1344         * aout-tic30.c (MY_find_inliner_info): Ditto.
1345         * binary.c (binary_find_inliner_info): Ditto.
1346         * i386msdos.c (msdos_find_inliner_info): Ditto.
1347         * ihex.c (ihex_find_inliner_info): Ditto.
1348         * libaout.h (aout_32_find_inliner_info): Ditto.
1349         * libecoff.h (_bfd_ecoff_find_inliner_info): Ditto.
1350         * mach-o.c (bfd_mach_o_find_inliner_info): Ditto.
1351         * mmo.c (mmo_find_inliner_info): Ditto.
1352         * nlm-target.h (nlm_find_inliner_info): Ditto.
1353         * pef.c (bfd_pef_find_inliner_info): Ditto.
1354         * ppcboot.c (ppcboot_find_inliner_info): Ditto.
1355         * srec.c (srec_find_inliner_info): Ditto.
1356         * tekhex.c (tekhex_find_inliner_info): Ditto.
1357         * versados.c (versados_find_inliner_info): Ditto.
1358         * xsym.c (bfd_sym_find_inliner_info): Ditto.
1360         * ieee.c (ieee_find_inliner_info): New function that always
1361         returns FALSE.
1362         * oasys.c (oasys_find_inliner_info): Ditto.
1363         * vms.c (vms_find_inliner_info): Ditto.
1365 2005-05-24  Alan Modra  <amodra@bigpond.net.au>
1367         * elf32-ppc.c (ppc_elf_check_relocs): For old gcc -fPIC code
1368         force old plt layout.
1370 2005-05-22  Richard Henderson  <rth@redhat.com>
1372         * elf64-alpha.c (elf64_alpha_relax_section): Ignore non-allocated
1373         sections.
1374         (elf64_alpha_check_relocs): Likewise.
1375         (elf64_alpha_relocate_section): Don't emit dynamic relocations to
1376         non-allocated sections.
1378 2005-05-22  Richard Henderson  <rth@redhat.com>
1380         * elf64-alpha.c (elf64_alpha_relax_with_lituse): Relax jsr to
1381         undefweak to use zero register.  Call elf64_alpha_relax_got_load
1382         if not all uses removed.
1383         (elf64_alpha_relax_got_load): Relax undefweak to lda zero.
1384         (elf64_alpha_relax_section): Handle undefweak symbols.
1385         (elf64_alpha_calc_dynrel_sizes): Don't add relocs for undefweak.
1386         (elf64_alpha_size_rela_got_1): Likewise.
1387         (elf64_alpha_relocate_section): Likewise.
1389 2005-05-22  Richard Henderson  <rth@redhat.com>
1391         * elf64-alpha.c (elf64_alpha_relax_section): Only operate
1392         on SEC_CODE sections.
1394 2005-05-22  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
1396         * som.c (try_prev_fixup): Changed type of subspace_reloc_sizep to
1397         unsigned int *.
1398         (som_write_space_strings): Change type of tmp_space and p to char *.
1399         (som_write_symbol_strings): Likewise.  Also change type of comp to
1400         char *comp[4].
1401         (som_begin_writing): Change type of strings_size to unsigned int.
1402         (som_finish_writing): Likewise.
1403         (som_slurp_reloc_table): Change type of external_relocs to unsigned
1404         char *.
1405         * som.h (struct som_section_data_struct): Change type of reloc_stream
1406         field to unsigned char *.
1408 2005-05-20  Daniel Jacobowitz  <dan@codesourcery.com>
1410         * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Don't eliminate
1411         copy relocations for VxWorks.
1413 2005-05-20  Daniel Jacobowitz  <dan@codesourcery.com>
1415         * bfd/elf32-ppc.c (struct ppc_elf_link_hash_entry): Add new field
1416         has_sda_refs.
1417         (ppc_elf_copy_indirect_symbol): Copy has_sda_refs.
1418         (ppc_elf_check_relocs): Set has_sda_refs.
1419         (ppc_elf_adjust_dynamic_symbol): Check has_sda_refs before eliminating
1420         copy relocations.  Use has_sda_refs to place variables in .sbss.
1421         (ppc_elf_finish_dynamic_symbol): Use has_sda_refs to place variables in
1422         .sbss.
1424 2005-05-20  Bob Wilson  <bob.wilson@acm.org>
1426         * elf32-xtensa.c (bfd_elf_xtensa_reloc): Make sure that
1427         xtensa_default_isa is initialized.
1429 2005-05-20  Alan Modra  <amodra@bigpond.net.au>
1431         * elf32-ppc.c (allocate_dynrelocs): Correct plt offset assigned
1432         for second and subsequent list entries.  Only allocate multiple
1433         glink stubs when shared or pie.
1434         (ppc_elf_finish_dynamic_symbol): Break out early when only one
1435         glink stub is needed.
1437 2005-05-19  Zack Weinberg  <zack@codesourcery.com>
1439         * Makefile.am: Have 'all' depend on 'info'.
1440         * Makefile.in: Regenerate.
1442 2005-05-19  Alan Modra  <amodra@bigpond.net.au>
1444         * elf-bfd.h (struct elf_link_hash_table): Delete init_refcount and
1445         init_offset.  Add init_got_refcount, init_plt_refcount,
1446         init_got_offset and init_plt_offset.
1447         * elf.c (_bfd_elf_link_hash_newfunc): Adjust for above change.
1448         (_bfd_elf_link_hash_hide_symbol): Likewise.
1449         (_bfd_elf_link_hash_table_init): Likewise.
1450         * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
1451         * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
1452         * elflink.c (_bfd_elf_adjust_dynamic_symbol): Likewise.
1453         (bfd_elf_size_dynamic_sections): Likewise.
1454         * elf32-ppc.c (GLINK_PLTRESOLVE): Now 16 insns.
1455         (LWZU_0_X_12, LWZ_0_4_30, LWZ_0_X_12, LWZ_11_X_11, LWZ_11_X_30,
1456         LWZ_12_4_12, LWZ_12_8_30, LWZ_12_X_12, SUB_11_11_30): Delete.
1457         (ADDIS_12_12, BCL_20_31, LWZU_0_12, LWZ_0_12, LWZ_11_11, LWZ_11_30,
1458         LWZ_12_12, MFLR_0, MFLR_12, MTLR_0, SUB_11_11_12): Define.
1459         (struct plt_entry): New.
1460         (ppc_elf_link_hash_table_create): Set new init_plt fields.
1461         (ppc_elf_copy_indirect_symbol): Handle merge of plt plist.  Don't
1462         use _bfd_elf_link_hash_copy_indirect.
1463         (update_plt_info, find_plt_ent): New functions.
1464         (ppc_elf_check_relocs): Handle R_PPC_PLTREL24 with non-zero addend
1465         and adjust for use of plt list rather than refcount.
1466         (ppc_elf_gc_sweep_hook): Likewise.
1467         (ppc_elf_tls_optimize): Likewise.
1468         (ppc_elf_adjust_dynamic_symbol): Likewise.
1469         (allocate_dynrelocs): Likewise.
1470         (ppc_elf_relax_section): Likewise.
1471         (ppc_elf_relocate_section): Likewise.  Adjust R_PPC_PLTREL24 addends
1472         when performing a relocatable link.
1473         (ppc_elf_finish_dynamic_symbol): Likewise.  Write .glink stubs here..
1474         (ppc_elf_finish_dynamic_sections): ..rather than here.  Use new
1475         pic resolver stub.
1477 2005-05-19  Alan Modra  <amodra@bigpond.net.au>
1479         * elf.c (assign_file_positions_for_segments): Use maximum of
1480         maxpagesize and section alignment when adjusting initial
1481         segment offset and section offsets.
1483 2005-05-18  Zack Weinberg  <zack@codesourcery.com>
1485         * elf32-arm.c: Make all #ifndef OLD_ARM_ABI blocks
1486         unconditional.
1488 2005-05-18  H.J. Lu  <hongjiu.lu@intel.com>
1490         * elf.c (group_signature): Undo the last change. Check if the
1491         symbol table section is correct.
1493 2005-05-17  Zack Weinberg  <zack@codesourcery.com>
1495         * elf32-arm.c: Wherever possible, use official reloc names
1496         from AAELF.
1497         (elf32_arm_howto_table, elf32_arm_tls_gd32_howto)
1498         (elf32_arm_tls_ldo32_howto, elf32_arm_tls_ldm32_howto)
1499         (elf32_arm_tls_le32_howto, elf32_arm_tls_ie32_howto)
1500         (elf32_arm_vtinherit_howto, elf32_arm_vtentry_howto)
1501         (elf32_arm_pc11_howto, elf32_arm_thm_pc9_howto, elf32_arm_got_prel)
1502         (elf32_arm_r_howto): Replace with elf32_arm_howto_table_1,
1503         elf32_arm_howto_table_2, and elf32_arm_howto_table_3.
1504         Add many new relocations from AAELF.
1505         (elf32_arm_howto_from_type): Update to match.
1506         (elf32_arm_reloc_map): Add entries for R_ARM_THM_JUMP24,
1507         R_ARM_THM_JUMP11, R_ARM_THM_JUMP19, R_ARM_THM_JUMP8,
1508         R_ARM_THM_JUMP6, R_ARM_GNU_VTINHERIT, and R_ARM_GNU_VTENTRY.
1509         (elf32_arm_reloc_type_lookup): Use elf32_arm_howto_from_type.
1510         (elf32_arm_final_link_relocate): Add support for
1511         R_ARM_THM_JUMP24, R_ARM_THM_JUMP19, R_ARM_THM_JUMP6.  Remove
1512         case entries redundant with default.
1514         * reloc.c: Reorganize ARM relocations.  Add Thumb
1515         assembler-internal relocations BFD_RELOC_ARM_T32_OFFSET_U8,
1516         BFD_RELOC_ARM_T32_OFFSET_IMM, BFD_RELOC_ARM_T32_IMMEDIATE.
1517         Add visible relocations BFD_RELOC_THUMB_PCREL_BRANCH7,
1518         BFD_RELOC_THUMB_BRANCH20, BFD_RELOC_THUMB_BRANCH25.
1519         Delete unused relocations BFD_RELOC_ARM_GOT12, BFD_RELOC_ARM_COPY.
1520         * bfd-in2.h, libbfd.h: Regenerate.
1522 2005-05-17  Daniel Jacobowitz  <dan@codesourcery.com>
1524         * elf.c (_bfd_elf_write_object_contents): Check for non-NULL
1525         elf_shstrtab.
1526         * format.c (bfd_check_format_matches): Set output_has_begun
1527         for both_direction.
1528         * section.c (bfd_set_section_contents): Use bfd_write_p.  Remove
1529         special case for both_direction.
1531 2005-05-17  Nick Clifton  <nickc@redhat.com>
1533         * elf.c (group_signature): Check for a group section which is
1534         actually a (corrupt) symbol table section in disguise and prevent
1535         an infinite loop from occurring.
1537 2005-05-17  H.J. Lu  <hongjiu.lu@intel.com>
1539         * elfxx-ia64.c (elfNN_ia64_relax_brl): Undo the change made on
1540         2005-02-16.
1542 2005-05-17  H.J. Lu  <hongjiu.lu@intel.com>
1544         * elfxx-ia64.c (elfNN_ia64_relax_br): Keep the original
1545         predicate on slot 0 only if slot 0 isn't br.
1547 2005-05-17  H.J. Lu  <hongjiu.lu@intel.com>
1549         PR 797
1550         * elf32-i386.c (elf_i386_size_dynamic_sections): Also remove
1551         empty sdynbss section.
1552         * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections): Likewise.
1554 2005-05-17  Tavis Ormandy <taviso@gentoo.org>
1556         * elf.c (bfd_section_from_shdr): Add sanity check when parsing
1557         dynamic sections.
1559 2005-05-17  Alan Modra  <amodra@bigpond.net.au>
1561         * elf32-ppc.c (LIS_11. LIS_12): Define.
1562         (LWZU_0_X_12, LWZ_0_X_12, LWZ_12_4_12, LWZ_12_X_12): Define.
1563         (ppc_elf_finish_dynamic_sections): Provide non-pic plt call stub
1564         for --data-plt when building non-pie executables.
1566 2005-05-17  Nick Clifton  <nickc@redhat.com>
1568         * elf32-arm.c (elf32_arm_final_link_relocate): Gracefully handle
1569         the situation where a symbols's section is not known but a section
1570         relative R_ARM_RELATIVE reloc has to be generated for the Symbian
1571         OS.
1573         * elf32-v850.c (v850_elf_relocate_section): Move code to test for
1574         the presence of a symbol table to just before the symbol table is
1575         actually used.
1577 2005-05-16  H.J. Lu  <hongjiu.lu@intel.com>
1579         PR 834
1580         * elfxx-ia64.c (elfNN_ia64_relax_br): New.
1581         (elfNN_ia64_relax_section): Use it.
1583 2005-05-14  Mark Kettenis  <kettenis@gnu.org>
1585         * elflink.c (bfd_elf_size_dynamic_sections): Use lbasename instead
1586         of basename.
1588 2005-05-14  Alan Modra  <amodra@bigpond.net.au>
1590         * elf32-ppc.c (ppc_elf_size_dynamic_sections): Set DT_PPC_GOT,
1591         not DT_PPC_GLINK.
1592         (ppc_elf_finish_dynamic_sections): Likewise.
1594 2005-05-13  Fred Fish  <fnf@specifixinc.com>
1596         * libbfd-in.h: Fix a comment typo, 'neaderst' -> 'nearest'
1597         * libbfd.h: Rebuilt.
1599 2005-05-13  Bob Wilson  <bob.wilson@acm.org>
1601         * elf32-xtensa.c (xtensa_get_property_section_name): Add missing
1602         periods in linkonce_kind values.
1604 2005-05-12  H.J. Lu  <hongjiu.lu@intel.com>
1606         * elf32-i386.c (elf_i386_relocate_section): Allow R_386_GOTOFF
1607         against protected function when building executable.
1609 2005-05-12  Alan Modra  <amodra@bigpond.net.au>
1611         * elf32-ppc.c (LWZU_0_X_11): Delete.
1612         (B, LWZ_11_X_11, LWZ_11_X_30, MTCTR_11): Define.
1613         (ppc_elf_select_plt_layout): Set .got flags too.  Formatting.
1614         (ppc_elf_size_dynamic_sections): Allocate space for .glink branch
1615         table.
1616         (ppc_elf_finish_dynamic_symbol): Point .plt entries into the branch
1617         table.
1618         (ppc_elf_finish_dynamic_sections): Adjust DT_PPC_GLINK value.
1619         Generate .glink branch table and updated stubs.
1621 2005-05-11  Alan Modra  <amodra@bigpond.net.au>
1623         * reloc.c (BFD_RELOC_HI16_PCREL): Define.
1624         (BFD_RELOC_HI16_S_PCREL, BFD_RELOC_LO16_PCREL): Define.
1625         * elf32-ppc.c (GLINK_PLTRESOLVE, GLINK_ENTRY_SIZE): Define.
1626         (CROR_151515, CROR_313131): Delete.
1627         (ADDIS_11_11, ADDI_11_11, SUB_11_11_30, ADD_0_11_11, ADD_11_0_11,
1628         LWZ_0_4_30, MTCTR_0, LWZ_12_8_30, BCTR, ADDIS_11_30,
1629         LWZU_0_X_11): Define.
1630         (ppc_elf_howto_raw): Add R_PPC_REL16, R_PPC_REL16_LO, R_PPC_REL16_HI
1631         and R_PPC_REL16_HA entries.
1632         (ppc_elf_reloc_type_lookup): Convert new bfd reloc types.
1633         (ppc_elf_addr16_ha_reloc): Also handle R_PPC_REL16_HA.
1634         (struct ppc_elf_link_hash_table): Add glink, glink_pltresolve,
1635         new_plt, and old_plt.
1636         (ppc_elf_create_dynamic_sections): Create .glink section.
1637         (ppc_elf_check_relocs): Set new_plt and old_plt.
1638         (ppc_elf_select_plt_layout): New function.
1639         (ppc_elf_tls_setup): Set plt output section elf type and flags.
1640         (allocate_got): Handle differences between old and new got layout.
1641         (allocate_dynrelocs): Likewise for plt.
1642         (ppc_elf_size_dynamic_sections): Likewise.  Allocate memory for
1643         .glink.  Don't allocate memory for old bss .plt.  Emit DT_PPC_GLINK.
1644         (ppc_elf_relax_section): Rename ppc_info to htab.  Handle .glink
1645         destination of R_PPC_PLTREL24 relocs.
1646         (ppc_elf_relocate_section): Handle new relocs and changed destination
1647         of R_PPC_PLTREL24.
1648         (ppc_elf_finish_dynamic_symbol): Init new style plt and handle
1649         differences in layout.
1650         (ppc_elf_finish_dynamic_sections): Set DT_PPC_GLINK value.  Don't
1651         put a blrl in new got.  Write glink contents.
1652         * elf32-ppc.h (ppc_elf_select_plt_layout): Declare.
1653         * libbfd.h: Regenerate.
1654         * bfd-in2.h: Regenerate.
1656 2005-05-11  Andreas Schwab  <schwab@suse.de>
1658         * elf32-i386.c (elf_i386_finish_dynamic_sections): Fix signedness
1659         warning.
1661 2005-05-10  H.J. Lu  <hongjiu.lu@intel.com>
1663         * elf.c (_bfd_elf_make_section_from_shdr): Only check debug
1664         section if SEC_ALLOC isn't set.
1666 2005-05-09  Kelley Cook  <kcook@gcc.gnu.org>
1668         * configure.in: Replace AC_COMPILE_CHECK_SIZEOF with AC_CHECK_SIZEOF.
1669         * acinclude.m4: Don't sinclude accross.m4.
1670         * config.in, configure, Makefile.in, doc/Makefile.in: Regenerate.
1672 2005-05-09  Alan Modra  <amodra@bigpond.net.au>
1674         * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add has_dotsym.
1675         (ppc64_elf_add_symbol_hook): Set has_dotsym.
1676         (ppc64_elf_check_directives): Only process syms when has_dotsym.
1677         (func_desc_adjust): Hide fake function descriptors when function
1678         code entry is defined.
1679         (adjust_opd_syms): Adjust for deleted_section becoming union field.
1681 2005-05-09  Alan Modra  <amodra@bigpond.net.au>
1683         * elfcode.h (elf_object_p): Add more sanity checks on elf header.
1685 2005-05-08  Dave Korn   <dave.korn@artimi.com>
1687         * coff-tic80.c:  Undefine _CONST after system headers to prevent
1688         clash with tic80-specific definition in include/coff/tic80.h
1690 2005-05-08  H.J. Lu  <hongjiu.lu@intel.com>
1692         PR 939
1693         * elflink.c (elf_link_output_extsym): Use output_bfd if
1694         h->root.u.def.section is bfd_abs_section_ptr when reporting
1695         error.
1697 2005-05-07  H.J. Lu  <hongjiu.lu@intel.com>
1699         * elf-bfd.h (elf_backend_data): Update special_sections to
1700         array of pointer to bfd_elf_special_section.
1701         * elf.c (special_sections): Likewise.
1702         * elf32-arm.c (elf32_arm_symbian_special_sections): Likewise.
1703         * elf32-m32r.c (m32r_elf_special_sections): Likewise.
1704         * elf32-m68hc11.c (elf32_m68hc11_special_sections): Likewise.
1705         * elf32-m68hc12.c (elf32_m68hc12_special_sections): Likewise.
1706         * elf32-mcore.c (mcore_elf_special_sections): Likewise.
1707         * elf32-ppc.c (ppc_elf_special_sections): Likewise.
1708         * elf32-sh64.c (sh64_elf_special_sections): Likewise.
1709         * elf32-v850.c (v850_elf_special_sections): Likewise.
1710         * elf32-xtensa.c (elf_xtensa_special_sections): Likewise.
1711         * elf64-alpha.c (elf64_alpha_special_sections): Likewise.
1712         * elf64-hppa.c (elf64_hppa_special_sections): Likewise.
1713         * elf64-ppc.c (ppc64_elf_special_sections): Likewise.
1714         * elf64-sh64.c (sh64_elf64_special_sections): Likewise.
1715         * elfxx-ia64.c (elfNN_ia64_special_sections): Likewise.
1716         * elfxx-mips.c (_bfd_mips_elf_special_sections): Likewise.
1717         * elfxx-mips.h (_bfd_mips_elf_special_sections): Likewise.
1719         * elf.c (get_special_section): Updated.
1721 2005-05-07  Alan Modra  <amodra@bigpond.net.au>
1723         * elf-bfd.h (struct elf_backend_data): Remove got_symbol_offset.
1724         * elfxx-target.h (elf_backend_got_symbol_offset): Delete.
1725         * elflink.c (_bfd_elf_create_got_section): Use zero in place of
1726         got_symbol_offset.
1727         * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Likewise.
1728         * elf32-frv.c (_frv_create_got_section): Likewise.
1729         * elf32-i370.c (i370_elf_finish_dynamic_sections): Delete ppc code.
1730         (elf_backend_got_symbol_offset): Don't define.
1731         * elf64-ppc.c (elf_backend_got_symbol_offset): Don't define.
1732         * elf32-ppc.c (struct ppc_elf_link_hash_table): Add got_header_size
1733         and got_gap.
1734         (ppc_elf_create_got): Tidy.
1735         (ppc_elf_create_dynamic_sections): Don't set SEC_IN_MEMORY for .plt.
1736         (ppc_elf_check_relocs): Reduce string comparisons by using elf.hgot.
1737         (ppc_elf_gc_sweep_hook): Likewise.
1738         (ppc_elf_relocate_section): Likewise.
1739         (ppc_elf_finish_dynamic_symbol): Likewise.
1740         (allocate_got): New function.
1741         (allocate_dynrelocs): Use allocate_got.
1742         (ppc_elf_size_dynamic_sections): Likewise.  Delay tlsld_got allocation
1743         so that local got can refcount it.  Set got_header_size.
1744         (ppc_elf_relocate_section): Use value of elf.hgot rather than hard-
1745         coded 4.
1746         (ppc_elf_finish_dynamic_sections): Likewise.
1747         (elf_backend_got_symbol_offset): Don't define.
1748         (elf_backend_got_header_size): Ditto.
1750 2005-05-05  Steve Ellcey  <sje@cup.hp.com>
1752         * configure.in (ACX_HEADER_STRING): New.
1753         * configure: Regenerate.
1754         * config.in: Regenerate.
1755         * sysdep.h (STRING_WITH_STRINGS): Use.
1757 2005-05-05  H.J. Lu  <hongjiu.lu@intel.com>
1759         * elf.c (_bfd_elf_close_and_cleanup): Only call
1760         _bfd_dwarf2_cleanup_debug_info on bfd_object.
1762 2005-05-05  H.J. Lu  <hongjiu.lu@intel.com>
1764         * elflink.c (_bfd_elf_provide_section_bound_symbols): Use
1765         "__bss_start" instead of "_edata" as fallback.
1767 2005-05-05  H.J. Lu  <hongjiu.lu@intel.com>
1769         * bfd-in2.h: Regenerated.
1771 2005-05-05  Paul Brook  <paul@codesourcery.com>
1773         * config.bfd: Use bfd_elf32_i386_vxworks_vec for i?86-*-vxworks.
1774         * configure.in: Add bfd_elf32_i386_vxworks_vec. i386 targets need
1775         elf-vxworks.lo.
1776         * configure: Regenerate.
1777         * Makefile.am (BFD32_BACKENDS): Add elf-vxworks.lo.
1778         (BFD32_BACKENDS_CFILES): Add elf-vxworks.c.
1779         (elf32-i386.lo): Depend on elf-vxworks.h.
1780         (elf-vxworks.lo): New rule.
1781         * Makefile.in: Regenerate.
1782         * elf-bfd.h (elf_backend_data): Update type of
1783         elf_backend_emit_relocs.
1784         (_bfd_elf_link_output_relocs): Update prototype.
1785         * elflink.c (_bfd_elf_link_output_relocs): Always use
1786         bed->elf_backend_emit_relocs when outputting relocations.
1787         * elfxx-target.h (elf_backend_emit_relocs): Default to
1788         _bfd_elf_link_output_relocs.
1789         * targets.c (bfd_elf32_i386_vxworks_vec): Declare.
1790         (_bfd_target_vector): Add bfd_elf32_i386_vxworks_vec.
1791         * elf32-i386.c: Add elf32-i386-vxworks target BFD.
1792         (elf_i386_plt0_entry): Remove padding.
1793         (elf_i386_pic_plt0_entry): Ditto.
1794         (PLTRESOLVE_RELOCS_SHLIB, PLTRESOLVE_RELOCS): Define.
1795         (PLT_NON_JUMP_SLOT_RELOCS): Define.
1796         (elf_i386_link_hash_table): Add srelplt2, hgot, hplt, is_vxworks and
1797         plt0_pad_byte fields.
1798         (elf_i386_link_hash_table_create): Zero them.
1799         (elf_i386_create_dynamic_sections): Create static relocation section.
1800         (allocate_dynrelocs): Allocate space for static PLT relocations.
1801         (elf_i386_size_dynamic_sections): Save shortcuts to PLT and GOT
1802         symbols.  Give PLT symbols function type.  Don't strip PLT sections
1803         if we have exported symbols from them.
1804         (elf_i386_finish_dynamic_symbol): Fill in VxWorks PLT static
1805         relocation section.  Don't mark _GLOBAL_OFFSET_TABLE_ as absolute on
1806         VxWorks.
1807         (elf_i386_finish_dynamic_sections): Allow different pad bytes.
1808         Add relocation for GOT location.  Fill in PLT static relocations.
1809         (elf_i386_vxworks_link_hash_table_create): New function.
1810         (elf_i386_vxworks_link_output_symbol_hook): New function.
1811         * elf-vxworks.h: New file.
1813 2005-05-05  H.J. Lu  <hongjiu.lu@intel.com>
1815         * section.c (bfd_make_section_anyway_with_flags): New.
1816         (bfd_make_section_anyway): Call bfd_make_section_anyway_with_flags,
1817         (bfd_make_section_with_flags): New.
1818         (bfd_make_section): Call bfd_make_section_with_flags.
1820         * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Call
1821         bfd_make_section_with_flags/bfd_make_section_anyway_with_flags
1822         instead of bfd_make_section/bfd_make_section and don't call
1823         bfd_set_section_flags.
1824         (mn10300_elf_check_relocs): Likewise.
1825         (_bfd_mn10300_elf_create_dynamic_sections): Likewise.
1826         * elf32-arm.c (create_got_section): Likewise.
1827         (bfd_elf32_arm_add_glue_sections_to_bfd): Likewise.
1828         (elf32_arm_check_relocs): Likewise.
1829         * elf32-cris.c (cris_elf_check_relocs): Likewise.
1830         * elf32-frv.c (elf32_frv_add_symbol_hook): Likewise.
1831         (_frv_create_got_section): Likewise.
1832         (elf32_frvfdpic_create_dynamic_sections): Likewise.
1833         * elf32-hppa.c (elf32_hppa_create_dynamic_sections): Likewise.
1834         (elf32_hppa_check_relocs): Likewise.
1835         * elf32-i370.c (i370_elf_create_dynamic_sections): Likewise.
1836         (i370_elf_check_relocs): Likewise.
1837         * elf32-i386.c (create_got_section): Likewise.
1838         (elf_i386_check_relocs): Likewise.
1839         * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
1840         (create_got_section): Likewise.
1841         (m32r_elf_create_dynamic_sections): Likewise.
1842         (m32r_elf_check_relocs): Likewise.
1843         * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
1844         * elf32-ppc.c (ppc_elf_create_got): Likewise.
1845         (ppc_elf_create_dynamic_sections): Likewise.
1846         (ppc_elf_add_symbol_hook): Likewise.
1847         (ppc_elf_check_relocs): Likewise.
1848         * elf32-s390.c (create_got_section): Likewise.
1849         (elf_s390_check_relocs): Likewise.
1850         * elf32-sh.c (create_got_section): Likewise.
1851         (sh_elf_create_dynamic_sections): Likewise.
1852         (sh_elf_check_relocs): Likewise.
1853         * elf32-vax.c (elf_vax_check_relocs): Likewise.
1854         * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
1855         * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Likewise.
1856         (add_extra_plt_sections): Likewise.
1857         * elf64-alpha.c (elf64_alpha_add_symbol_hook): Likewise.
1858         (elf64_alpha_create_got_section): Likewise.
1859         (elf64_alpha_create_dynamic_sections): Likewise.
1860         (elf64_alpha_check_relocs): Likewise.
1861         * elf64-hppa.c (get_reloc_section): Likewise.
1862         (get_opd): Likewise.
1863         (get_plt): Likewise.
1864         (get_dlt): Likewise.
1865         (get_stub): Likewise.
1866         (elf64_hppa_create_dynamic_sectionso): Likewise.
1867         * elf64-mmix.c (mmix_elf_check_common_relocs): Likewise.
1868         * elf64-ppc.c (create_linkage_sections): Likewise.
1869         (ppc64_elf_check_relocs): Likewise.
1870         * elf64-s390.c (create_got_section): Likewise.
1871         (elf_s390_check_relocs): Likewise.
1872         * elf64-sh64.c (sh_elf64_check_relocs): Likewise.
1873         (sh64_elf64_create_dynamic_sections): Likewise.
1874         * elf64-x86-64.c (create_got_section): Likewise.
1875         (elf64_x86_64_check_relocs): Likewise.
1876         * elflink.c (_bfd_elf_create_got_section): Likewise.
1877         (_bfd_elf_link_create_dynamic_sections): Likewise.
1878         (elf_link_add_object_symbols): Likewise.
1879         * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Likewise.
1880         (elfNN_ia64_create_dynamic_sections): Likewise.
1881         (get_fptr): Likewise.
1882         (get_pltoff): Likewise.
1883         (get_reloc_section): Likewise.
1884         (elfNN_ia64_object_p): Likewise.
1885         * elfxx-mips.c (mips_elf_rel_dyn_section): Likewise.
1886         (mips_elf_create_compact_rel_section): Likewise.
1887         (mips_elf_create_got_section): Likewise.
1888         (_bfd_mips_elf_create_dynamic_sections): Likewise.
1889         * elfxx-sparc.c (create_got_section): Likewise.
1890         (_bfd_sparc_elf_check_relocs): Likewise.
1892         * elf.c (_bfd_elf_new_section_hook): Call _bfd_elf_get_sec_type_attr
1893         on linker created sections.
1895 2005-05-05  H.J. Lu  <hongjiu.lu@intel.com>
1897         PR 882
1898         * elflink.c (_bfd_elf_link_assign_sym_version): Allow version
1899         script on executable.
1901 2005-05-05  John Levon  <levon@movementarian.org>
1903         * dwarf2.c (read_abbrevs): If bfd_realloc fails, free currently
1904         allocated memory before returning.
1905         (decode_line_info): Likewise.
1906         (_bfd_dwarf2_cleanup_debug_info): New function:  Frees memory
1907         allocated by functions in this file.
1908         * elf-bfd.h (_bfd_dwarf2_cleanup_debug_info): Prototype.
1909         * elf.c (_bfd_elf_close_and_cleanup): Call
1910         _bfd_dwarf2_cleanup_debug_info.
1912 2005-05-05  Hans-Peter Nilsson  <hp@axis.com>
1914         * Makefile.am (INCLUDES): Don't -D_GNU_SOURCE here.
1915         * configure.in: Call AC_GNU_SOURCE here, after AC_PROG_CC.
1916         * configure, config.in, Makefile.in: Regenerate.
1917         * sysdep.h (stpcpy): Revert last change.
1919 2005-05-05  Hans-Peter Nilsson  <hp@axis.com>
1921         * sysdep.h (stpcpy): Wrap declaration in parentheses.
1923 2005-05-04  H.J. Lu  <hongjiu.lu@intel.com>
1925         * elfxx-ia64.c (ARCH_SIZE): New.
1926         (LOG_SECTION_ALIGN): Likewise.
1927         (elfNN_ia64_create_dynamic_sections): Use LOG_SECTION_ALIGN to
1928         align relocation sections.
1929         (get_fptr): Likewise.
1930         (get_reloc_section): Likewise.
1931         (elfNN_ia64_tprel_base): Likewise.
1932         (elfNN_ia64_check_relocs): Support 32bit relocations.
1933         (allocate_global_fptr_got): Likewise.
1934         (allocate_dynrel_entries): Likewise.
1935         (set_got_entry): Likewise.
1936         (set_pltoff_entry): Likewise.
1937         (elfNN_ia64_relocate_section): Likewise.
1939 2005-05-04  H.J. Lu  <hongjiu.lu@intel.com>
1941         * configure.in: Add AC_CHECK_DECLS(stpcpy).
1942         * configure: Regenerate.
1943         * config.in: Likewise.
1945         * sysdep.h (stpcpy): New.
1947 2005-05-04  Nick Clifton  <nickc@redhat.com>
1949         * Update the address and phone number of the FSF organization in
1950         the GPL notices in the following files:
1951         aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c,
1952         aout-cris.c, aout-ns32k.c, aout-sparcle.c, aout-target.h,
1953         aout-tic30.c, aout0.c, aout32.c, aout64.c, aoutf1.h, aoutx.h,
1954         archive.c, archive64.c, archures.c, armnetbsd.c, bfd-in.h,
1955         bfd-in2.h, bfd.c, bfdio.c, bfdwin.c, binary.c, bout.c, cache.c,
1956         cf-i386lynx.c, cf-m68klynx.c, cf-sparclynx.c, cisco-core.c,
1957         coff-a29k.c, coff-alpha.c, coff-apollo.c, coff-arm.c, coff-aux.c,
1958         coff-go32.c, coff-h8300.c, coff-h8500.c, coff-i386.c, coff-i860.c,
1959         coff-i960.c, coff-ia64.c, coff-m68k.c, coff-m88k.c, coff-maxq.c,
1960         coff-mcore.c, coff-mips.c, coff-or32.c, coff-pmac.c, coff-ppc.c,
1961         coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c,
1962         coff-svm68k.c, coff-tic30.c, coff-tic4x.c, coff-tic54x.c,
1963         coff-tic80.c, coff-u68k.c, coff-w65.c, coff-we32k.c, coff-z8k.c,
1964         coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c, coffswap.h,
1965         corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c,
1966         cpu-avr.c, cpu-cr16c.c, cpu-cris.c, cpu-crx.c, cpu-d10v.c,
1967         cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c, cpu-h8300.c,
1968         cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c, cpu-i860.c,
1969         cpu-i960.c, cpu-ia64-opc.c, cpu-ia64.c, cpu-ip2k.c, cpu-iq2000.c,
1970         cpu-m10200.c, cpu-m10300.c, cpu-m32r.c, cpu-m68hc11.c,
1971         cpu-m68hc12.c, cpu-m68k.c, cpu-m88k.c, cpu-maxq.c, cpu-mcore.c,
1972         cpu-mips.c, cpu-mmix.c, cpu-msp430.c, cpu-ns32k.c, cpu-openrisc.c,
1973         cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c, cpu-rs6000.c,
1974         cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c, cpu-tic4x.c,
1975         cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c, cpu-w65.c,
1976         cpu-we32k.c, cpu-xstormy16.c, cpu-xtensa.c, cpu-z8k.c, demo64.c,
1977         dwarf1.c, dwarf2.c, ecoff.c, ecofflink.c, ecoffswap.h,
1978         efi-app-ia32.c, efi-app-ia64.c, elf-bfd.h, elf-eh-frame.c,
1979         elf-hppa.h, elf-m10200.c, elf-m10300.c, elf-strtab.c, elf.c,
1980         elf32-am33lin.c, elf32-arc.c, elf32-arm.c, elf32-avr.c,
1981         elf32-cr16c.c, elf32-cris.c, elf32-crx.c, elf32-d10v.c,
1982         elf32-d30v.c, elf32-dlx.c, elf32-fr30.c, elf32-frv.c, elf32-gen.c,
1983         elf32-h8300.c, elf32-hppa.c, elf32-hppa.h, elf32-i370.c,
1984         elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
1985         elf32-iq2000.c, elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c,
1986         elf32-m68hc1x.c, elf32-m68hc1x.h, elf32-m68k.c, elf32-m88k.c,
1987         elf32-mcore.c, elf32-mips.c, elf32-msp430.c, elf32-openrisc.c,
1988         elf32-or32.c, elf32-pj.c, elf32-ppc.c, elf32-ppc.h, elf32-s390.c,
1989         elf32-sh-symbian.c, elf32-sh.c, elf32-sh64-com.c, elf32-sh64.c,
1990         elf32-sh64.h, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
1991         elf32-xstormy16.c, elf32-xtensa.c, elf32.c, elf64-alpha.c,
1992         elf64-gen.c, elf64-hppa.c, elf64-hppa.h, elf64-mips.c,
1993         elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
1994         elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elf64.c, elfcode.h,
1995         elfcore.h, elflink.c, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c,
1996         elfxx-mips.h, elfxx-sparc.c, elfxx-sparc.h, elfxx-target.h,
1997         epoc-pe-arm.c, epoc-pei-arm.c, format.c, freebsd.h, gen-aout.c,
1998         genlink.h, hash.c, host-aout.c, hp300bsd.c, hp300hpux.c,
1999         hppabsd-core.c, hpux-core.c, i386aout.c, i386bsd.c, i386dynix.c,
2000         i386freebsd.c, i386linux.c, i386lynx.c, i386mach3.c, i386msdos.c,
2001         i386netbsd.c, i386os9k.c, ieee.c, ihex.c, init.c, irix-core.c,
2002         libaout.h, libbfd-in.h, libbfd.c, libbfd.h, libcoff-in.h,
2003         libcoff.h, libecoff.h, libhppa.h, libieee.h, libnlm.h, liboasys.h,
2004         libpei.h, libxcoff.h, linker.c, lynx-core.c, m68k4knetbsd.c,
2005         m68klinux.c, m68klynx.c, m68knetbsd.c, m88kmach3.c, m88kopenbsd.c,
2006         mach-o-target.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c, mmo.c,
2007         netbsd-core.c, netbsd.h, newsos3.c, nlm-target.h, nlm.c,
2008         nlm32-alpha.c, nlm32-i386.c, nlm32-ppc.c, nlm32-sparc.c, nlm32.c,
2009         nlm64.c, nlmcode.h, nlmswap.h, ns32k.h, ns32knetbsd.c, oasys.c,
2010         opncls.c, osf-core.c, pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c,
2011         pe-mcore.c, pe-mips.c, pe-ppc.c, pe-sh.c, peXXigen.c,
2012         pef-traceback.h, pef.c, pef.h, pei-arm.c, pei-i386.c, pei-mcore.c,
2013         pei-mips.c, pei-ppc.c, pei-sh.c, peicode.h, ppcboot.c,
2014         ptrace-core.c, reloc.c, reloc16.c, riscix.c, rs6000-core.c,
2015         sco5-core.c, section.c, simple.c, som.c, som.h, sparclinux.c,
2016         sparclynx.c, sparcnetbsd.c, srec.c, stab-syms.c, stabs.c, sunos.c,
2017         syms.c, sysdep.h, targets.c, tekhex.c, ticoff.h, trad-core.c,
2018         vax1knetbsd.c, vaxbsd.c, vaxnetbsd.c, versados.c, vms-gsd.c,
2019         vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h, xcoff-target.h,
2020         xcofflink.c, xsym.c, xsym.h, xtensa-isa.c, xtensa-modules.c,
2021         hosts/alphavms.h
2023 2005-05-04  H.J. Lu  <hongjiu.lu@intel.com>
2025         * bfd-in.h (_bfd_elf_provide_section_bound_symbols): New.
2026         * bfd-in2.h: Regenerated.
2028         * elflink.c (bfd_elf_set_symbol): New.
2029         (_bfd_elf_provide_symbol): Call it.
2030         (_bfd_elf_provide_section_bound_symbols): New.
2032 2005-05-04  H.J. Lu  <hongjiu.lu@intel.com>
2034         * elflink.c (_bfd_elf_merge_symbol): Only skip weak definitions
2035         at the end, if a strong definition has already been seen.
2037 2005-05-04  Alan Modra  <amodra@bigpond.net.au>
2039         * section.c (struct bfd_section): Replace link_order_head and
2040         link_order_tail with map_head and map_tail union.
2041         (STD_SECTION): Update.
2042         (_bfd_strip_section_from_output): Delete.
2043         * aoutx.h: Update throughout for above changes.
2044         * coff-ppc.c: Likewise.
2045         * cofflink.c: Likewise.
2046         * ecoff.c: Likewise.
2047         * elf-eh-frame.c: Likewise.
2048         * elf-m10300.c: Likewise.
2049         * elf.c: Likewise.
2050         * elf32-arm.c: Likewise.
2051         * elf32-cris.c: Likewise.
2052         * elf32-hppa.c: Likewise.
2053         * elf32-i386.c: Likewise.
2054         * elf32-m32r.c: Likewise.
2055         * elf32-m68hc1x.c: Likewise.
2056         * elf32-m68k.c: Likewise.
2057         * elf32-ppc.c: Likewise.
2058         * elf32-s390.c: Likewise.
2059         * elf32-sh.c: Likewise.
2060         * elf32-vax.c: Likewise.
2061         * elf32-xtensa.c: Likewise.
2062         * elf64-alpha.c: Likewise.
2063         * elf64-hppa.c: Likewise.
2064         * elf64-ppc.c: Likewise.
2065         * elf64-s390.c: Likewise.
2066         * elf64-sh64.c: Likewise.
2067         * elf64-x86-64.c: Likewise.
2068         * elflink.c: Likewise.
2069         * elfxx-ia64.c: Likewise.
2070         * elfxx-mips.c: Likewise.
2071         * elfxx-sparc.c: Likewise.
2072         * linker.c: Likewise.
2073         * merge.c: Likewise.
2074         * pdp11.c: Likewise.
2075         * xcofflink.c: Likewise.
2076         * elflink.c (bfd_boolean bfd_elf_size_dynsym_hash_dynstr): Split
2077         out from bfd_elf_size_dynamic_sections.
2078         * bfd-in.h (bfd_boolean bfd_elf_size_dynsym_hash_dynstr): Declare.
2079         * bfd-in2.h: Regenerate.
2081 2005-05-04  Alan Modra  <amodra@bigpond.net.au>
2083         * section.c (bfd_section_list_remove): Don't clear s->next.
2084         (bfd_section_list_append): Always init s->prev.
2085         (bfd_section_list_prepend): Define.
2086         (bfd_section_list_insert_after): Minor optimization.
2087         (bfd_section_removed_from_list): Rewrite.
2088         * elf.c (assign_section_numbers): Simplify list traversal now that
2089         bfd_section_list_remove doesn't destroy removed section next ptr.
2090         * sunos.c (sunos_add_dynamic_symbols): Likewise.
2091         * elfxx-ia64.c (elfNN_ia64_object_p): Use bfd_section_list_prepend.
2092         * xcofflink.c (_bfd_xcoff_bfd_final_link): Simplify list traversal.
2093         * bfd-in2.h: Regenerate.
2095 2005-05-02  H.J. Lu  <hongjiu.lu@intel.com>
2097         * bfd.c (bfd): Remove section_tail and add section_last.
2098         (bfd_preserve): Likewise.
2099         (bfd_preserve_save): Likewise.
2100         (bfd_preserve_restore): Likewise.
2101         * opncls.c (_bfd_new_bfd): Likewise.
2103         * coffcode.h (coff_compute_section_file_positions): Updated.
2104         (coff_compute_section_file_positions): Likewise.
2105         * elf.c (assign_section_numbers): Likewise.
2106         * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
2107         * elf64-mmix.c (mmix_elf_final_link): Likewise.
2108         * elfxx-ia64.c (elfNN_ia64_object_p): Likewise.
2109         * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
2110         * sunos.c (sunos_add_dynamic_symbols): Likewise.
2111         * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
2113         * ecoff.c (bfd_debug_section): Initialize prev.
2115         * section.c (bfd_section): Add prev.
2116         (bfd_section_list_remove): Updated.
2117         (bfd_section_list_append): New.
2118         (bfd_section_list_insert_after): New.
2119         (bfd_section_list_insert_before): New.
2120         (bfd_section_list_insert): Removed.
2121         (bfd_section_removed_from_list): Updated.
2122         (STD_SECTION): Initialize prev.
2123         (bfd_section_init): Updated.
2124         (bfd_section_list_clear): Updated.
2126         * bfd-in2.h: Regenerated.
2128 2005-05-02  H.J. Lu  <hongjiu.lu@intel.com>
2130         * elf.c (_bfd_elf_new_section_hook): Don't call
2131         _bfd_elf_get_sec_type_attr on sections from input files.
2133 2005-05-02  H.J. Lu  <hongjiu.lu@intel.com>
2135         * merge.c (sec_merge_init): Call bfd_hash_table_init_n with
2136         hash table size 16699 instead of bfd_hash_table_init.
2138 2005-05-01  Paul Brook  <paul@codesourcery.com>
2140         * elflink.c (_bfd_elf_merge_symbol): Skip weak definitions if a strong
2141         definition has already been seen.
2143 2005-05-01  Paul Brook  <paul@codesourcery.com>
2145         * elf32-arm.c (bfd_elf32_arm_process_before_allocation): Treat
2146         R_ARM_PLT32 the same as R_ARM_PC24.
2147         (arm_add_to_rel): Ditto.
2149 2005-04-29  Ralf Corsepius <ralf.corsepius@rtems.org>
2151         * config.bfd: Add h8300*-*-rtemscoff.
2152         Switch h8300*-*-rtems* to elf.
2154 2005-04-29  Daniel Jacobowitz  <dan@codesourcery.com>
2156         * aclocal.m4, Makefile.in: Regnerated.
2158 2005-04-28  Paul Brook  <paul@codesourcery.com>
2160         Merge changes only applied to Makefile.in.
2161         * Makefile.am (BFD32_BACKENDS): Add elfxx-sparc.lo
2162         (BFD32_BACKENDS_CFILES): Add elfxx-sparc.c
2163         (elfxx-sparc.lo): New rule.
2164         (elf32-sparc.lo): Add elfxx-sparc.h dependency.
2165         (elf64-sparc.lo): Likewise.
2167 2005-04-28  Julian Brown  <julian@codesourcery.com>
2169         * elflink.c (_bfd_elf_provide_symbol): Provide symbol for weak
2170         import.
2172 2005-04-27  H.J. Lu  <hongjiu.lu@intel.com>
2174         * elf-bfd.h (bfd_elf_sym_name): Also take "asection *".
2176         * elf.c (bfd_elf_sym_name): Updated.
2177         (group_signature): Likewise.
2178         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2179         * elf64-ppc.c (ppc64_elf_edit_opd): Likewise.
2180         (ppc64_elf_edit_toc): Likewise.
2181         (ppc64_elf_relocate_section): Likewise.
2182         * elfcode.h (elf_slurp_symbol_table): Likewise.
2183         * elflink.c (elf_link_input_bfd): Likewise.
2185         * elfxx-ia64.c (elfNN_ia64_relocate_section): Call
2186         bfd_elf_sym_name to get local symbol name when reporting errors.
2188 2005-04-27  Nick Clifton  <nickc@redhat.com>
2190         * elflink.c (elf_link_input_bfd): Handle the case where a badly
2191         formatted input file results in a reloc which has no associated
2192         global symbol.
2194 2005-04-26  Jerome Guitton  <guitton@gnat.com>
2196         * bfd.m4 (BFD_NEED_DECLARATION): Restore.
2198 2005-04-25  David S. Miller  <davem@davemloft.net>
2200         * elfxx-sparc.c (sparc_elf_append_rela_64): Add BFD64 protection.
2201         (sparc_elf_r_info_64, _bfd_sparc_elf_finish_dynamic_symbol,
2202         sparc64_finish_dyn, _bfd_sparc_elf_finish_dynamic_sections):
2203         Likewise.
2205 2005-04-25  H.J. Lu  <hongjiu.lu@intel.com>
2207         PR 858
2208         * elflink.c (elf_link_input_bfd): Make non-debugging reference
2209         to discarded section an error.
2211 2005-04-21  Jerome Guitton  <guitton@gnat.com>
2213         * configure.in: Replace BFD_NEED_DECLARATION checks by the
2214         corresponding AC_CHECK_DECLS.
2215         * sysdep.h: Replace NEED_DECLARATION_* checks by the corresponding
2216         HAVE_DECL_*.
2217         * bfd.m4 (BFD_NEED_DECLARATION): Remove, obsolete.
2218         * configure: Regenerate.
2219         * config.in: Ditto.
2221 2005-04-21  Andreas Schwab  <schwab@suse.de>
2223         * elfxx-sparc.h (struct _bfd_sparc_elf_link_hash_table): Remove
2224         unsigned from type of dynamic_interpreter.
2225         * elfxx-sparc.c (_bfd_sparc_elf_link_hash_table_create): Remove
2226         casts again.
2228         * elf.c (assign_section_numbers): Fix comment.
2230 2005-04-21  Jerome Guitton  <guitton@gnat.com>
2232         * som.c (som_bfd_print_private_bfd_data): Add explicit cast to long
2233         for struct som_exec_auxhdr fields.
2235 2005-04-21  Nick Clifton  <nickc@redhat.com>
2237         * aout-adobe.c: Convert to ISO C and fix formatting.
2238         * aout-arm.c: Convert to ISO C and fix formatting.
2239         * aout-cris.c: Convert to ISO C and fix formatting.
2240         * aout-ns32k.c: Convert to ISO C and fix formatting.
2241         * aout-tic30.c: Convert to ISO C and fix formatting.
2242         * coffcode.h: Convert to ISO C and fix formatting.
2243         * coffswap.h: Convert to ISO C and fix formatting.
2244         * i386aout.c: Convert to ISO C and fix formatting.
2245         * libaout.h: Convert to ISO C and fix formatting.
2246         * libcoff-in.h: Convert to ISO C and fix formatting.
2247         * libcoff.h: Convert to ISO C and fix formatting.
2248         * libecoff.h: Convert to ISO C and fix formatting.
2249         * libnlm.h: Convert to ISO C and fix formatting.
2250         * libpei.h: Convert to ISO C and fix formatting.
2251         * libxcoff.h: Convert to ISO C and fix formatting.
2252         * nlm-target.h: Convert to ISO C and fix formatting.
2253         * nlm.c: Convert to ISO C and fix formatting.
2254         * nlm32-alpha.c: Convert to ISO C and fix formatting.
2255         * nlm32-i386.c: Convert to ISO C and fix formatting.
2256         * nlm32-ppc.c: Convert to ISO C and fix formatting.
2257         * nlm32-sparc.c: Convert to ISO C and fix formatting.
2258         * nlmcode.h: Convert to ISO C and fix formatting.
2259         * nlmswap.h: Convert to ISO C and fix formatting.
2260         * pe-mips.c: Convert to ISO C and fix formatting.
2261         * peXXigen.c: Convert to ISO C and fix formatting.
2262         * peicode.h: Convert to ISO C and fix formatting.
2263         * vms-gsd.c: Convert to ISO C and fix formatting.
2264         * vms-hdr.c: Convert to ISO C and fix formatting.
2265         * vms-misc.c: Convert to ISO C and fix formatting.
2266         * vms-tir.c: Convert to ISO C and fix formatting.
2267         * vms.c: Convert to ISO C and fix formatting.
2268         * vms.h: Convert to ISO C and fix formatting.
2270         * coffgen.c (coff_print_symbol): Restore correct formatting of
2271         output.
2273 2005-04-20  David S. Miller  <davem@davemloft.net>
2275         * elfxx-sparc.c (sparc_elf_r_symndx_64): Fix compiler warning.
2276         (_bfd_sparc_elf_link_hash_table_create): Likewise.
2277         (allocate_dynrelocs): Likewise.
2279 2005-04-20  Jerome Guitton  <guitton@gnat.com>
2281         * configure.in: Fix the check for basename declaration. Add check
2282         for declarations of ftello, ftello64, fseeko, fseeko64.
2283         * configure: Regenerate.
2284         * config.in: Ditto.
2285         * sysdep.h: If needed, declare ftello, ftello64, fseeko, fseeko64.
2287 2005-04-19  David S. Miller  <davem@davemloft.net>
2289         * elfxx-sparc.c: New file.
2290         * elfxx-sparc.h: New file.
2291         * Makefile.in (BFD32_BACKENDS): Add elfxx-sparc.lo
2292         (BFD32_BACKENDS_CFILES): Add elfxx-sparc.c
2293         (elfxx-sparc.lo): New rule.
2294         (elf32-sparc.lo): Add elfxx-sparc.h dependency.
2295         (elf64-sparc.lo): Likewise.
2296         * configure.in (bfd_elf32_sparc_vec): Add elfxx-sparc.lo
2297         (bfd_elf64_sparc_vec): Likewise.
2298         * configure: Regenerate.
2299         * elf32-sparc.c: Remove common code now in elfxx-sparc.c
2300         * elf64-sparc.c: Likewise, also use elf64_sparc_*() naming
2301         which is more consistent with elf32-sparc.c
2303 2005-04-19  Daniel Jacobowitz  <dan@codesourcery.com>
2305         * elfxx-mips.c (struct mips_elf_link_hash_entry): Update comment.
2306         (mips_elf_create_local_got_entry): Check h->root.forced_local.
2308 2005-04-19  Alan Modra  <amodra@bigpond.net.au>
2310         * elf32-ppc.c (ppc_elf_check_relocs): Don't bother with
2311         dynamic relocs in non-SEC_ALLOC sections.
2312         (ppc_elf_gc_sweep_hook): Likewise.
2313         (ppc_elf_relax_section): Likewise.
2314         (ppc_elf_relocate_section): Likewise.
2316 2005-04-18  Nick Clifton  <nickc@redhat.com>
2318         * aix5ppc-core.c (xcoff64_core_p): Fix compile time warning
2319         assigning a value to return_value.
2321 2005-04-17  H.J. Lu  <hongjiu.lu@intel.com>
2323         PR 855
2324         * elf.c (_bfd_elf_copy_private_section_data): Don't copy linker
2325         created group data.
2327 2005-04-17  H.J. Lu  <hongjiu.lu@intel.com>
2329         PR 855
2330         * elf.c (setup_group): Properly handle zero group count.
2332 2005-04-17  Mark Kettenis  <kettenis@gnu.org>
2334         * som.c (hppa_som_reloc, som_mkobject, som_is_space)
2335         (som_is_subspace, compare_subspaces, som_compute_checksum)
2336         (som_build_and_write_symbol_table, som_slurp_symbol_table): New
2337         protoypes.
2338         (hppa_som_reloc, compare_syms, compare_subspaces)
2339         (som_print_symbol, som_get_section_contents)
2340         (som_set_section_contents): Remove space after 'void *'.
2341         (som_bfd_print_private_bfd_data): Use %lx to print longs.
2342         (som_bfd_merge_private_bfd_data)
2343         (som_bfd_copy_private_header_data, som_bfd_set_private_flags): New
2344         defines.
2346 2004-04-15  Julian Brown  <julian@codesourcery.com>
2348         * bfd-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
2349         * bfd-in2.h: Regenerate.
2350         * elf32-arm.c (elf32_arm_link_hash_table): New field, 'use_blx'.
2351         (elf32_arm_link_hash_table_create): Initialise fix_v4bx, use_blx.
2352         (bfd_elf32_arm_set_target_relocs): Handle use_blx.
2353         (elf32_arm_final_link_relocate): Use Thumb BLX for R_ARM_THM_PC22
2354         relocations if requested to.
2355         (allocate_dynrelocs): Don't count size of omitted Thumb stubs based on
2356         use_blx rather than symbian_p.
2357         (elf32_arm_finish_dynamic_symbol): Don't output Thumb PLT stubs if
2358         use_blx is in effect.
2359         (elf32_arm_symbian_link_hash_table_create): Enable use_blx by default
2360         for SymbianOS.
2362 2005-04-15  Nick Clifton  <nickc@redhat.com>
2364         * coffgen.c (coff_print_symbol): Use fprintf_vma to print vma
2365         values.
2367 2005-04-15  Alan Modra  <amodra@bigpond.net.au>
2369         PR ld/815
2370         * elflink.c (elf_smash_syms): Clear undef.next if it's not being
2371         used as a list pointer.
2373 2005-04-14  Alan Modra  <amodra@bigpond.net.au>
2375         * Makefile.am (NO_WERROR): Define.
2376         * warning.m4: New file
2377         * acinclude.m4: Include warning.m4.
2378         * configure.in: Invoke AM_BINUTILS_WARNINGS.
2379         * Makefile.in: Regenerate.
2380         * configure: Regenerate.
2382 2005-04-14  Alan Modra  <amodra@bigpond.net.au>
2384         * merge.c (sec_merge_emit): Tidy.  Check for bfd_zmalloc errors.
2385         Write trailing padding.
2387         * merge.c (merge_strings): Round up section size for alignment.
2389 2005-04-14  David S. Miller  <davem@davemloft.net>
2391         Add TLS support for 64-bit Sparc ELF.
2392         *  elf64-sparc.c (sparc64_elf_dyn_relocs,
2393         sparc64_elf_link_hash_entry, sparc64_elf_obj_tdata): New structs.
2394         (GOT_UNKNOWN, GOT_NORMAL, GOT_TLD_GD, GOT_TLD_IE,
2395         sparc64_elf_hash_entry, sparc64_elf_tdata,
2396         sparc64_elf_local_got_tls_type): New defines.
2397         (sparc64_elf_mkobject): New function.
2398         (sparc64_elf_link_hash_table): Add members for dynamic linker
2399         sections PLT, RELPLT, DYNBSS, and RELBSS.  Add tls_ldm_got
2400         uion to track TLS GOT references.  Add sym_sec to cache
2401         mappings from local sym to section.
2402         (link_hash_newfunc): New function.
2403         (sparc64_elf_bfd_link_hash_table_create): Rename to
2404         sparc64_elf_link_hash_table_create for consistency.
2405         Pass link_hash_newfunc to _bfd_elf_link_hash_table_init.
2406         (sparc64_elf_create_dynamic_sections): Initialize new section
2407         members of sparc64_elf_link_hash_table.  Only init srelbss
2408         if not-shared.
2409         (sparc64_elf_copy_indirect_symbol, sparc64_elf_tls_transition):
2410         New functions.
2411         (SPARC_NOP): Define.
2412         (sparc64_elf_build_plt, sparc64_elf_plt_entry_offset,
2413         sparc64_elf_plt_ptr_offset): Delete.
2414         (sparc64_plt_entry_build): New function to build PLT entries
2415         gradually instread of all at once at the end of linking.
2416         (sparc64_elf_check_relocs): Delete dynobj, sgot, and srelgot
2417         local vars.  Get them from sparc64_elf_hash_table instead.
2418         Check early on if r_symndx is in bounds.  Handle TLS transitions.
2419         Account for TLS GOT references and DF_STATIC_TLS, as needed.
2420         For TLS relocs, record the tls_type in either
2421         sparc64_elf_local_got_tls_type or sparc64_elf_hash_entry as
2422         appropriate.  For R_SPARC_TLS_{GD,LDM}_CALL, emit a reference
2423         to the __tls_get_addr symbol.  For PLT relocs, track references
2424         via h->plt.refcount.  When R_SPARC_{PC10,PC22,PC_HH22,PC_HM10,
2425         PC_LM22} and h not-NULL, set h->non_got_ref.  For global data
2426         symbol references, count the number of relocations needed for
2427         that symbol.  For default switch case, don't error, this lets
2428         the TLS relocs not explicitly handled by this function get
2429         accepted.
2430         (sparc64_elf_gc_mark_hook, sparc64_gc_sweep_hook): New functions.
2431         (sparc64_elf_adjust_dynamic_symbol): Remove dynobj local var, get
2432         it from sparc64_elf_hash_table.  Store the real PLT offset
2433         in h->plt.offset, and build PLT entries one at a time.  Also
2434         get .dynbss section pointer from htab.
2435         (allocate_dynrelocs, readonly_dynrelocs,
2436         sparc64_omit_section_dynsym): New functions.
2437         (sparc64_elf_omit_section_dynsym): Use these new functions as
2438         helpers.
2439         (dtpoff_base, tpoff): New functions.
2440         (sparc64_elf_relocate_section): Kill dynobj, sgot, and splt
2441         locals, get them from sparc64_elf_hash_table.  Handle TLS
2442         relocations and refcounting in main relocation loop.
2443         (sparc64_elf_finish_dynamic_symbol): Use
2444         sparc64_elf_link_hash_table.  Build PLT entries as we see
2445         them.  Handle TLS GOT relocations.
2446         (sparc64_elf_finish_dynamic_sections): Get sgot and dynobj
2447         from sparc64_elf_hash_table.  Initialize only PLT header
2448         not all entries since we not build PLT entries one by one.
2449         (elf_backend_copy_indirect_symbol, bfd_elf64_mkobject,
2450         elf_backend_gc_mark_hook, elf_backend_gc_sweep_hook,
2451         elf_backend_can_gc_sections, elf_backend_can_refcount): Define.
2453 2005-04-13  Daniel Jacobowitz  <dan@codesourcery.com>
2455         * elflink.c (elf_link_input_bfd): Update check for removed
2456         sections.
2458 2005-04-12  Alan Modra  <amodra@bigpond.net.au>
2460         * Makefile.am: Run "make dep-am".
2461         * Makefile.in: Regenerate.
2462         * aclocal.m4: Regenerate.
2463         * libcoff.h: Regenerate.
2465 2005-04-11  H.J. Lu  <hongjiu.lu@intel.com>
2467         * linker.c (_bfd_generic_link_output_symbols): Also check if
2468         the output section of an input section has been removed from
2469         the output file.
2471         * section.c (bfd_section_list_remove): Clear the next field
2472         of the removed section.
2473         (bfd_section_removed_from_list): New.
2474         * bfd-in2.h: Regenerated.
2476 2005-04-11  David S. Miller  <davem@davemloft.net>
2478         * elf32-sparc.c (elf32_sparc_relocate_section,
2479         R_SPARC_TLS_LDO_{HIX22,LOX10}): When not shared, transition to
2480         R_SPARC_TLS_LE_{HIX22,LOX10}.
2481         (elf32_sparc_relocate_section, R_SPARC_TLS_{LDO,LE}_HIX22): Only
2482         xor relocation with 0xffffffff if R_SPARC_TLS_LE_HIX22.
2483         (elf32_sparc_relocate_section, R_SPARC_TLS_{LDO,LE}_LOX10): Only
2484         or 0x1c00 into relocation if R_SPARC_TLS_LE_HIX22.
2486 2005-04-11  H.J. Lu  <hongjiu.lu@intel.com>
2488         * coffcode.h (STRING_SIZE_SIZE): Updated to match libcoff-in.h.
2490 2005-04-11  Nick Clifton  <nickc@redhat.com>
2492         * aout-target.h:  Convert to ISO C.
2493         * aoutf1.h:  Convert to ISO C.
2494         * aoutx.h:  Convert to ISO C.
2495         * bout.c:  Convert to ISO C.
2496         * dwarf1.c:  Convert to ISO C.
2497         * ecoffswap.h:  Convert to ISO C.
2498         * freebsd.h:  Convert to ISO C.
2499         * genlink.h:  Convert to ISO C.
2500         * ieee.c:  Convert to ISO C.
2501         * ihex.c:  Convert to ISO C.
2502         * libcoff-in.h:  Convert to ISO C.
2503         * mach-o.c:  Convert to ISO C.
2504         * mach-o.h:  Convert to ISO C.
2505         * netbsd.h:  Convert to ISO C.
2506         * ns32k.h:  Convert to ISO C.
2507         * ns32knetbsd.c:  Convert to ISO C.
2508         * oasys.c:  Convert to ISO C.
2509         * pdp11.c:  Convert to ISO C.
2510         * pef-traceback.h:  Convert to ISO C.
2511         * pef.c:  Convert to ISO C.
2512         * pef.h:  Convert to ISO C.
2513         * riscix.c:  Convert to ISO C.
2514         * som.c:  Convert to ISO C.
2515         * som.h:  Convert to ISO C.
2516         * srec.c:  Convert to ISO C.
2517         * stabs.c:  Convert to ISO C.
2518         * sunos.c:  Convert to ISO C.
2519         * tekhex.c:  Convert to ISO C.
2520         * versados.c:  Convert to ISO C.
2521         * version.h:  Convert to ISO C.
2522         * xcoff-target.h:  Convert to ISO C.
2523         * xcofflink.c:  Convert to ISO C.
2524         * xsym.c:  Convert to ISO C.
2525         * xsym.h:  Convert to ISO C.
2527 2005-04-08  Paul Brook  <paul@codesourcery.com>
2529         * elf32-arm.c (ARM2THUMB_GLUE_SIZE): Rename...
2530         (ARM2THUMB_STATIC_GLUE_SIZE): ... to this.
2531         (ARM2THUMB_PIC_GLUE_SIZE): Define.
2532         (a2t1p_ldr_insn, a2t2p_add_pc_insn, a2t3p_bx_r12_insn): Add.
2533         (elf32_arm_to_thumb_stub): Create PIC stubs.
2534         (record_arm_to_thumb_glue): Use different stub size for relocatable
2535         images.
2537 2005-04-05  Alan Modra  <amodra@bigpond.net.au>
2539         * elf64-ppc.c (dec_dynrel_count): New function split out from
2540         ppc64_elf_edit_toc, with additional code from ppc64_elf_edit_opd.
2541         (ppc64_elf_edit_toc, ppc64_elf_edit_opd): Use it.
2542         (ppc64_elf_tls_optimize): Likewise.
2544 2005-04-05  Mark Kettenis  <kettenis@gnu.org>
2546         * netbsd-core.c (SPARC_WCOOKIE_OFFSET): Renamed from
2547         CORE_WCOOKIE_OFFSET.
2548         (SPARC64_WCOOKIE_OFFSET): New.
2549         (netbsd_core_file_p): Provide .wcookie section for OpenBSD/sparc64.
2551 2005-04-05  Nick Clifton  <nickc@redhat.com>
2553         * po/rw.po: New translation: Kinyarwanda
2554         * configure.in (ALL_LINGUAS): Add rw
2555         * configure: Regenerate.
2557 2005-04-05  Richard Sandiford  <rsandifo@redhat.com>
2559         * elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME_P): New macro.
2560         (_bfd_mips_elf_section_from_shdr): Use it to check for recognized
2561         SHT_MIPS_OPTIONS names.  Allow all sections with unrecognised
2562         section flags.
2563         (_bfd_mips_elf_fake_sections): Use MIPS_ELF_OPTIONS_SECTION_NAME_P
2564         to check for SHT_MIPS_OPTIONS sections.
2565         (_bfd_mips_elf_set_section_contents): Likewise.
2567 2005-04-04  Eric Christopher  <echristo@redhat.com>
2569         * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents):
2570         Clean up gp handling code.
2572 2005-04-04  H.J. Lu  <hongjiu.lu@intel.com>
2574         * elf.c (bfd_elf_set_group_contents): Ignore linker created
2575         group section.
2576         (assign_section_numbers): Accept link_info. Check SHT_GROUP
2577         sections for relocatable files only. Remove the linker created
2578         group sections.
2579         (_bfd_elf_compute_section_file_positions): Pass link_info to
2580         assign_section_numbers.
2582         * elfxx-ia64.c (elfNN_ia64_object_p): New.
2583         (elf_backend_object_p): Defined.
2585 2005-04-04  H.J. Lu  <hongjiu.lu@intel.com>
2587         * elf-bfd.h (elf_section_data): Use (sec) instead of sec.
2589 2005-04-03  Fred Fish  <fnf@specifixinc.com>
2591         * dwarf2.c (struct dwarf2_debug): Add dwarf_ranges_buffer and
2592         dwarf_ranges_size members.
2593         (struct comp_unit): Add base_address member.
2594         (struct funcinfo): Replace low/high members with an arange.
2595         (arange_add): Replace incoming "unit" parameter with "abfd" and
2596         "first_arange" pointers.  Reorganize/rewrite function body.
2597         (decode_line_info): Change arange_add call to pass bfd and arange
2598         pointers.
2599         (lookup_address_in_line_info_table): Use arange list instead of
2600         individual low/high members.  Walk function's arange list to find
2601         lowest PC in list, to test for overlapping functions.
2602         (read_debug_ranges): New function, reads the debug_ranges section.
2603         (lookup_address_in_function_table): Use arange list instead of
2604         individual low/high members.  Rewrite to find smallest range that
2605         matches.
2606         (read_rangelist): Read a given rangelist from debug_ranges.
2607         (scan_unit_for_functions): Use arange list instead of individual
2608         low/high members.  Handle a DW_AT_ranges attribute.
2609         (parse_comp_unit): Use arange list instead of individual low/high
2610         members.  Save comp unit base address.  Handle a DW_AT_ranges
2611         attribute.
2613 2005-04-01  H.J. Lu  <hongjiu.lu@intel.com>
2615         * elf.c (assign_section_numbers): Really use the kept section.
2617 2005-03-31  H.J. Lu  <hongjiu.lu@intel.com>
2619         * elf-bfd.h (_bfd_elf_check_kept_section): New.
2621         * elf.c (assign_section_numbers): When sh_link points to a
2622         discarded section, call _bfd_elf_check_kept_section to see if
2623         the kept section can be used. Otherwise reject sh_link
2624         pointing to discarded section.
2626         * elflink.c (_bfd_elf_check_kept_section): New.
2627         (elf_link_input_bfd): Use it.
2629 2005-04-01  Alan Modra  <amodra@bigpond.net.au>
2631         * elf64-ppc.c (ppc64_elf_edit_toc): Account for dynamic relocs
2632         that we no longer need.
2634 2005-04-01  Alan Modra  <amodra@bigpond.net.au>
2636         * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Return -1 on errors
2637         rather than 0.
2638         (ppc64_elf_check_relocs): Remove unnecessary SEC_ALLOC check.
2640 2005-03-31  H.J. Lu  <hongjiu.lu@intel.com>
2642         * elf.c (assign_section_numbers): Fix a typo.
2644 2005-03-31  H.J. Lu  <hongjiu.lu@intel.com>
2646         * elflink.c (elf_link_input_bfd): Remove the extra `\n' in
2647         error message.
2648         (_bfd_elf_section_already_linked): Likewise.
2650 2005-03-31  Jerome Guitton  <guitton@gnat.com>
2652         * config.in: Regenerate.
2654 2005-03-31  Jerome Guitton  <guitton@gnat.com>
2656         * config.in (HAVE_DECL_BASENAME): New configure macro.
2657         * configure.in: Check for basename.
2658         * configure: Regenerate.
2660 2005-03-30  Julian Brown  <julian@codesourcery.com>
2662         * bfd-in.h (bfd_is_arm_mapping_symbol_name): Rename from
2663         bfd_elf32_is_arm_mapping_symbol_name.
2664         * bfd-in2.h: Regenerate.
2665         * cpu-arm.c (bfd_is_arm_mapping_symbol_name): Rename from
2666         bfd_elf32_is_arm_mapping_symbol_name.
2667         * elf32-arm.c (elf32_arm_is_target_special_symbol): Rename
2668         bfd_elf32_is_arm_mapping_symbol_name to bfd_is_arm_mapping_symbol_name.
2669         (arm_elf_find_function): Likewise.
2670         (elf32_arm_output_symbol_hook): Likewise.
2672 2005-03-30  Julian Brown  <julian@codesourcery.com>
2674         * bfd-in.h (bfd_elf32_is_arm_mapping_symbol_name): Add prototype.
2675         * bfd-in2.h: Regenerate.
2676         * elf32-arm.c (elf32_arm_is_target_special_symbol): Rename call to
2677         bfd_elf32_is_arm_mapping_symbol_name.
2678         (elf32_arm_output_symbol_hook): Likewise.
2679         (arm_elf_find_function): Likewise, and include STT_NOTYPE in test for
2680         mapping symbols.
2681         (is_arm_mapping_symbol_name): Function moved from here...
2682         * cpu-arm.c (bfd_elf32_is_arm_mapping_symbol_name): ...to here, renamed
2683         and made global.
2685 2005-03-29  Aaron W. LaFramboise  <aaron98wiridge9@aaronwl.com>
2687         * configure.in: Check for ffs decl and alphabetize.
2688         * config.in: Regenerate.
2689         * configure: Regenerate.
2690         * sysdep.h [NEED_DECLARATION_FFS] (ffs): Prototype and alphabetize.
2692 2005-03-29  Fred Fish  <fnf@specifixinc.com>
2694         * dwarf2.c (struct comp_unit): Fix typo.
2695         (scan_unit_for_functions): Remove unused local variable "name"
2696         and dead code that set it.
2698 2005-03-29  Daniel Jacobowitz  <dan@codesourcery.com>
2699             Phil Blundell  <philb@gnu.org>
2701         * bfd-in2.h, libbfd.h: Regenerated.
2702         * reloc.c: Add ARM TLS relocations.
2703         * elf32-arm.c (elf32_arm_howto_table): Add dynamic TLS
2704         relocations.
2705         (elf32_arm_tls_gd32_howto, elf32_arm_tls_ldo32_howto)
2706         (elf32_arm_tls_ldm32_howto, elf32_arm_tls_le32_howto)
2707         (elf32_arm_tls_ie32_howto): New.
2708         (elf32_arm_howto_from_type): Support TLS relocations.
2709         (elf32_arm_reloc_map): Likewise.
2710         (elf32_arm_reloc_type_lookup): Likewise.
2711         (TCB_SIZE): Define.
2712         (struct elf32_arm_obj_tdata): New.
2713         (elf32_arm_tdata, elf32_arm_local_got_tls_type): Define.
2714         (elf32_arm_mkobject): New function.
2715         (struct elf32_arm_relocs_copied): Add pc_count.
2716         (elf32_arm_hash_entry, GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD)
2717         (GOT_TLS_IE): Define.
2718         (struct elf32_arm_link_hash_table): Add tls_ldm_got.
2719         (elf32_arm_link_hash_newfunc): Initialize tls_type.
2720         (elf32_arm_copy_indirect_symbol): Copy pc_count and tls_type.
2721         (elf32_arm_link_hash_table_create): Initialize tls_ldm_got.
2722         (dtpoff_base, tpoff): New functions.
2723         (elf32_arm_final_link_relocate): Handle TLS relocations.
2724         (IS_ARM_TLS_RELOC): Define.
2725         (elf32_arm_relocate_section): Warn about TLS mismatches.
2726         (elf32_arm_gc_sweep_hook): Handle TLS relocations and pc_count.
2727         (elf32_arm_check_relocs): Detect invalid symbol indexes.  Handle
2728         TLS relocations and pc_count.
2729         (elf32_arm_adjust_dynamic_symbol): Check non_got_ref.
2730         (allocate_dynrelocs): Handle TLS.  Bind REL32 relocs to local
2731         calls.
2732         (elf32_arm_size_dynamic_sections): Handle TLS.
2733         (elf32_arm_finish_dynamic_symbol): Likewise.
2734         (bfd_elf32_mkobject): Define.
2736 2005-03-29  Daniel Jacobowitz  <dan@codesourcery.com>
2738         * elf32-arm.c (elf32_arm_check_relocs): Increment count for all
2739         relocation types.  Don't count relocations which will use a PLT.
2741 2005-03-29  Joel Brobecker  <brobecker@gnat.com>
2743         * elf.c (elfcore_grok_nto_status): Print tid as long.
2744         (elfcore_grok_nto_regs): Likewise.
2746 2005-03-29  Joel Brobecker  <brobecker@gnat.com>
2748         * irix-core.c: Remove some unnecessary prototypes.
2750 2005-03-28  Joel Brobecker  <brobecker@adacore.com>
2752         * irix-core.c: Convert to ISO C.
2754 2005-03-28  Joel Brobecker  <brobecker@adacore.com>
2756         * irix-core.c (do_sections): Replace + by | in expression.
2757         (irix_core_core_file_matches_executable_p): Add ATTRIBUTE_UNUSED
2758         to unused parameters to avoid a compiler warning.
2760 2005-03-28  Mark Kettenis  <kettenis@gnu.org>
2762         * netbsd-core.c: Convert to ISO C.  Fix formatting.
2764 2005-03-24  Eric Christopher  <echristo@redhat.com>
2766         * elfxx-mips.c: Revert previous patch.
2768 2005-03-24  Nick Clifton  <nickc@redhat.com>
2770         * targets.c (_bfd_target_vector): Only include the
2771         bfd_elf32_ia64_hpux_big_vec vector when building a 64-bit BFD with
2772         all targets enabled.
2774 2005-03-24  James E Wilson  <wilson@specifixinc.com>
2776         * Makefile.am (BFD32_BACKENDS): Delete elf32-ia64.lo.
2777         (BFD64_BACKENDS): Add elf32-ia64.lo.
2778         * Makefile.in: Regenerate.
2780 2005-03-23  Eric Christopher  <echristo@redhat.com>
2782         * elfxx-mips.c (MIPS_ELF_READONLY_SECTION): New.
2783         (mips_elf_calculate_relocation): Use. Define DF_TEXTREL
2784         after emitting relocation.
2785         (_bfd_mips_elf_adjust_dynamic_symbol): Ditto.
2786         (_bfd_mips_elf_check_relocs): Remove code to set DF_TEXTREL
2787         and readonly_reloc.
2789 2005-03-23  Mike Frysinger  <vapier@gentoo.org>
2790             Nick Clifton  <nickc@redhat.com>
2792         * config.bfd: Accept any C library to accompany a GNU Linux
2793         implementation, not just the GNU C library.
2794         * configure.in: Likewise.
2795         * configure: Regenerate.
2797 2005-03-22  H.J. Lu  <hongjiu.lu@intel.com>
2799         * bfd-in.h (_bfd_elf_provide_symbol): New.
2800         * bfd-in2.h: Regenerated.
2802         * elf32-ppc.c (set_linker_sym): Moved to elflink.c.
2803         (ppc_elf_set_sdata_syms): Call _bfd_elf_provide_symbol instead
2804         of set_linker_sym.
2806         * elflink.c (_bfd_elf_provide_symbol): New. Moved and renamed
2807         from elf32-ppc.c.
2809 2005-03-22  Hans-Peter Nilsson  <hp@axis.com>
2811         * hash.c (strtab_hash_newfunc): Fix typo in allocated size.
2813 2005-03-22  Bob Wilson  <bob.wilson@acm.org>
2815         * xtensa-isa.c (xtensa_opcode_lookup, xtensa_state_lookup,
2816         xtensa_sysreg_lookup_name, xtensa_interface_lookup,
2817         xtensa_funcUnit_lookup): Skip bsearch call if count is zero.
2818         (xtensa_opcode_decode): Rearrange code.
2820 2005-03-22  Nick Clifton  <nickc@redhat.com>
2822         * binary.c: Convert to ISO C90 formatting.
2823         * coff-arm.c: Convert to ISO C90 formatting.
2824         * coffgen.c: Convert to ISO C90 formatting.
2825         * elf32-gen.c: Convert to ISO C90 formatting.
2826         * elf64-gen.c: Convert to ISO C90 formatting.
2827         * hash.c: Convert to ISO C90 formatting.
2828         * ieee.c: Convert to ISO C90 formatting.
2830 2005-03-22  Daniel Jacobowitz  <dan@codesourcery.com>
2832         * elf32-arm.c (elf32_arm_final_link_relocate): Don't fail for
2833         unresolved symbols in R_ARM_NONE relocations.
2835 2005-03-22  Daniel Jacobowitz  <dan@codesourcery.com>
2837         * elf32-arm.c (elf32_arm_final_link_relocate): Add
2838         UNRESOLVED_RELOC_P argument.  Set it appropriately.
2839         (elf32_arm_relocate_section): Update call to
2840         elf32_arm_final_link_relocate.  Don't clobber RELOCATION; use
2841         unresolved_reloc instead.
2843 2005-03-23  Alan Modra  <amodra@bigpond.net.au>
2845         * elflink.c (elf_link_add_object_symbols): Set SEC_EXCLUDE on
2846         .gnu.warning.* sections.
2848 2005-03-22  Alan Modra  <amodra@bigpond.net.au>
2850         * elf32-ppc.c (elf_linker_section_pointers_t): Remove
2851         written_address_p.
2852         (ppc_elf_create_linker_section): Don't try to reuse existing section.
2853         (elf_create_pointer_linker_section): Delete info parm.  Don't make
2854         h dynamic.  Don't set written_address_p.
2855         (ppc_elf_check_relocs): Adjust ppc_elf_create_linker_section calls.
2856         (bfd_put_ptr): Delete.
2857         (elf_finish_pointer_linker_section): Remove output_bfd and info parms.
2858         Always write section contents.  Assert global sym is def_regular.
2859         Use offset bottom bit as a written flag.
2860         (ppc_elf_relocate_section): Adjust elf_finish_pointer_linker_section
2861         calls.
2863 2005-03-22  Alan Modra  <amodra@bigpond.net.au>
2865         * elf32-ppc.c (ppc_elf_set_sdata_syms): New function, extracted from..
2866         (ppc_elf_set_sdata_syms): ..here.  Expand comment.  Set .sbss start
2867         and end syms.
2869 2005-03-21  Nick Clifton  <nickc@redhat.com>
2871         * coff-arm.c (coff_link_hash_entry): Only define for non WINCE
2872         targets.
2873         (t2a1_bx_pc_insn): Likewise.
2874         (t2a2_noop_insn): Likewise.
2875         (t2a3_b_insn): Likewise.
2876         (t2a1_push_insn): Likewise.
2877         (t2a2_ldr_insn): Likewise.
2878         (t2a3_mov_insn): Likewise.
2879         (t2a4_bx_insn): Likewise.
2880         (t2a5_pop_insn): Likewise.
2881         (t2a6_bx_insn): Likewise.
2882         (coff_arm_relocate_section): Only declare the high_address
2883         variable for non WINCE targets.
2885 2005-03-22  Alan Modra  <amodra@bigpond.net.au>
2887         * elf32-ppc.c (ppc_elf_add_symbol_hook): Make htab->sbss
2888         SEC_LINKER_CREATED.  Attach to dynobj.
2889         (ppc_elf_size_dynamic_sections): Strip htab->sbss if zero size.
2891 2005-03-21  Alan Modra  <amodra@bigpond.net.au>
2893         * elf32-ppc.c (struct elf_linker_section): Remove sym_hash and
2894         sym_offset.  Add name, bss_name, sym_name, sym_val.
2895         (struct ppc_elf_link_hash_table): Remove sdata and sdata2 pointers.
2896         Add sdata array of elf_linker_section_t.
2897         (ppc_elf_link_hash_table_create): Set name, sym_name, and bss_name.
2898         (enum elf_linker_section_enum): Delete.
2899         (ppc_elf_create_linker_section): Rewrite.  Don't create syms here.
2900         (ppc_elf_check_relocs): Delay ppc_elf_create_linker_section until
2901         the special sections are needed.  Adjust htab->sdata refs.
2902         Ensure dynobj is set in sreloc code.
2903         (ppc_elf_size_dynamic_sections): Strip sdata sections.
2904         (ppc_elf_set_sdata_syms): New function.
2905         (elf_finish_pointer_linker_section): Use 0x8000 for sym_offset.
2906         (ppc_elf_relocate_section): Adjust references to htab->sdata.  Use
2907         sym_val instead of sym_hash.
2908         * elf32-ppc.h (ppc_elf_set_sdata_syms): Declare.
2910 2005-03-21  Alan Modra  <amodra@bigpond.net.au>
2912         * elf32-ppc.c (is_ppc_elf_target): Move to linker part of file.
2913         (ppc_elf_merge_private_bfd_data): Likewise.
2915 2005-03-21  Alan Modra  <amodra@bigpond.net.au>
2917         * elf32-ppc.c (struct elf_linker_section): Remove rel_section.
2918         (ppc_elf_create_linker_section): Don't create rel_section.
2919         (elf_create_pointer_linker_section): Don't size relocs.
2920         (elf_finish_pointer_linker_section): Remove relative_reloc parm.
2921         Don't generate relocs.
2922         (ppc_elf_relocate_section): Adjust calls to
2923         elf_finish_pointer_linker_section.
2925 2005-03-21  Alan Modra  <amodra@bigpond.net.au>
2927         * elf32-ppc.c (is_ppc_elf_target): New function.
2928         (ppc_elf_merge_private_bfd_data): Use it rather than just testing
2929         for bfd_target_elf_flavour.  Do this test before endian check.
2930         (ppc_elf_add_symbol_hook): Use is_pcc_elf_target.
2931         (ppc_elf_size_dynamic_sections): Likewise.
2933 2005-03-20  H.J. Lu  <hongjiu.lu@intel.com>
2935         * elf-bfd.h (elf_backend_data): Add int to
2936         elf_backend_section_from_shdr.
2937         (bfd_elf_section_data): Update comment for this_idx.
2938         (_bfd_elf_make_section_from_shdr): Add int.
2939         * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
2941         * elf.c (_bfd_elf_make_section_from_shdr): Take section index
2942         and use it to set this_idx in bfd_elf_section_data.
2943         (bfd_section_from_shdr): Pass shindex to
2944         _bfd_elf_make_section_from_shdr.
2945         (_bfd_elf_section_from_bfd_section): Use this_idx in
2946         bfd_elf_section_data to find section index.
2948         * elf32-arm.c (elf32_arm_section_from_shdr): Take section
2949         index and pass it to _bfd_elf_make_section_from_shdr.
2950         * elf32-i370.c(i370_elf_section_from_shdr): Likewise.
2951         * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
2952         * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
2953         * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
2954         * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
2955         * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
2956         * elf64-x86-64.c (elf64_x86_64_section_from_shdr): Likewise.
2957         * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
2958         * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
2960 2005-03-19  Danny Smith <dannysmith@users.sourceforge.net>
2961             Ross Ridge  <rridge@csclub.uwaterloo.ca>
2963         * peicode.h (pe_ILF_build_a_bfd): Strip only one prefix
2964         character in IMPORT_NAME_UNDECORATE and IMPORT_NAME_NOPREFIX
2965         cases.  Add comment.
2967 2005-03-18  H.J. Lu  <hongjiu.lu@intel.com>
2969         * elflink.c (elf_mark_used_section): Remove check for special
2970         sections.
2972 2005-03-18  Andreas Schwab  <schwab@suse.de>
2974         * elfxx-ia64.c (elfNN_ia64_install_value): Change type of insn
2975         from bfd_vma to ia64_insn, remove broken cast.
2977 2005-03-18  C Jaiprakash  <cjaiprakash@noida.hcltech.com>
2979         * elf32-m68k.c (elf_cfv4e_plt0_entry): plt entry for coldfire v4e.
2980         (elf_m68k_adjust_dynamic_symbol,elf_m68k_finish_dynamic_symbol,
2981          elf_m68k_finish_dynamic_sections): Use it.
2983 2005-03-17  Paul Brook <paul@codesourcery.com>
2984             Dan Jacobowitz <dan@codesourcery.com>
2985             Mark Mitchell  <mark@codesourcery.com>
2987         * elf32-arm.c (elf32_arm_modify_segment_map): New function.
2988         (elf32_arm_additional_program_headers): Likewise.
2989         (elf_backend_modify_segment_map): Define.
2990         (elf_backend_additional_program_headers): Likewise.
2991         (elf32_arm_symbian_modify_segment_map): Use
2992         elf32_arm_modify_segment_map.
2994 2005-03-18  H.J. Lu  <hongjiu.lu@intel.com>
2996         * elflink.c (elf_mark_used_section): Check bfd_is_const_section
2997         for special sections.
2999 2005-03-18  Alan Modra  <amodra@bigpond.net.au>
3001         * elf-bfd.h (_bfd_elf_link_renumber_dynsyms): Delete.
3002         * elflink.c (_bfd_elf_link_renumber_dynsyms): Make static, add
3003         section_sym_count param, and return number of section symbols.
3004         (bfd_elf_size_dynamic_sections): Clear section symbol area of
3005         .dynsym contents.  Don't bother calling swap_symbol_out on the
3006         first all-zero dynsym.
3007         (elf_mark_used_section): Formatting.  Avoid twiddling flags in
3008         special sections like bfd_abs_section.
3009         (bfd_elf_gc_sections): Spelling fix.
3011 2005-03-16  Fred Fish  <fnf@specifixinc.com>
3013         PR binutils/790
3014         * dwarf2.c (read_indirect_string): Fix apparent typo, check
3015         dwarf_str_buffer allocation, not dwarf_abbrev_buffer.
3017 2005-03-16  H.J. Lu  <hongjiu.lu@intel.com>
3019         * elflink.c (elf_mark_used_section): New.
3020         (bfd_elf_gc_sections): Call elf_gc_mark_section for
3021         non-relocatable link if we don't do GC.
3023 2005-03-16  Nick Clifton  <nickc@redhat.com>
3024             Ben Elliston  <bje@au.ibm.com>
3026         * configure.in (werror): New switch: Add -Werror to the
3027         compiler command line.  Enabled by default.  Disable via
3028         --disable-werror.
3029         * configure: Regenerate.
3031 2005-03-16  Nick Clifton  <nickc@redhat.com>
3033         * ecoff.c: Convert to ISO C90 formatting.
3035 2005-03-16  Alan Modra  <amodra@bigpond.net.au>
3037         * elf32-ppc.c: Divide file into general and linker specific
3038         functions.  Sort linker functions into roughly the order in which
3039         they are called by the ELF linker code.
3041 2005-03-16  Alan Modra  <amodra@bigpond.net.au>
3043         * elf32-ppc.c (ppc_elf_create_linker_section): Set SEC_LINKER_CREATED
3044         on section.  Correct comment, and add FIXME.
3045         (ppc_elf_additional_program_headers): Don't bump header count for
3046         interp.  Test SEC_ALLOC, not SEC_LOAD, and don't test size.
3047         (ppc_elf_size_dynamic_sections): Don't strip sdata and sdata2, but
3048         do allocate memory if they need it.
3050 2005-03-15  Mikkel Krautz  <krautz@gmail.com>
3052         * config.bfd (x86_64-elf): Add target.
3054 2005-03-15  Alan Modra  <amodra@bigpond.net.au>
3056         * po/es.po: Commit new Spanish translation.
3058 2005-03-14  H.J. Lu  <hongjiu.lu@intel.com>
3060         * elfxx-ia64.c (elfNN_ia64_relocate_section): Set symbo name
3061         for global symbol when reporting overflow.
3063 2005-03-11  Jakub Jelinek  <jakub@redhat.com>
3065         * libbfd-in.h (_bfd_ar_spacepad): New prototype.
3066         * libbfd.h: Rebuilt.
3067         * archive.c (_bfd_ar_spacepad): New function.
3068         (_bfd_construct_extended_name_table, _bfd_write_archive_contents,
3069         bsd_write_armap, _bfd_archive_bsd_update_armap_timestamp,
3070         coff_write_armap): Use it.
3071         (bfd_ar_hdr_from_filesystem): Likewise.  Fix HP-UX large
3072         uid/gid support.
3073         * archive64.c (bfd_elf64_archive_write_armap): Use _bfd_ar_spacepad.
3075 2005-03-10  Mark Kettenis  <kettenis@gnu.org>
3077         * archive.c (_bfd_look_for_bfd_in_cache): Move declaration of
3078         has_table to the start of the function.
3080 2005-03-10  Ben Elliston  <bje@au.ibm.com>
3082         * archive.c: Include hashtab.h.
3083         (struct ar_cache): Rename `arelt' to `arbfd' and remove `next'.
3084         (_bfd_look_for_bfd_in_cache): Reimplement using htab_find.
3085         (hash_file_ptr): New function.
3086         (eq_file_ptr): Likewise.
3087         (_bfd_add_bfd_to_archive_cache): Reimplement using a hash table.
3088         * libbfd-in.h: Include hashtab.h.
3089         (struct artdata): Change `cache' member type to htab_t.
3090         * libbfd.h: Rebuild.
3092 2005-03-08  Daniel Jacobowitz  <dan@codesourcery.com>
3094         * configure.in: Bump version to 2.16.90.
3095         * configure: Regenerated.
3097 2005-03-07  Jakub Jelinek  <jakub@redhat.com>
3099         * opncls.c (opncls_bread, opncls_bclose): Fix if pread resp.
3100         close is a function like macro in system headers.
3102 2005-03-07  Alan Modra  <amodra@bigpond.net.au>
3104         PR ld/778
3105         * elf32-hppa.c (elf32_hppa_create_dynamic_sections): Reinstate
3106         _GLOBAL_OFFSET_TABLE_ as a normal dynamic symbol.
3108 2005-03-06  Alan Modra  <amodra@bigpond.net.au>
3110         * elf.c (elfcore_grok_win32pstatus): Warning fixes.
3112 2005-03-05  Alan Modra  <amodra@bigpond.net.au>
3114         * po/bfd.pot: Regenerate.
3116 2005-03-05  Alan Modra  <amodra@bigpond.net.au>
3118         * elf64-ppc.c (update_plt_info): Don't mark new ABI call syms
3119         with is_func.
3120         (func_desc_adjust): Force dot-syms local in executables as well
3121         as shared libs.
3123 2005-03-04  David Daney  <ddaney@avtrex.com>
3125         * elfxx-mips.c (mips_elf_calculate_relocation): Handle special
3126         '__gnu_local_gp' symbol used by gas -mno-shared.
3128 2005-03-03  H.J. Lu  <hongjiu.lu@intel.com>
3130         * elf-bfd.h (elf_backend_data): Add "const char *" to
3131         elf_backend_section_from_phdr.
3133         * elf.c (bfd_section_from_phdr): Pass "proc" to the
3134         elf_backend_section_from_phdr hook.
3136 2005-03-02  Daniel Jacobowitz  <dan@codesourcery.com>
3137             Joseph Myers  <joseph@codesourcery.com>
3139         * elfxx-mips.c (struct mips_got_entry): Add tls_type.
3140         (struct mips_got_info): Add tls_gotno, tls_assigned_gotno,
3141         and tls_ldm_offset.
3142         (struct mips_elf_got_per_bfd_arg): Add global_count.
3143         (struct mips_elf_count_tls_arg): New.
3144         (struct mips_elf_hash_sort_data): Update comment for min_got_dynindx.
3145         (struct mips_elf_link_hash_entry): Add tls_type and tls_got_offset.
3146         (GOT_NORMAL, GOT_TLS_GD, GOT_TLS_LDM, GOT_TLS_IE)
3147         (GOT_TLS_OFFSET_DONE, GOT_TLS_DONE): Define.
3148         (TLS_RELOC_P): Define.
3149         (TP_OFFSET, DTP_OFFSET): Define.
3150         (dtprel_base, tprel_base): New functions.
3151         (mips_elf_link_hash_newfunc): Initialize tls_type.
3152         (mips_elf_got_entry_hash, mips_elf_got_entry_eq)
3153         (mips_elf_multi_got_entry_hash, mips_elf_multi_got_entry_eq): Handle
3154         TLS entries.
3155         (mips_tls_got_relocs, mips_elf_count_local_tls_relocs)
3156         (mips_elf_count_global_tls_entries, mips_elf_count_global_tls_relocs)
3157         (mips_elf_output_dynamic_relocation, mips_elf_initialize_tls_slots)
3158         (mips_tls_got_index): New functions.
3159         (mips_elf_local_got_index): Add new R_SYMNDX, H, and R_TYPE
3160         arguments.  Pass them to mips_elf_create_local_got_entry.  Use
3161         mips_tls_got_index.
3162         (mips_elf_global_got_index): Add new R_TYPE and INFO arguments.
3163         Handle TLS entries.
3164         (mips_elf_got_page, mips_elf_got16_entry): Update calls to
3165         mips_elf_create_local_got_entry.
3166         (mips_elf_create_local_got_entry): Add new R_SYMNDX, H, and R_TYPE
3167         arguments.  Handle TLS entries.
3168         (mips_elf_sort_hash_table_f): Add non-TLS assertions.
3169         (mips_elf_record_local_got_symbol): Add new TLS_FLAG argument.  Handle
3170         TLS entries.
3171         (mips_elf_record_global_got_symbol): Likewise.
3172         (mips_elf_make_got_per_bfd): Initialize new mips_got_info members.
3173         Count TLS entries.
3174         (mips_elf_merge_gots): Handle TLS entries when merging.
3175         (mips_elf_initialize_tls_index): New function.
3176         (mips_elf_set_global_got_offset): Handle TLS entries.
3177         (mips_elf_adjust_gp): Handle TLS.
3178         (mips_elf_multi_got): Remove redundant call to
3179         mips_elf_resolve_final_got_entries.  Initialize global_count.
3180         Correct a comment.  Initialize new TLS members of mips_got_info.
3181         Assign TLS GOT indexes for new GOTs.
3182         (mips_elf_create_got_section): Initialize new TLS members of
3183         mips_got_info.
3184         (mips_elf_calculate_relocation): Handle TLS relocs.
3185         (_bfd_mips_elf_check_relocs): Likewise.  Update calls to changed
3186         functions.
3187         (_bfd_mips_elf_always_size_sections): Handle TLS.
3188         (_bfd_mips_elf_size_dynamic_sections): Likewise.
3189         (_bfd_mips_elf_finish_dynamic_symbol): Likewise.  Update calls to
3190         changed functions.
3191         (_bfd_mips_elf_copy_indirect_symbol): Copy tls_type.
3192         (_bfd_mips_elf_hide_symbol): Handle TLS.
3193         * elfn32-mips.c (elf_mips_howto_table_rel, elf_mips_howto_table_rela)
3194         (mips_reloc_map): Add TLS relocs.
3195         * elf32-mips.c (elf_mips_howto_table_rel, mips_reloc_map): Likewise.
3196         * elf64-mips.c (mips_elf64_howto_table_rel)
3197         (mips_elf64_howto_table_rela, mips_reloc_map): Likewise.
3198         * reloc.c: Define new MIPS TLS relocations.
3199         * libbfd.h, bfd-in2.h: Regenerated.
3201 2005-03-02  Jan Beulich  <jbeulich@novell.com>
3203         * Makefile.am: Add dependency of cache.o on libiberty.h.
3204         * cache.c: Include libiberty.h.
3205         (bfd_open_file): Use unlink_if_ordinary instead of unlink.
3207 2005-03-01  Zack Weinberg  <zack@codesourcery.com>
3209         * elf.c (bfd_section_from_shdr <default case>): Call
3210         elf_backend_section_from_shdr hook unconditionally, and return
3211         what it returns.
3212         (bfd_section_from_phdr): Similarly, for elf_backend_section_from_phdr.
3213         * elfxx-target.h (elf_backend_section_from_shdr)
3214         (elf_backend_section_from_phdr): Default to
3215         _bfd_elf_make_section_from_shdr and _bfd_elf_make_section_from_phdr
3216         respectively.
3218 2005-03-01  Alan Modra  <amodra@bigpond.net.au>
3220         * targets.h: Typo fix.
3221         * bfd-in2.h: Regenerate.
3223         * bout.c (b_out_write_object_contents): Don't use sizeof on host
3224         structs to size on-disk structures.
3225         (b_out_set_section_contents): Size the external struct, not the
3226         internal one for on-disk size.
3227         (b_out_sizeof_headers): Likewise.
3229 2005-03-01  Alan Modra  <amodra@bigpond.net.au>
3231         * elf64-ppc.c (ppc64_elf_size_stubs): Override defined dot-sym
3232         entry points with the func descriptor as well as undefweak.
3234 2005-02-28  Ross Ridge  <rridge@csclub.uwaterloo.ca>
3236         * peicode.h (pe_ILF_build_a_bfd): Do not assume that an @ will be
3237         present when IMPORT_NAME_UNDOECRATE is used.
3239 2005-02-28  H.J. Lu  <hongjiu.lu@intel.com>
3241         PR 757
3242         * elf-bfd.h (_bfd_elf_merge_symbol): Add a pointer to unsigned
3243         int.
3245         * elf32-sh-symbian.c (sh_symbian_relocate_section): Pass NULL
3246         to _bfd_elf_merge_symbol.
3248         * elflink.c (_bfd_elf_merge_symbol): Use the pointer to
3249         unsigned int to return the alignment of the old common symbol
3250         in the dynamic object.
3251         (_bfd_elf_add_default_symbol): Pass NULL to
3252         _bfd_elf_merge_symbol.
3253         (elf_link_add_object_symbols): Pass &old_alignment to
3254         _bfd_elf_merge_symbol. Get the alignment of the new common
3255         symbol in the dynamic object.
3257 2005-02-24  Ben Elliston  <bje@au.ibm.com>
3259         * coffcode.h (coff_sym_filepos): Remove GNU960 conditional code.
3260         * format.c (bfd_check_format_matches): Likewise.
3261         * archive.c (BFD_GNU960_ARMAG): Likewise.
3262         (bfd_generic_archive_p): Likewise.
3263         (_bfd_write_archive_contents): Likewise.
3265 2005-02-24  H.J. Lu  <hongjiu.lu@intel.com>
3267         * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.95.
3268         * configure: Regenerate.
3270 2005-02-24  Julian Brown  <julian@sirius.codesourcery.com>
3272         * elflink.c (elf_link_add_object_symbols): Force symbols in discarded
3273         COMDAT group sections to have default visibility.
3275 2005-02-24  Alan Modra  <amodra@bigpond.net.au>
3277         * coffcode.h (coff_print_aux): Warning fix.
3278         * elf-m10300.c (mn10300_elf_relax_section): Use section->id
3279         instead of section pointer to identify.
3280         * coff-h8300.c (h8300_reloc16_extra_cases): Likewise.  Allocate
3281         the correct size buffer for local sym mangling too.
3282         (h8300_bfd_link_add_symbols): Likewise.
3283         * elf32-sh-symbian.c (sh_symbian_process_embedded_commands): Fix
3284         warning.
3285         * elf32-sh64.c (shmedia_prepare_reloc): Use %B and %p in error message
3286         * elf32-xtensa.c (literal_value_hash): Warning fix.
3287         * versados.c (process_otr): Warning fix.
3288         (versados_canonicalize_reloc): Likewise.
3289         * vms-gsd.c (_bfd_vms_slurp_gsd): Warning fix.
3290         * vms.c (fill_section_ptr): Warning fix.
3292 2005-02-23  H.J. Lu  <hongjiu.lu@intel.com>
3294         * coff-tic54x.c (SWAP_OUT_RELOC_EXTRA): Defined.
3295         * coff-tic80.c (SWAP_OUT_RELOC_EXTRA): Likewise.
3297 2005-02-23  Nick Clifton  <nickc@redhat.com>
3299         * elfxx-mips.c (mips_elf_create_dynamic_relocation): Initialise
3300         the relvaddr field of the Elf32_crinfo structure.
3302         * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Initialise
3303         variables that are passed by reference to
3304         m68hc11_get_relocation_value in case that function does not
3305         initialise them.
3307         * elf32-cr16c.c (cr16c_elf_final_link_relocate): Remove duplicated
3308         return statements and replace with a single return at the end of
3309         the function.  This helps pacify the flow analysis code in gcc 4.0.
3311         * elf.c (_bfd_elf_compute_section_file_positions): Initialise
3312         strtab to avoid compile time warning.
3314 2005-02-23  Ben Elliston  <bje@au.ibm.com>
3316         * opncls.c (bfd_zalloc): Document this function.
3318 2005-02-21  H.J. Lu  <hongjiu.lu@intel.com>
3320         * coffcode.h (sec_to_styp_flags): Replaced SEC_CLINK with
3321         SEC_TIC54X_CLINK. Replace SEC_BLOCK with SEC_TIC54X_BLOCK.
3322         Replace SEC_SHARED with SEC_COFF_SHARED.
3323         (styp_to_sec_flags): Likewise.
3325         * elfxx-target.h (TARGET_BIG_SYM): Remove SEC_ARCH_BIT_0.
3326         (TARGET_LITTLE_SYM): Likewise.
3328         * section.c (SEC_ARCH_BIT_0): Removed.
3329         (SEC_LINK_DUPLICATES_SAME_CONTENTS): Defined with
3330         SEC_LINK_DUPLICATES_ONE_ONLY and SEC_LINK_DUPLICATES_SAME_SIZE.
3331         (SEC_SHARED): Renamed to ...
3332         (SEC_COFF_SHARED): This.
3333         (SEC_BLOCK): Renamed to ...
3334         (SEC_TIC54X_BLOCK): This.
3335         (SEC_CLINK): Renamed to ...
3336         (SEC_TIC54X_CLINK): This.
3337         (SEC_XXX): Rearranged. Move SEC_COFF_SHARED_LIBRARY,
3338         SEC_COFF_SHARED, SEC_TIC54X_BLOCK and SEC_TIC54X_CLINK to the
3339         end.
3340         * bfd-in2.h: Regenerated.
3342 2005-02-21  Fred Fish  <fnf@specifixinc.com>
3344         * dwarf2.c (find_abstract_instance_name): Call recursively
3345         to handle a DW_AT_specification.
3347 2005-02-21  Thiemo Seufer  <seufer@csv.ica.uni-stuttgart.de>
3349         * elfxx-mips.c (ecoff_swap_rpdr_out, mips_elf_output_extsym,
3350         mips_elf_create_dynamic_relocation,
3351         _bfd_mips_elf_size_dynamic_sections, _bfd_mips_elf_final_link):
3352         Remove #if 0'd code.
3354 2005-02-21  Alan Modra  <amodra@bigpond.net.au>
3356         * Makefile.am: Run "make dep-am"
3357         * Makefile.in: Regenerate.
3359 2005-02-21  Alan Modra  <amodra@bigpond.net.au>
3361         * coffgen.c (bfd_coff_get_comdat_section): Check that
3362         coff_section_data isn't NULL.
3364 2005-02-21  Alan Modra  <amodra@bigpond.net.au>
3366         * bfd-in.h (bfd_elf_bfd_from_remote_memory): Warning fix.
3367         * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): Likewise.
3368         * coff-rs6000.c (xcoff_write_armap_big): Warning fixes.  Remove
3369         useless assignments.
3370         (xcoff_write_archive_contents_big): Likewise.
3371         (_bfd_xcoff_put_ldsymbol_name): Likewise.
3372         * coff64-rs6000.c (_bfd_xcoff64_put_ldsymbol_name): Likewise.
3373         * coffgen.c (coff_write_symbols): Make "written" a bfd_vma.
3374         * cofflink.c (process_embedded_commands): Warning fixes.
3375         * cpu-arm.c: Delete unnecessary prototypes.  Convert to C90.
3376         Warning fixes.
3377         * dwarf2.c: Warning fixes.
3378         * elf-bfd.h: Likewise.
3379         * elf-eh-frame.c: Likewise.
3380         * elf-strtab.c: Likewise.
3381         * elf.c: Likewise.
3382         * elf32-m68k.c: Likewise.
3383         * elf32-ppc.c: Likewise.
3384         * elf32-sh-symbian.c: Likewise.
3385         * elf32-sh.c: Delete unnecessary prototypes.  Warning fixes.
3386         * elf64-sh64.c: Likewise.
3387         * peicode.h: Likewise.
3388         * elf64-mmix.c: Warning fixes.
3389         * elfcode.h: Likewise.
3390         * elfxx-mips.c: Likewise.
3391         * libbfd-in.h: Likewise.
3392         * libbfd.c: Likewise.
3393         * mach-o.c: Likewise.
3394         * merge.c: Likewise.
3395         * mmo.c: Likewise.
3396         * opncls.c: Likewise.
3397         * pef.c: Likewise.
3398         * srec.c: Likewise.
3399         * vms-hdr.c: Likewise.
3400         * vms-tir.c: Likewise.
3401         * xtensa-isa.c: Likewise.
3402         * xtensa-modules.c: Likewise.
3403         * xsym.c: Likewise.
3404         (pstrcmp): Use correct choice of string lengths.  Fix return value.
3405         (bfd_sym_module_name): Correct string length.
3406         * bfd-in2.h: Regenerate.
3407         * libbfd.h: Regenerate.
3409 2005-02-17  Alexandre Oliva  <aoliva@redhat.com>
3411         * elf32-frv.c (elf32_frv_relocate_section): Remove warning from
3412         uninitialized check_segment[1] in TLSMOFF case.
3413         Reported by Alan Modra.
3414         (elf32_frv_relocate_section): Improve errors and warnings.
3416 2005-02-17  Alan Modra  <amodra@bigpond.net.au>
3418         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Fix warning.
3420 2005-02-16  Alan Modra  <amodra@bigpond.net.au>
3422         * coff-arm.c (coff_arm_is_local_label_name): Warning fix.
3423         * elf32-frv.c (frvfdpic_relocs_info_hash): Likewise.
3424         * pef.c (bfd_pef_scan): Don't ignore return value of
3425         bfd_pef_scan_start_address.
3426         * mach-o.c (bfd_mach_o_scan): Don't ignore return value of
3427         bfd_mach_o_scan_start_address.
3428         * elfxx-ia64.c (elfNN_ia64_relax_brl): Rewrite for 32-bit bfd_vma.
3429         * elfxx-mips.c: Remove unnecessary prototypes.
3430         (sort_dynamic_relocs_64): Abort if not BFD64.
3432 2005-02-16  Alan Modra  <amodra@bigpond.net.au>
3434         * elf64-ppc.c (ppc64_elf_edit_toc): Skip toc if size is zero.
3435         Skip toc reloc adjust if reloc_count is zero.
3437 2005-02-15  Nigel Stephens  <nigel@mips.com>
3438             Maciej W. Rozycki  <macro@mips.com>
3440         * elf32-mips.c (elf_mips16_howto_table_rel): New array for MIPS16
3441         reloc howtos.  Add R_MIPS16_HI16 and R_MIPS16_LO16 relocs and
3442         R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
3443         (elf_mips16_jump_howto): Move into elf_mips16_howto_table_rel.
3444         (elf_mips16_gprel_howto): Likewise.  Redefine src_mask and
3445         dst_mask.
3446         (mips16_gprel_reloc): Remove bit shuffling; call
3447         _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
3448         and _bfd_mips16_elf_reloc_shuffle() instead.
3449         (mips16_reloc_map): New reloc map for MIPS16 relocs.
3450         (bfd_elf32_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
3451         relocs.
3452         (mips_elf32_rtype_to_howto): Fetch MIPS16 howtos from
3453         elf_mips16_howto_table_rel.
3454         * elf64-mips.c (mips16_elf64_howto_table_rel): New array for
3455         MIPS16 REL reloc howtos.  Add R_MIPS16_HI16 and R_MIPS16_LO16
3456         relocs and R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
3457         (elf_mips16_jump_howto): Move into mips16_elf64_howto_table_rel.
3458         (elf_mips16_gprel_howto): Likewise.  Redefine src_mask and
3459         dst_mask.
3460         (mips16_elf64_howto_table_rela): New array for MIPS16 RELA
3461         reloc howtos.  Add R_MIPS16_26, R_MIPS16_GPREL, R_MIPS16_HI16 and
3462         R_MIPS16_LO16 relocs and R_MIPS16_GOT16 and R_MIPS16_CALL16
3463         placeholders.
3464         (mips16_gprel_reloc): Remove bit shuffling; call
3465         _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
3466         and _bfd_mips16_elf_reloc_shuffle() instead.
3467         (mips16_reloc_map): New reloc map for MIPS16 relocs.
3468         (bfd_elf64_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
3469         relocs.
3470         (mips_elf64_rtype_to_howto): Fetch MIPS16 howtos from
3471         mips16_elf64_howto_table_rela or mips16_elf64_howto_table_rel.
3472         * elfn32-mips.c (elf_mips16_howto_table_rel): New array for MIPS16
3473         REL reloc howtos.  Add R_MIPS16_HI16 and R_MIPS16_LO16 relocs and
3474         R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
3475         (elf_mips16_jump_howto): Move into elf_mips16_howto_table_rel.
3476         (elf_mips16_gprel_howto): Likewise.  Redefine src_mask and
3477         dst_mask.
3478         (mips16_gprel_reloc): Remove bit shuffling; call
3479         _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
3480         and _bfd_mips16_elf_reloc_shuffle() instead.
3481         (mips16_reloc_map): New reloc map for MIPS16 relocs.
3482         (bfd_elf32_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
3483         relocs.
3484         (mips_elf_n32_rtype_to_howto): Fetch MIPS16 howtos from
3485         elf_mips16_howto_table_rela or elf_mips16_howto_table_rel.
3486         * elfxx-mips.c (_bfd_mips16_elf_reloc_unshuffle): New function to
3487         handle bit shuffling for MIPS16 relocs.
3488         (_bfd_mips16_elf_reloc_shuffle): Likewise.
3489         (_bfd_mips_elf_lo16_reloc): Use _bfd_mips16_elf_reloc_unshuffle()
3490         and _bfd_mips16_elf_reloc_shuffle().
3491         (_bfd_mips_elf_generic_reloc): Likewise.
3492         (mips_elf_calculate_relocation): Likewise.  Handle R_MIPS16_HI16
3493         and R_MIPS16_LO16.
3494         (mips_elf_obtain_contents): Remove bit shuffling.
3495         (mips_elf_perform_relocation): Likewise; call
3496         _bfd_mips16_elf_reloc_unshuffle() and _bfd_mips16_elf_reloc_shuffle()
3497         instead.
3498         (_bfd_mips_elf_relocate_section): Likewise.  Handle R_MIPS16_HI16
3499         and R_MIPS16_LO16.
3500         * elfxx-mips.h (_bfd_mips16_elf_reloc_unshuffle): Declare.
3501         (_bfd_mips16_elf_reloc_shuffle): Likewise.
3502         * reloc.c (BFD_RELOC_MIPS16_HI16): New reloc.
3503         (BFD_RELOC_MIPS16_HI16_S): Likewise.
3504         (BFD_RELOC_MIPS16_LO16): Likewise.
3505         * bfd-in2.h: Regenerate.
3506         * libbfd.h: Regenerate.
3508 2005-02-15  Jan Beulich  <jbeulich@novell.com>
3510         * elfxx-ia64.c (ia64_howto_table): Correct strings for
3511         R_IA64_DTPMOD64[LM]SB.
3513 2005-02-14  H.J. Lu  <hongjiu.lu@intel.com>
3515         * elfxx-ia64.c (elfNN_ia64_relax_section): Allow relax
3516         backward branch in the same section.
3517         (elfNN_ia64_relocate_section): Inform users that the input
3518         section is too big to relax br instruction when overflow
3519         happens to R_IA64_PCREL21B, R_IA64_PCREL21BI, R_IA64_PCREL21M
3520         and R_IA64_PCREL21F.
3522 2005-02-14 Orjan Friberg <orjanf@axis.com>
3524         * elfcore.h (elf_core_file_p): Move the call to
3525         elf_backend_object_p to allow the correct machine to be set before
3526         processing the program headers.
3528 2005-02-14  Nick Clifton  <nickc@redhat.com>
3530         PR binutils/716
3531         * peicode.h (pe_bfd_copy_private_bfd_data): Copy the large address
3532         aware flag from the input bfd to the output bfd.
3534 2005-02-11  Maciej W. Rozycki  <macro@mips.com>
3536         * elf32-mips.c (_bfd_mips_elf32_gprel16_reloc): Reject
3537         R_MIPS_LITERAL relocations for external symbols.
3538         * elf64-mips.c (mips_elf64_literal_reloc): Likewise.
3539         * elfn32-mips.c (mips_elf_literal_reloc): Likewise.
3541 2005-02-11  H.J. Lu  <hongjiu.lu@intel.com>
3543         * bfd-in2.h: Rebuilt.
3545 2005-02-11  Paul Brook  <paul@codesourcery.com>
3547         * elf-bfd.h (struct elf_link_hash_table): Add
3548         is_relocatable_executable.
3549         * elf.c (_bfd_elf_link_hash_table_init): Initialize it.
3550         * elflink.c (bfd_elf_link_record_dynamic_symbol): Create local dynamic
3551         symbols in relocatable executables.
3552         (bfd_elf_record_link_assignment): Create dynamic section symbols in
3553         relocatable executables.
3554         (_bfd_elf_link_renumber_dynsyms): Ditto.
3555         (bfd_elf_final_link): Ditto.
3556         * elf32-arm.c (elf32_arm_final_link_relocate): Copy absolute
3557         relocations into relocatable executables.
3558         (elf32_arm_check_relocs): Crate dynamic sections for relocatable
3559         executables.  Also copy absolute relocations.
3560         (elf32_arm_adjust_dynamic_symbol): Don't create copy relocations
3561         in relocatable executables.
3562         (allocate_dynrelocs): Copy relocations for relocatable executables.
3563         Output dynamic symbols for symbols defined in linker scripts.
3565 2005-02-11  Nick Clifton  <nickc@redhat.com>
3567         * libbfd.c (read_signed_leb128): Use an unsigned type for 'shift'
3568         to avoid a compile time warning.
3570         * coff-alpha.c (alpha_adjust_reloc_in): Remove redundant test from
3571         BFD_ASSERT.
3573         * coff-tic4x.c (coff_rtype_to_howto): Move definition before
3574         inclusion of coffcode.h so that it is actually picked up.
3576         * coffcode.h (coff_std_swap_table): Add an unused attribute in
3577         case it is not used.
3579         * elf32-ip2k.c (ip2k_call_opcode, IS_CALL_OPCODE): Remove unused
3580         structure and macro.
3582         * elf32-iq2000.c (iq2000_reloc_map): Remove unused structure and
3583         array.
3585         * elf32-m32r.c (m32r_reloc_map_old): Use #ifdef USE_M32R_OLD_RELOC
3586         to protect the declaration of this array.
3588         * xsym.c (bfd_sym_parse_contained_variables_table_entry_v32):
3589         Avoid call to memcpy with a size of 0.
3591 2005-02-12  Alan Modra  <amodra@bigpond.net.au>
3593         * elf64-ppc.c (toc_adjusting_stub_needed): Return true for
3594         old-style branches to undefined dot-symbols which will be
3595         satisfied by a plt call.
3597 2005-02-11  Alan Modra  <amodra@bigpond.net.au>
3599         * elf64-ppc.c (move_plt_plist): New function, extracted from..
3600         (ppc64_elf_copy_indirect_symbol): ..here.
3601         (func_desc_adjust): Use move_plt_plist.
3603 2005-02-10  Paul Brook  <paul@codesourcery.com>
3605         * elf32-arm.c (elf32_arm_final_link_relocate): Handle R_ARM_THM_PC9.
3607 2005-02-10  Paul Brook  <paul@codesourcery.com>
3609         * elflink.c (bfd_elf_record_link_assignment): Make hidden and internal
3610         symbols local.
3611         (elf_link_renumber_hash_table_dynsyms): Ignore local symbols.
3612         (elf_link_renumber_local_hash_table_dynsyms): New function.
3613         (_bfd_elf_link_renumber_dynsyms): Number local dynamic symbols.
3615 2005-02-10  Jakub Jelinek  <jakub@redhat.com>
3617         * bfd-in.h (BFD_LINKER_CREATED): Define.
3618         * bfd-in2.h: Rebuilt.
3619         * elflink.c (bfd_elf_size_dynamic_sections): Disregard
3620         BFD_LINKER_CREATED bfds when determining input bfds without
3621         .note.GNU-stack section.
3623 2005-02-10  Maciej W. Rozycki  <macro@mips.com>
3625         * elf64-mips.c (mips16_gprel_reloc): Update a comment.
3626         * elfn32-mips.c (mips16_gprel_reloc): Keep R_MIPS16_GPREL
3627         relocations against external symbols unchanged.
3629 2005-02-08  Paul Brook  <paul@codesourcery.com>
3631         * elflink.c (elf_link_input_bfd): Ignore symbols from null input
3632         sections.
3634 2005-02-08  Hans-Peter Nilsson  <hp@axis.com>
3636         * elflink.c (elf_link_add_object_symbols): Don't add "warning: "
3637         prefix here.
3639 2005-02-07  Maciej W. Rozycki  <macro@mips.com>
3641         * elf64-mips.c: Fix formatting throughout.
3643 2005-02-07  Maciej W. Rozycki  <macro@mips.com>
3645         * elfn32-mips.c (elf_mips_howto_table_rela): Fix a comment typo.
3647 2005-02-07  Alexandre Oliva  <aoliva@redhat.com>
3649         * elf32-frv.c (FRVFDPIC_SYM_LOCAL): Remove special handling for
3650         *ABS*/*UND* sections.
3651         (elf32_frv_relocate_section): Move zero-addend-required error...
3652         (_frv_emit_got_relocs_plt_entries): ... here.  Report error for
3653         missing needed TLS section.
3655 2005-02-07  Hans-Peter Nilsson  <hp@axis.com>
3657         * aoutx.h (NAME(aout,find_nearest_line)): Correct case for N_SO
3658         being the last symbol.
3659         (aout_link_add_symbols): Just return TRUE if a warning
3660         symbol was last.
3662 2005-02-07  Maciej W. Rozycki  <macro@mips.com>
3664         * elf32-mips.c (mips_elf_gprel32_reloc): Reject
3665         R_MIPS_GPREL32 relocations against external symbols.
3666         * elf64-mips.c (mips_elf64_gprel32_reloc): Replace an incorrect
3667         comment.
3669 2005-02-07  Alan Modra  <amodra@bigpond.net.au>
3671         * elf-bfd.h (elf_string_from_elf_strtab): Delete macro.
3672         * elf.c (bfd_elf_string_from_elf_section): Expand occurrence of
3673         elf_string_from_elf_strtab.
3674         (_bfd_elf_setup_group_pointers, bfd_section_from_shdr): Likewise.
3675         (bfd_section_from_shdr): For SHT_SYMTAB, load SHT_SYMTAB_SHNDX too
3676         if it exists.  Don't do the reverse for SHT_SYMTAB_SHNDX.  For
3677         SHT_STRTAB, check whether the strtab is for symtab or dynsymtab by
3678         looking at cached symtab info first, before iterating over headers.
3679         For SHT_REL and SHT_RELA, load dynsymtab if needed.
3680         * elfcode.h (elf_object_p): Don't load section header stringtab
3681         specially.
3683 2005-02-06  H.J. Lu  <hongjiu.lu@intel.com>
3685         * elf32-i386.c (elf_i386_relocate_section): Disallow R_386_GOTOFF
3686         against protected function when building shared library.
3688         PR 584
3689         * elf64-x86-64.c (is_32bit_relative_branch): New.
3690         (elf64_x86_64_relocate_section): Alllow R_X86_64_PC32 on a
3691         protected function symbol when building shared library for
3692         32bit relative branch instruction.
3694 2005-02-06  Alan Modra  <amodra@bigpond.net.au>
3696         * elf64-ppc.c (add_symbol_adjust): Don't create fake descriptor
3697         syms when doing a relocatable link.
3698         (ppc64_elf_gc_mark_hook): Check that syms are defined before looking
3699         at u.def.section.
3700         (ppc64_elf_tls_setup): Likewise.
3701         (ppc64_elf_edit_opd): Don't use an undefined func desc sym.
3703 2005-02-04  Alan Modra  <amodra@bigpond.net.au>
3705         * elf64-ppc.c (struct ppc_link_hash_entry): Add "fake".
3706         (link_hash_newfunc): Clear all locals using memset.
3707         (make_fdh): Remove flags param.  Always create fake func desc
3708         weak.  Link the descriptor with the code entry sym.
3709         (ppc64_elf_archive_symbol_lookup): Don't return fake syms.
3710         (add_symbol_adjust): Adjust make_fdh call.
3711         (func_desc_adjust): Likewise.  Twiddle any pre-existing fake
3712         descriptor to strong undefined if code entry is strong.
3714 2005-02-04  Alan Modra  <amodra@bigpond.net.au>
3716         * elflink.c (bfd_elf_record_link_assignment): Do "provide" symbol
3717         lookup here.  Set to new before calling bfd_link_repair_undef_list.
3718         (elf_smash_syms): Check that u.undef.weak isn't the not_needed bfd.
3720 2005-02-03  Alan Modra  <amodra@bigpond.net.au>
3722         * linker.c (_bfd_link_hash_newfunc): Set all local fields.
3724 2005-02-03  Alan Modra  <amodra@bigpond.net.au>
3726         * linker.c (_bfd_generic_link_add_one_symbol): Set u.undef.weak.
3727         * elflink.c (elf_smash_syms): Restore symbols that were undefweak
3728         before the as-needed lib was loaded.  Abort on unexpected refs.
3730 2005-02-02  Alan Modra  <amodra@bigpond.net.au>
3732         * elflink.c (elf_smash_syms): Expand comments.
3733         (elf_link_add_object_symbols): Only call elf_smash_syms for
3734         as-needed dynamic objects.
3736         * elfxx-ia64.c (elfNN_ia64_new_elf_hash_entry): Don't clear
3737         everything, just the field specific to ia64.
3738         * elf64-hppa.c (elf64_hppa_new_dyn_hash_entry): Likewise.
3740 2005-02-01  Alan Modra  <amodra@bigpond.net.au>
3742         * elf64-ppc.c (func_desc_adjust): Move code creating func desc sym to..
3743         (make_fdh): ..here.  New function.  Don't set BSF_OBJECT for
3744         undefined syms.
3745         (struct add_symbol_adjust_data): New.
3746         (add_symbol_adjust): Make an undefweak func desc for old ABI
3747         objects to link with --as-needed shared libs.  Return fail status.
3748         Don't adjust old ABI func entry sym to weak if func desc syms
3749         isn't defined.
3750         (ppc64_elf_check_directives): Adjust call to add_symbol_adjust,
3751         and return status.
3753 2005-02-01  Hans-Peter Nilsson  <hp@axis.com>
3755         * cpu-cris.c (get_compatible): Rearrange disabled code and comment
3756         for clarity.
3758 2005-02-01  Alan Modra  <amodra@bigpond.net.au>
3760         * elf64-ppc.c (ppc64_elf_check_directives): Move undefs list fixup..
3761         * linker.c (bfd_link_repair_undef_list): ..to new function, but don't
3762         remove anything but new and undefweak.
3763         * elflink.c (_bfd_elf_link_create_dynamic_sections): Override any
3764         existing _DYNAMIC.
3765         (_bfd_elf_create_dynamic_sections): Formatting.
3766         (bfd_elf_record_link_assignment): Call bfd_link_repair_undef_list.
3767         (_bfd_elf_merge_symbol): Don't handle as-needed syms here.
3768         (struct elf_smash_data): New.
3769         (elf_smash_syms): New function.
3770         (elf_link_add_object_symbols): Call elf_smash_syms.  Don't add
3771         unneeded dynamic objects to loaded list.
3772         (elf_link_output_extsym): Don't handle as-needed here.  Strip
3773         bfd_link_hash_new symbols.
3774         * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
3775         delref when dynindx is already -1.
3776         * elf64-alpha.c (elf64_alpha_output_extsym): Strip bfd_link_hash_new
3777         symbols.
3778         * elfxx-mips.c (mips_elf_output_extsym): Likewise.
3780 2005-02-01  Ben Elliston  <bje@au.ibm.com>
3782         * elfxx-target.h (bfd_elfNN_bfd_discard_group): Redefine.
3784 2005-02-01  Ben Elliston  <bje@au.ibm.com>
3786         * aout-arm.c, aout-target.h, aoutx.h, archive.c, armnetbsd.c,
3787         bfd-in.h, bfdio.c, coff-alpha.c, coff-arm.c, coff-h8300.c,
3788         coff-i860.c, coff-mcore.c, coff-or32.c, coff-ppc.c, coff-sh.c,
3789         coff-sparc.c, coffcode.h, coffgen.c, cofflink.c, cpu-cris.c,
3790         cpu-h8500.c, cpu-ns32k.c, ecoff.c, ecofflink.c, elf.c,
3791         elf32-dlx.c, elf32-fr30.c, elf32-frv.c, elf32-hppa.c,
3792         elf32-i860.c, elf32-ip2k.c, elf32-m32r.c, elf32-sh.c,
3793         elf32-v850.c, elf64-mips.c, elf64-sparc.c, elflink.c,
3794         i386aout.c, i386msdos.c, i386os9k.c, ieee.c, mach-o.c,
3795         nlm32-sparc.c, oasys.c, opncls.c, pdp11.c, pe-mips.c, peXXigen.c,
3796         pef.c, peicode.h, reloc.c, riscix.c, section.c, simple.c, som.c,
3797         sparclynx.c, targets.c, vms-misc.c, vms-tir.c, xsym.c,
3798         hosts/delta68.h, hosts/vaxbsd.h: Remove #if 0'd code
3799         throughout. Similarly, collapse #if 1'd code.
3801 2005-02-01  Ben Elliston  <bje@au.ibm.com>
3803         * elf-bfd.h (bfd_elf_discard_group): Remove.
3804         * elf.c (bfd_elf_discard_group): Likewise.
3805         * elfxx-target.h (bfd_elfNN_bfd_discard_group): Remove macro.
3807 2005-01-31  Richard Sandiford  <rsandifo@redhat.com>
3809         * elf-bfd.h (elf_backend_data): Add elf_backend_eh_frame_address_size.
3810         (_bfd_elf_eh_frame_address_size): Declare.
3811         * elfxx-target.h (elf_backend_eh_frame_address_size): Define a default.
3812         (elfNN_bed): Initialize elf_backend_eh_frame_address_size.
3813         * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Declare.
3814         (elf_backend_eh_frame_address_size): Define.
3815         * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): New function.
3816         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Get the address
3817         size from the new backend hook.
3818         (_bfd_elf_write_section_eh_frame): Likewise.
3819         (_bfd_elf_eh_frame_address_size): New function.
3821 2005-01-31  Andrew Cagney  <cagney@gnu.org>
3823         * configure: Regenerate to track ../gettext.m4.
3825 2005-01-31  Mark Mitchell  <mark@codesourcery.com>
3827         * elf32-arm.c (elf32_arm_symbian_special_sections): Do not set
3828         SHF_WRITE for .init_array, .fini_array, and .preinit_array.
3830 2005-01-31  Nick Clifton  <nickc@redhat.com>
3832         * confg.bfd: Make targets scheduled for obsoletion (m68k-lynxos,
3833         sparc-lynxos, vax-vms) be obsolete.
3835 2005-01-28  Daniel Jacobowitz  <dan@codesourcery.com>
3837         * elf-bfd.h (struct elf_backend_data): Add minpagesize.
3838         * elf32-arm.c (ELF_MINPAGESIZE): Define.
3839         * elf32-ppc.c (ELF_MINPAGESIZE): Define.
3840         * elfcode.h (elf_object_p): Use minpagesize instead of
3841         maxpagesize.
3842         * elfxx-target.h (ELF_MINPAGESIZE): Default to ELF_MAXPAGESIZE.
3843         (elfNN_bed): Include ELF_MINPAGESIZE.
3845 2005-01-28  Julian Brown  <julian@codesourcery.com>
3847         * bin-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
3848         * bin-in2.h (bfd_elf32_arm_set_target_relocs): Update prototype.
3849         * elf32-arm.c (elf32_arm_link_hash_table): Add fix_v4bx flag.
3850         (bfd_elf32_arm_set_target_relocs): Add formal parameter fix_v4bx for
3851         passing flag value from ld. Set flag value in global hash table entry.
3852         (elf32_arm_final_link_relocate): Add code to implement R_ARM_V4BX
3853         relocation.
3855 2005-01-27  Andrew Cagney  <cagney@gnu.org>
3857         * configure: Regenerate to track ../gettext.m4 change.
3859 2005-01-25  Mark Mitchell  <mark@codesourcery.com>
3861         * elf32-arm.c (elf_backend_default_use_rela_p): Define to zero for
3862         SymbianOS.
3864 2005-01-25  Alexandre Oliva  <aoliva@redhat.com>
3866         2004-12-10  Alexandre Oliva  <aoliva@redhat.com>
3867         * elf32-frv.c (elf32_frv_relocate_section): Force local binding
3868         for TLSMOFF.
3869         * reloc.c: Add R_FRV_TLSMOFF.
3870         * elf32-frv.c (elf32_frv_howto_table): Likewise.
3871         (frv_reloc_map, frv_reloc_type_lookup): Map it.
3872         (elf32_frv_relocate_section): Handle it.
3873         (elf32_frv_check_relocs): Likewise.
3874         * libbfd.h, bfd-in2.h: Rebuilt.
3875         2004-11-26  Alexandre Oliva  <aoliva@redhat.com>
3876         * elf32-frv.c (_frvfdpic_emit_got_relocs_plt_entries): Don't crash
3877         when given an undefweak TLS symbol.  Fix constant TLS PLT entries
3878         such that they return the constant in gr9.
3879         (_frvfdpic_relax_tls_entries): Don't crash for undefweak TLS
3880         symbols.
3881         (_frvfdpic_size_got_plt): Set _cooked_size of dynamic sections.
3882         too, such that they shrink on relaxation.
3883         (elf32_frvfdpic_finish_dynamic_sections): Check __ROFIXUP_END__ as
3884         marking the position right past the _GLOBAL_OFFSET_TABLE_ value.
3885         (_frvfdpic_assign_plt_entries): Shrink constant TLS PLT entries
3886         if we can guarantee the use of 16-bit constants.
3887         2004-11-10  Alexandre Oliva  <aoliva@redhat.com>
3888         Introduce TLS support for FR-V FDPIC.
3889         * reloc.c: Add TLS relocations.
3890         * elf32-frv.c (elf32_frv_howto_table): Add TLS relocations.
3891         (elf32_frv_rel_tlsdesc_value_howto): New.
3892         (elf32_frv_rel_tlsoff_howto): New.
3893         (frv_reloc_map): Add new mappings.
3894         (struct frvfdpic_elf_link_hash_table): Add pointer to summary
3895         reloc information.
3896         (frvfdpic_dynamic_got_plt_info): New.
3897         (frvfdpic_plt_tls_ret_offset): New.
3898         (ELF_DYNAMIC_INTERPRETER, DEFAULT_STACK_SIZE): Move earlier.
3899         (struct _frvfdpic_dynamic_got_info): Likewise.  Add TLS members.
3900         (struct _frvfdpic_dynamic_got_plt_info): Likewise.
3901         (FRVFDPIC_SYM_LOCAL): Regard symbols defined in the absolute
3902         section as local.
3903         (struct frvfdpic_relocs_info): Add TLS fields.
3904         (frvfdpic_relocs_info_hash): Warning clean up.
3905         (frvfdpic_relocs_info_find): Initialize tlsplt_entry.
3906         (frvfdpic_pic_merge_early_relocs_info): Merge TLS fields.
3907         (FRVFDPIC_TLS_BIAS): Define.
3908         (tls_biased_base): New.
3909         (_frvfdpic_emit_got_relocs_plt_entries): Deal with TLS
3910         relocations.
3911         (frv_reloc_type_lookup): Likewise.
3912         (frvfdpic_info_to_howto_rel): Likewise.
3913         (elf32_frv_relocate_section): Likewise.
3914         (_frv_create_got_section): Create the PLT section here.
3915         (elf32_frvfdpic_create_dynamic_sections): Not here.
3916         (_frvfdpic_count_nontls_entries): Move out of...
3917         (_frvfdpic_count_got_plt_entries): ... here.
3918         (_frvfdpic_count_tls_entries): Likewise.  Add TLS support.
3919         (_frvfdpic_count_relocs_fixups): Likewise.  Add relaxation
3920         support.
3921         (_frvfdpic_relax_tls_entries): New.
3922         (_frvfdpic_compute_got_alloc_data): Add TLS support.
3923         (_frvfdpic_get_tlsdesc_entry): New.
3924         (_frvfdpic_assign_got_entries): Add TLS support.
3925         (_frvfdpic_assign_plt_entries): Likewise.
3926         (_frvfdpic_reset_got_plt_entries): New.
3927         (_frvfdpic_size_got_plt): Move out of...
3928         (elf32_frvfdpic_size_dynamic_sections): ... here.
3929         (_frvfdpic_relax_got_plt_entries): New.
3930         (elf32_frvfdpic_relax_section): New.
3931         (elf32_frvfdpic_finish_dynamic_sections): Add TLS sanity check.
3932         (elf32_frv_check_relocs): Add TLS support.
3933         (bfd_elf32_bfd_relax_section): Define for FDPIC.
3934         * libbfd.h, bfd-in2.h: Rebuilt.
3936 2005-01-25  Alan Modra  <amodra@bigpond.net.au>
3938         * elf.c (_bfd_elf_get_dynamic_reloc_upper_bound): Only include
3939         loadable reloc sections.
3940         (_bfd_elf_canonicalize_dynamic_reloc): Likewise.
3941         (_bfd_elf_get_synthetic_symtab): Return 0 if no dynamic syms.
3943 2005-01-25  Alan Modra  <amodra@bigpond.net.au>
3945         * elflink.c (elf_link_add_object_symbols): Don't create link dynamic
3946         sections immediately when linking shared libs.  Instead, wait until
3947         we know a lib is needed.
3948         (_bfd_elf_link_create_dynstrtab): Extract from..
3949         (_bfd_elf_link_create_dynamic_sections_): ..here.
3950         (elf_add_dt_needed_tag): Call _bfd_elf_link_create_dynstrtab and
3951         _bfd_elf_link_create_dynamic_sections.  Add abfd param.  Allow
3952         for non-existent .dynamic.
3953         (elf_link_output_extsym): Don't complain about undefined symbols
3954         in as-needed dynamic libs that aren't actually linked.
3956 2005-01-24  Andrew Cagney  <cagney@gnu.org>
3958         * configure: Regenerate, ../gettext.m4 was updated.
3960 2005-01-21  Ben Elliston  <bje@au.ibm.com>
3962         * aout-encap.c: Remove unused file.
3964 2005-01-19  H.J. Lu  <hongjiu.lu@intel.com>
3966         PR 679
3967         * elflink.c (_bfd_elf_dynamic_symbol_p): Only protected
3968         non-function symbols are local.
3969         (_bfd_elf_symbol_refs_local_p): Likewise.
3971 2005-01-18  Alan Modra  <amodra@bigpond.net.au>
3973         * bfd.c (bfd_link_just_syms): Add abfd param.
3974         * bfd-in2.h: Regenerate.
3976 2005-01-17  Richard Sandiford  <rsandifo@redhat.com>
3978         * elf-eh-frame.c (skip_cfa_op, skip_non_nops): New functions.
3979         (_bfd_elf_discard_section_eh_frame): Use them to interpret the CFA
3980         instructions.  If the amount of padding is known, reduce the size
3981         of the CIE or FDE by that amount.
3983 2005-01-17  Richard Sandiford  <rsandifo@redhat.com>
3985         * elf-bfd.h (struct cie): Use bfd_vmas for code_align, ra_column and
3986         augmentation_size.  Use bfd_signed_vmas for data_align.
3987         * elf-eh-frame.c (read_uleb128, read_sleb128): Delete in favor of...
3988         (read_byte, skip_leb128, read_uleb128, read_sleb128): ...these new
3989         functions.  Don't read past the end of the enclosing CIE or FDE.
3990         (skip_bytes): New utility function.
3991         (_bfd_elf_discard_section_eh_frame): Use new functions, adding more
3992         sanity checking.
3993         (_bfd_elf_write_section_eh_frame): Use new functions.
3995 2005-01-17  Richard Sandiford  <rsandifo@redhat.com>
3997         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use an
3998         assert-style REQUIRE() macro to handle sanity checks.
4000 2005-01-17  H.J. Lu  <hongjiu.lu@intel.com>
4002         * dwarf2.c (dwarf2_debug): Move info_ptr_unit to ...
4003         (comp_unit): Here.
4004         (read_unsigned_leb128): Removed.
4005         (read_signed_leb128): Removed.
4006         (find_abstract_instance_name): Updated.
4007         (parse_comp_unit): Accept info_ptr_unit.
4008         (_bfd_dwarf2_find_nearest_line): Set info_ptr_unit for each
4009         comp unit and pass it to parse_comp_unit.
4011         * elf-eh-frame.c (read_unsigned_leb128): Moved to ...
4012         (read_signed_leb128): Moved to ...
4013         * libbfd.c: Here.
4015         * libbfd-in.h (read_unsigned_leb128): New prototype.
4016         (read_signed_leb128): Likewise.
4017         * libbfd.h: Regenerated.
4019 2005-01-17  Andrew Stubbs  <andrew.stubbs@st.com>
4020             Nick Clifton   <nickc@redhat.com>
4022         * cpu-sh.c (bfd_to_arch_table): Change arch_sh1_up to arch_sh_up,
4023         arch__sh4_nofp_up to arch_sh4_nofpu_up and arch_sh4a_nofp_up to
4024         arch_sh4a_nofpu_up in order to match the external names and make the
4025         testsuite's job easier.
4026         * archuires.c: Rename bfd_mach_sh2a_fake? to more meaningful
4027         names.
4028         * bfd-in2.h: Regenerate.
4030 2005-01-15  Andrew Cagney  <cagney@gnu.org>
4032         * bfd.m4: New file.
4033         * acinclude.m4: Move BFD_NEED_DECLARATION,
4034         BFD_HAVE_SYS_PROCFS_TYPE and BFD_HAVE_SYS_PROCFS_TYPE_MEMBER to
4035         the new file bfd.m4.  Include ../bfd/bfd.m4.
4036         * configure: Re-generate.
4038 2005-01-12  Alan Modra  <amodra@bigpond.net.au>
4040         * elf32-ppc.c (ppc_elf_howto_raw): Delete RELAX32* entries.
4041         (ppc_elf_relax_section): Use PLT variants of RELAX32 relocs for
4042         reaching PLT.
4043         (ppc_elf_relocate_section): Handle R_PPC_RELAX32_PLT and
4044         R_PPC_RELAX32PC_PLT.
4046 2005-01-11  Alan Modra  <amodra@bigpond.net.au>
4048         * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Follow indirect and warning
4049         symbols.
4050         * elf32-arm.c (elf32_arm_gc_sweep_hook): Likewise.
4051         * elf32-cris.c (cris_elf_gc_sweep_hook): Likewise.
4052         * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Likewise.
4053         * elf32-i386.c (elf_i386_gc_sweep_hook): Likewise.
4054         * elf32-m32r.c (m32r_elf_gc_sweep_hook): Likewise.
4055         * elf32-m68k.c (elf_m68k_gc_sweep_hook): Likewise.
4056         * elf32-ppc.c (ppc_elf_gc_sweep_hook): Likewise.
4057         * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
4058         * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
4059         * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise.
4060         * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
4061         * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Likewise.
4062         * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
4063         * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
4065 2005-01-11  Alan Modra  <amodra@bigpond.net.au>
4067         * elf32-ppc.c (ppc_elf_create_dynamic_sections): Correct
4068         .dynsbss flags.
4070 2005-01-10  Inderpreet Singh <inderpreetb@noida.hcltech.com>
4072         * archures.c: Define bfd_mach_maxq10 and bfd_mach_maxq20.
4073         * bfd-in2.h:  Regenerate.
4074         * coffcode.h (coff_set_arch_mach_hook, coff_set_flags): Add code
4075         to support these new machine values.
4076         * cpu-maxq.c (bfd_maxq10_arch): New architecture definition for
4077         the maxq10.
4078         (bfd_maxq_arch): Update values for the maxq20.
4080 2005-01-10  Eric Botcazou  <ebotcazou@libertysurf.fr>
4082         * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): When linking a
4083         non-shared object, do not reserve space in .plt and .rela.plt for
4084         regular symbols neither defined nor referenced in shared objects.
4086 2005-01-09  Eric Botcazou  <ebotcazou@libertysurf.fr>
4088         * elf32-sparc.c (elf32_sparc_link_hash_table_create): Use bfd_zmalloc
4089         to zero the structure.
4090         (create_got_section): Use BFD_ASSERT instead of abort.
4091         * elf64-sparc.c (struct sparc64_elf_link_hash_table): New 'sgot' and
4092         'srelgot' fields.
4093         (create_got_section): New function.
4094         (sparc64_elf_create_dynamic_sections): Likewise.
4095         (sparc64_elf_check_relocs): Invoke create_got_section instead of
4096         _bfd_elf_create_got_section.  Use the sgot and srelgot shortcuts.
4097         (sparc64_elf_size_dynamic_sections): Use the srelgot shortcut.
4098         (sparc64_elf_relocate_section): Use the sgot and srelgot shortcuts.
4099         (sparc64_elf_finish_dynamic_symbol): Likewise.
4100         (sparc64_elf_finish_dynamic_sections): Use the sgot shortcut.
4101         (elf_backend_create_dynamic_sections): Define to
4102         sparc64_elf_create_dynamic_sections.
4104 2005-01-09  Eric Botcazou  <ebotcazou@libertysurf.fr>
4106         * elf32-sparc.c (elf32_sparc_omit_section_dynsym): New function.
4107         (elf_backend_omit_section_dynsym): Define to it.
4108         * elf64-sparc.c (sparc64_elf_omit_section_dynsym): New function.
4109         (elf_backend_omit_section_dynsym): Define to it.
4111 2005-01-07  Jakub Jelinek  <jakub@redhat.com>
4113         * bfd/elf.c (INCLUDE_SECTION_IN_SEGMENT): Don't put empty sections into
4114         PT_DYNAMIC segment, unless .dynamic.
4116 2005-01-06  Paul Brook  <paul@codesourcery.com>
4118         * config.bfd: Add entry for arm-*-vxworks and arm-*-windiss.
4119         * configure.in: Add bfd_elf32_{big,little}arm_vxworks_vec.
4120         * configure: Regenerate.
4121         * elf32-arm.c: Add VxWorks target bfd.
4122         (USE_REL): Remove.
4123         (elf32_arm_link_hash_table): Add use_rel.
4124         (elf32_arm_link_hash_table_create, elf32_arm_final_link_relocate,
4125         elf32_arm_relocate_section): Replace USE_REL with runtime check.
4126         Correct offset calculation for RELA case.
4127         (elf_backend_may_use_rel_p, elf_backend_may_use_rela_p,
4128         elf_backend_default_use_rela_p, elf_backend_rela_normal): Define.
4129         (elf32_arm_vxworks_link_hash_table_create): New function.
4130         * targets.c (bfd_elf32_bigarm_vxworks_vec): Add declaration.
4131         (bfd_elf32_littlearm_vxworks_vec): Ditto.
4132         (_bfd_target_vector): Add bfd_elf32_{big,little}arm_vxworks_vec.
4134 2005-01-06  Alan Modra  <amodra@bigpond.net.au>
4136         * elf64-ppc.c (struct ppc_link_hash_table): Add no_multi_toc and
4137         multi_toc_needed.
4138         (has_toc_reloc, makes_toc_func_call, call_check_in_progress): Define.
4139         (ppc64_elf_check_relocs): Update references to has_gp_reloc.
4140         (ppc64_elf_setup_section_lists): Add no_multi_toc parm, set htab bit.
4141         (ppc64_elf_next_toc_section): Heed no_multi_toc.
4142         (ppc64_elf_reinit_toc): Set multi_toc_needed.
4143         (toc_adjusting_stub_needed): Rewrite.
4144         (ppc64_elf_next_input_section): Use multi_toc_needed to shortcut
4145         toc tests.  Adjust for toc_adjusting_stub_needed changes.
4146         (ppc64_elf_size_stubs): Update references to has_gp_reloc.
4147         * elf64-ppc.h (ppc64_elf_setup_section_lists): Update prototype.
4148         * section.c: Expand comment on backend bits.
4149         * bfd-in2.h: Regenerate.
4150         * libbfd.h: Regenerate.
4152 2005-01-06  Alan Modra  <amodra@bigpond.net.au>
4154         * elf64-ppc.c (ppc64_elf_size_stubs): When determining need for
4155         toc adjusting stub, do not test source section flags.
4157 2005-01-05  Eric Botcazou  <ebotcazou@libertysurf.fr>
4159         * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
4160         from STABS debugging sections again.
4162 2005-01-05  Fred Fish  <fnf@specifixinc.com>
4164         * dwarf2.c (struct dwarf2_debug): Add info_ptr_unit member.
4165         (find_abstract_instance_name): New function.
4166         (scan_unit_for_functions): Handle DW_TAG_inlined_subroutine.
4167         (scan_unit_for_functions): Handle DW_AT_abstract_origin.
4168         (_bfd_dwarf2_find_nearest_line): Initialize info_ptr_unit.
4170 2004-12-31  Paul Brook  <paul@copdesourcery.com>
4172         * elf32-arm.c (elf32_arm_symbian_plt_entry): Fix comment typo.
4174 2004-12-31  Alan Modra  <amodra@bigpond.net.au>
4176         * reloc.c (BFD_RELOC_AVR_LDI, BFD_RELOC_AVR_6, BFD_RELOC_AVR_6_ADIW):
4177         Commit missing changes from 2004-12-22.
4178         * bfd-in2.h: Regenerate.
4180 2004-12-23  Tomer Levi  <Tomer.Levi@nsc.com>
4182         * elf32-crx.c (elf32_crx_relax_section): Support 'bcop' relaxation.
4184 2004-12-21  Kris Warkentin  <kewarken@qnx.com>
4186         * elf.c (elfcore_grok_nto_gregs): Change name to elfcore_grok_nto_regs.
4187         Add 'base' argument for constructing register sections.  Reformat.
4188         (elfcore_grok_nto_note): Call elfcore_grok_nto_regs for both
4189         gp and fp regs.  Reformat.
4191 2004-12-22  Klaus Rudolph  <lts-rudolph@gmx.de>
4193         * reloc.c: Add new relocs R_AVR_LDI, R_AVR_6, R_AVR_6_ADIW.
4194         * bfd-in2.h: Regenerate.
4195         * elf32-avr.c (elf_avr_nowto_table): Add the new relocs.
4196         (avr_reloc_map): Likewise.
4197         (avr_final_link_relocate): Likewise.
4199 2004-12-22  Alan Modra  <amodra@bigpond.net.au>
4201         * elflink.c (_bfd_elf_merge_symbol): Treat old definitions from
4202         as-needed dynamic libs as undefined.
4203         (elf_link_add_object_symbols): Remove DYN_AS_NEEDED from as-needed
4204         libs when finding they are needed.
4206 2004-12-20  Alan Modra  <amodra@bigpond.net.au>
4208         * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add opd_relocs.
4209         (opd_entry_value): Use opd_relocs if available.
4210         (ppc64_elf_relocate_section): Don't set reloc_done.  Instead
4211         copy .opd relocations to opd_relocs.
4212         (ppc64_elf_edit_toc): Set rel_hdr.sh_size after editing relocs.
4214 2004-12-16  Richard Sandiford  <rsandifo@redhat.com>
4216         * reloc.c (BFD_RELOC_V850_LO16_SPLIT_OFFSET): New bfd_reloc_code_type.
4217         * elf32-v850.c (v850_elf_howto_table): Add entry for
4218         R_V850_LO16_SPLIT_OFFSET.
4219         (v850_elf_reloc_map): Map it to BFD_RELOC_V850_LO16_SPLIT_OFFSET.
4220         (v850_elf_perform_lo16_relocation): New function, extracted from...
4221         (v850_elf_perform_relocation): ...here.  Use it to handle
4222         R_V850_LO16_SPLIT_OFFSET.
4223         (v850_elf_check_relocs, v850_elf_final_link_relocate): Handle
4224         R_V850_LO16_SPLIT_OFFSET.
4225         * libbfd.h, bfd-in2.h: Regenerate.
4227 2004-12-14  P.J. Darcy  <darcypj@us.ibm.com>
4229         * config.bfd: Add s390x-ibm-tpf support.
4231 2004-12-14  Tomer Levi  <Tomer.Levi@nsc.com>
4233         * elf32-crx.c (elf32_crx_relax_delete_bytes): Add 'struct bfd_link_info *'
4234         to prototype, to make hash info available.
4235         Prevent wrapped symbols from being adjusted twice.
4237 2004-12-14  Richard Sandiford  <rsandifo@redhat.com>
4239         * elfxx-mips.c (mips_elf_calculate_relocation): Don't report an
4240         overflow for calls to undefined weak symbols.
4242 2004-12-11  Alan Modra  <amodra@bigpond.net.au>
4244         * elfcode.h (elf_slurp_symbol_table): Use bfd_elf_sym_name so that
4245         canonical sections syms have a name.
4247 2004-12-11  Alan Modra  <amodra@bigpond.net.au>
4249         * elf64-ppc.c (opd_entry_value): Don't use cached relocs if they
4250         have been adjusted for output.
4251         (ppc64_elf_relocate_section): Mark sections with reloc_done.
4253 2004-12-10  Alan Modra  <amodra@bigpond.net.au>
4255         * elf.c (bfd_elf_sym_name): Rename from bfd_elf_local_sym_name and
4256         add symtab_hdr param.
4257         (group_signature): Update calls.
4258         * elf-bfd.h (bfd_elf_sym_name): Update.
4259         * elf32-ppc.c (ppc_elf_relocate_section): Update.
4260         * elf64-ppc.c (ppc64_elf_edit_opd, ppc64_elf_edit_toc): Update.
4261         (ppc64_elf_relocate_section): Update.
4262         * elflink.c (elf_link_input_bfd): Update.
4264 2004-12-10  Jakub Jelinek  <jakub@redhat.com>
4266         * elf.c (bfd_elf_local_sym_name): Avoid crashes with invalid
4267         st_shndx on STT_SECTION sections.
4269 2004-12-09  Daniel Jacobowitz  <dan@codesourcery.com>
4271         * elfcode.h (elf_slurp_reloc_table_from_section): Don't canonicalize
4272         ELF section symbols.
4274 2004-12-09  Ian Lance Taylor  <ian@wasabisystems.com>
4276         * elfxx-mips.c (mips_elf_calculate_relocation): For R_MIPS_JALR,
4277         return a real value, unless it is a PLT symbol.
4278         (mips_elf_perform_relocation): On the RM9000, turn a jal into a
4279         bal if possible.
4281         * elfn32-mips.c (elf_mips_howto_table_rela): Change dst_mask of
4282         R_MIPS_JALR entry to 0.
4284         * archures.c: Define bfd_mach_mips9000.
4285         * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_9000.
4286         (mips_set_isa_flags): Handle bfd_mach_mips9000.
4287         * cpu-mips.c (I_mips9000): Define.
4288         (arch_info_struct): Add case for bfd_mach_mips9000.
4289         * aoutx.h (NAME(aout,machine_type)): Handle bfd_mach_mips9000.
4290         * bfd-in2.h: Regenerate.
4292 2004-12-08  Ian Lance Taylor  <ian@wasabisystems.com>
4294         * elfxx-mips.c (mips_elf_calculate_relocation): Test for R_MIPS_26
4295         overflow.
4297 2004-12-07  Ben Elliston  <bje@gnu.org>
4299         * netbsd-core.c (netbsd_core_file_p): Make `i' unsigned.
4301 2004-12-06  Daniel Jacobowitz  <dan@debian.org>
4303         Suggested by Fergal Daly <fergal@esatclear.ie>:
4304         * simple.c (simple_dummy_multiple_definition): New function.
4305         (bfd_simple_get_relocated_section_contents): Use it.
4307 2004-12-03  Jan Beulich  <jbeulich@novell.com>
4309         * elf.c (elf_find_function): Don't use the last file symbol ever,
4310         seen, but the last one seen prior to the symbol being reported.
4311         Don't report a filename at all for global symbols when that might
4312         be ambiguous/wrong.
4314 2004-12-01  Paul Brook  <paul@codesourcery.com>
4316         * elf32-arm.c (elf32_arm_copy_private_bfd_data): Set EI_OSABI.
4317         (elf32_arm_post_process_headers): Set EI_OSABI depending on ABI
4318         version.
4320 2004-12-01  Paul Brook  <paul@codesourcery.com>
4322         * elflink.c (elf_link_add_object_symbols): Make symbols from discarded
4323         sections undefined.
4325 2004-11-30  Paul Brook  <paul@codesourcery.com>
4327         * elf32-arm.c (struct elf32_arm_link_hash_table): Remove
4328         no_pipeline_knowledge
4329         (elf32_arm_link_hash_table_create): Ditto.
4330         (bfd_elf32_arm_process_before_allocation): Ditto.
4331         (elf32_arm_final_link_relocate): Ditto.  Remove oabi relocation
4332         handling.
4333         * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update
4334         prototype.
4335         * bfd-in2.h: Regenerate.
4337 2004-11-30  Randolph Chung  <tausq@debian.org>
4339         * elf32-hppa.c (elf32_hppa_grok_prstatus): New function.
4340         (elf32_hppa_grok_psinfo): New function.
4341         (elf_backend_grok_prstatus): Define.
4342         (elf_backend_grok_psinfo): Define.
4344 2004-11-24  H.J. Lu  <hongjiu.lu@intel.com>
4346         PR 574:
4347         * elfcode.h (elf_slurp_symbol_table): Handle STT_TLS.
4349 2004-11-24  Paul Brook  <paul@codesourcery.com>
4351         * elf.c (assign_section_numbers): Number SHT_GROUP sections first.
4353 2004-11-24  Paul Brook  <paul@codesourcery.com>
4355         * elf32-arm.c (elf32_arm_swap_symbol_in): New function.
4356         (elf32_arm_swap_symbol_out): New function.
4357         (elf32_arm_size_info): Add.
4358         (elf_backend_size_info): Define.
4360 2004-11-20  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
4362         * hpux-core.c (hpux_core_core_file_p): Use offsetof macro in calls to
4363         make_bfd_asection.
4365 2004-11-19  Alan Modra  <amodra@bigpond.net.au>
4367         * elf32-arm.c (elf32_arm_finish_dynamic_sections): Warning fix.
4368         * elf32-iq2000.c (iq2000_reloc_type_lookup): C90 function decl.
4369         * nlmcode.h (nlm_write_object_contents): Warning fix.
4371 2004-11-18  Bob Wilson  <bob.wilson@acm.org>
4373         * elf32-xtensa.c (ebb_propose_action): Fix argument order.
4375 2004-11-17  Daniel Jacobowitz  <dan@codesourcery.com>
4377         * elf32-arm.c (PLT_THUMB_STUB_SIZE): Define.
4378         (elf32_arm_plt_thumb_stub): New.
4379         (struct elf32_arm_link_hash_entry): Add plt_thumb_refcount
4380         and plt_got_offset.
4381         (elf32_arm_link_hash_traverse): Fix typo.
4382         (elf32_arm_link_hash_table): Add obfd.
4383         (elf32_arm_link_hash_newfunc): Initialize new fields.
4384         (elf32_arm_copy_indirect_symbol): Copy plt_thumb_refcount.
4385         (elf32_arm_link_hash_table_create): Initialize obfd.
4386         (record_arm_to_thumb_glue): Mark the glue as a local ARM function.
4387         (record_thumb_to_arm_glue): Mark the glue as a local Thumb function.
4388         (bfd_elf32_arm_get_bfd_for_interworking): Verify that the
4389         interworking BFD is not dynamic.
4390         (bfd_elf32_arm_process_before_allocation): Handle R_ARM_PLT32.  Do
4391         not emit glue for PLT references.
4392         (elf32_arm_final_link_relocate): Handle Thumb functions.  Do not
4393         emit glue for PLT references.  Support the Thumb PLT prefix.
4394         (elf32_arm_gc_sweep_hook): Handle R_ARM_THM_PC22 and
4395         plt_thumb_refcount.
4396         (elf32_arm_check_relocs): Likewise.
4397         (elf32_arm_adjust_dynamic_symbol): Handle Thumb functions and
4398         plt_thumb_refcount.
4399         (allocate_dynrelocs): Handle Thumb PLT references.
4400         (elf32_arm_finish_dynamic_symbol): Likewise.
4401         (elf32_arm_symbol_processing): New function.
4402         (elf_backend_symbol_processing): Define.
4404 2004-11-16  Richard Sandiford  <rsandifo@redhat.com>
4406         * elf-bfd.h (eh_cie_fde): Add new fields: add_augmentation_size and
4407         add_fde_encoding.  Remove need_relative.
4408         * elf-eh-frame.c (extra_augmentation_string_bytes)
4409         (extra_augmentation_data_bytes, size_of_output_cie_fde): New functions.
4410         (_bfd_elf_discard_section_eh_frame): Consider changing the FDE encoding
4411         in cases where the CIE has no existing 'R' augmentation.  Use
4412         size_of_output_cie_fde when assigning offsets.  Use the final offset
4413         as the new section size.
4414         (_bfd_elf_eh_frame_section_offset): Remove need_relative handling.
4415         Account for any extra augmentation bytes in the returned offset.
4416         (_bfd_elf_write_section_eh_frame): Rework so that the entries are
4417         moved before being modified.  Pad growing entries with DW_CFA_nops.
4418         Add 'z' and 'R' augmentations as directed by add_augmentation_size
4419         and add_fde_encoding.
4421 2004-11-15  Mark Mitchell  <mark@codesourcery.com>
4423         * elf32-arm.c (elf32_arm_relocate_section): Use
4424         arm_real_reloc_type.
4426 2004-11-16  Richard Sandiford  <rsandifo@redhat.com>
4428         * elfxx-mips.c (mips_elf_create_dynamic_relocation): Return early
4429         for discard relocations; don't add an R_MIPS_NONE to the main body
4430         of .rel.dyn.
4432 2004-11-04  Paul Brook  <paul@codesourcery.com>
4434         * elf-bfd.h (_bfd_elf_slurp_version_tables): Update prototype.
4435         * elf.c (_bfd_elf_print_private_bfd_data): Pass extra argument.
4436         (_bfd_elf_slurp_version_tables): Add extra argument.  Create extra
4437         default version definition for unversioned symbols.
4438         * elfcode.h (elf_slurp_symbol_table): Pass extra argument.
4439         * elflink.c (elf_link_add_object_symbols): Pass extra argument to
4440         _bfd_elf_slurp_version_tables.  Set default version for unversioned
4441         imported symbols.
4443 2004-11-15  Paul Brook  <paul@codesourcery.com>
4445         * elflink.c (elf_link_add_object_symbols): Don't assume version
4446         indices are consecutive.
4448 2004-11-14  Richard Sandiford  <rsandifo@redhat.com>
4450         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Deal with
4451         composite relocations against the personality data.
4453 2004-11-13  Paul Brook  <paul@codesourcery.com>
4455         * bfd/elf32-arm.c (elf32_arm_final_link_relocate): Resolve
4456         R_ARM_PREL31 relocations to PLT entries.
4457         (elf32_arm_relocate_section, elf32_arm_gc_sweep_hook): Ditto.
4458         (elf32_arm_check_relocs): Ditto.
4460 2004-11-12  Bob Wilson  <bob.wilson@acm.org>
4462         * xtensa-isa.c (xtensa_interface_class_id): New.
4464 2004-11-11  Bob Wilson  <bob.wilson@acm.org>
4466         * elf32-xtensa.c (property_table_compare): Remove assertion about
4467         entries with the same address and non-zero size.
4468         (xtensa_read_table_entries): Report such entries as errors.
4470 2004-11-11  Mark Mitchell  <mark@codesourcery.com>
4472         * elf32-arm.c (elf32_arm_final_link_relocate): Correct logic for
4473         R_ARM_RELATIVE on Symbian OS.
4475 2004-11-09  Mark Mitchell  <mark@codesourcery.com>
4477         * som.c (som_bfd_print_private_bfd_data): New function.
4478         (som_object_setup): Save the auxiliary header.  Don't assume that
4479         zero is an invalid entry point for a shared library.
4480         (som_object_p): Allocate the auxiliary header on the heap.
4482         * elf32-arm.c (elf32_arm_begin_write_processing): Do not use a K&R
4483         declaration.
4484         (elf32_arm_symbian_modify_segment_map): Likewise.
4486 2004-11-09  Daniel Jacobowitz  <dan@debian.org>
4488         From David Poole <daveml@mbuf.com>:
4489         * elf32-arm.c (elf32_arm_readonly_dynrelocs): New function.
4490         (elf32_arm_size_dynamic_sections): Call it.
4492 2004-11-09  Alan Modra  <amodra@bigpond.net.au>
4494         * Makefile.am (SOURCE_HFILES): Remove elf32-arm.h.
4495         (ALL_MACHINES_CFILES): Fix typo.
4496         * Makefile.in: Regenerate.
4497         * po/SRC-POTFILES.in: Regenerate.
4499 2004-11-08  Mark Mitchell  <mark@codesourcery.com>
4501         * elf32-arm.c (elf32_arm_final_link_relocate): When generating an
4502         R_ARM_RELATIVE relocation for Symbian OS, mention the section
4503         symbol in the relocation.
4505 2004-11-08  Inderpreet Singh  <inderpreetb@nioda.hcltech.com>
4506             Vineet Sharma  <vineets@noida.hcltech.com>
4508         * coff-maxq.c: New File.
4509         * cpu-maxq.c: New File.
4510         * coffcode.h: Likewise.
4511         * config.bfd: Likewise.
4512         * configure.in (maxqcoff_vec): New target vector.
4513         * Makefile.am: Add support for maxq target.
4514         * configure.in: Likewise.
4515         * archures.c:. Likewise.
4516         * targets.c: Likewise.
4517         * bfd_in2.h : Regenerated.
4518         * Makefile.in: Regenerated.
4519         * configure: Regenerated.
4520         * doc/Makefile.in: Regenerated.
4522 2004-11-08  Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
4524         * coff-i386.c (coff_i386_reloc): Fix weak symbols.
4525         * cofflink.c (_bfd_coff_link_input_bfd): Don't process
4526         C_NT_WEAK aux entries.
4527         (_bfd_coff_generic_relocate_section): Handle undefined
4528         aliases.
4530 2004-11-07  Andreas Schwab  <schwab@suse.de>
4532         * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Use
4533         SYMBOL_CALLS_LOCAL and check for undefweak symbols with
4534         non-default visibility.
4536 2004-11-01  Mark Mitchell  <mark@codesourcery.com>
4538         * elf32-arm.c (elf32_arm_symbian_begin_write_processing): Clear
4539         D_PAGED.
4540         (elf32_arm_symbian_modify_segment_map): Don't
4541         reset includes_filehdr and includes_phdrs here.
4543 2004-11-04  Daniel Jacobowitz  <dan@debian.org>
4545         * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Replace
4546         elfarm-nabi with elf32-arm.  Remove elfarm-oabi.
4547         (elf32-arm.lo): Replace elfarm-nabi.lo rule.  Remove elf32-arm.h
4548         dependency.
4549         * config.bfd: Move arm-*-oabi* and thumb-*-oabi* from obsolete list
4550         to a new removed list.  Remove normal configuration stanzas.
4551         * configure.in: (bfd_elf32_bigarm_vec, bfd_elf32_bigarm_symbian_vec)
4552         (bfd_elf32_littlearm_symbian_vec, bfd_elf32_littlearm_vec): Replace
4553         elfarm-nabi.lo with elf32-arm.lo.
4554         (bfd_elf32_bigarm_oabi_vec, bfd_elf32_littlearm_oabi_vec): Remove.
4555         * elf32-arm.c: Renamed from elfarm-nabi.c.  Inline elf32-arm.h.
4556         * elf32-arm.h: Remove.
4557         * elfarm-oabi.c: Remove.
4558         * targets.c (_bfd_target_vector): Remove bfd_elf32_bigarm_oabi_vec
4559         and bfd_elf32_littlearm_oabi_vec.
4560         * aclocal.m4, Makefile.in, configure, doc/Makefile.in: Regenerated.
4562 2004-11-04  Hans-Peter Nilsson  <hp@axis.com>
4564         * config.bfd: Support crisv32-*-* like cris-*-*.
4565         * archures.c (bfd_mach_cris_v0_v10, bfd_mach_cris_v32)
4566         (bfd_mach_cris_v10_v32): New macros.
4567         * cpu-cris.c: Tweak formatting.
4568         (get_compatible): New function.
4569         (N): New macro.
4570         (bfd_cris_arch_compat_v10_v32, bfd_cris_arch_v32): New
4571         bfd_arch_info_type:s.
4572         (bfd_cris_arch): Use bfd_mach_cris_v0_v10 for member mach,
4573         get_compatible for member compatible and link bfd_cris_arch_v32 as
4574         next.
4575         * elf32-cris.c (cris_elf_pcrel_reloc)
4576         (cris_elf_set_mach_from_flags): New functions.
4577         (cris_elf_howto_table) <R_CRIS_8_PCREL, R_CRIS_16_PCREL>
4578         <R_CRIS_32_PCREL>: Use cris_elf_pcrel_reloc.
4579         (cris_elf_grok_prstatus, cris_elf_grok_psinfo): Give correct
4580         numbers for bfd_mach_cris_v32.
4581         (PLT_ENTRY_SIZE_V32): New macro.
4582         (elf_cris_plt0_entry): Drop last comma in initializer.
4583         (elf_cris_plt0_entry_v32, elf_cris_plt_entry_v32)
4584         (elf_cris_pic_plt0_entry_v32, elf_cris_pic_plt_entry_v32): New
4585         PLT initializers.
4586         (cris_elf_relocate_section): Change all "%B(%A)" messages to
4587         "%B, section %A".
4588         (elf_cris_finish_dynamic_symbol): Do V32-specific PLT entries.
4589         (elf_cris_finish_dynamic_sections): Similar.
4590         (elf_cris_adjust_dynamic_symbol): Similar.
4591         (cris_elf_check_relocs): Change all "%B(%A)" messages to "%B,
4592         section %A".
4593         <switch with PIC relocs>: Emit error and return FALSE for
4594         bfd_mach_cris_v10_v32.
4595         <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
4596         Emit warning when generating textrel reloc.
4597         (cris_elf_object_p): Call cris_elf_set_mach_from_flags.
4598         (cris_elf_final_write_processing): Set flags according to mach.
4599         (cris_elf_print_private_bfd_data): Display
4600         EF_CRIS_VARIANT_COMMON_V10_V32 and EF_CRIS_VARIANT_V32.
4601         (cris_elf_merge_private_bfd_data): Drop variables old_flags,
4602         new_flags.  Don't call cris_elf_final_write_processing.  Don't
4603         look at the actual elf header flags at all; use
4604         bfd_get_symbol_leading_char to check ibfd, obfd.  Trap difference
4605         in bfd_get_mach for ibfd and obfd and handle merging of compatible
4606         objects.
4607         (bfd_elf32_bfd_copy_private_bfd_data): Define.
4608         * reloc.c (BFD_RELOC_CRIS_SIGNED_8, BFD_RELOC_CRIS_UNSIGNED_8)
4609         (BFD_RELOC_CRIS_SIGNED_16, BFD_RELOC_CRIS_UNSIGNED_16)
4610         (BFD_RELOC_CRIS_LAPCQ_OFFSET): New relocs.
4611         * bfd-in2.h, libbfd.h: Regenerate.
4613 2004-11-04  Alan Modra  <amodra@bigpond.net.au>
4615         * elf64-ppc.h (ppc64_elf_edit_toc): Declare.
4616         * elf64-ppc.c (struct ppc_link_hash_entry <adjust_done>): Update
4617         comment.
4618         (struct adjust_toc_info): New.
4619         (adjust_toc_syms, ppc64_elf_edit_toc): New functions.
4621 2004-11-03  Bob Wilson  <bob.wilson@acm.org>
4623         * elf.c (assign_file_positions_for_segments): Set next_file_pos even
4624         if there are no segments.
4626 2004-11-02  Daniel Jacobowitz  <dan@debian.org>
4628         * config.bfd: Mark arm-*-oabi and thumb-*-oabi as obsolete.
4630 2004-11-02  Nick Clifton  <nickc@redhat.com>
4632         * elf32-iq2000.c: Convert to ISO C90 formatting.
4634 2004-11-02  Hans-Peter Nilsson  <hp@axis.com>
4636         * elflink.c (_bfd_elf_create_got_section): Hide _GLOBAL_OFFSET_TABLE_.
4638 2004-10-28  H.J. Lu  <hongjiu.lu@intel.com>
4640         * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle weak
4641         undefined symbols for R_IA64_SECREL32MSB, R_IA64_SECREL32LSB,
4642         R_IA64_SECREL64MSB and R_IA64_SECREL64LSB.
4644 2004-10-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4646         * elf32-sh.c (tpoff): Take alignment into account.
4648 2004-10-28  Nick Clifton  <nickc@redhat.com>
4650         * elf32-iq2000.c (iq2000_elf_relocate_section): Do nothing when
4651         performing a relocatable link.
4652         (iq2000_elf_object_p): Do not set elf_bad_symtab.  This is only
4653         for MIPS ports under Irix.
4655 2004-10-27  Richard Earnshaw  <rearnsha@arm.com>
4657         * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Handle
4658         R_ARM_CALL and R_ARM_JUMP24 as aliases of R_ARM_PC24.
4659         (elf32_arm_final_link_relocate): Ditto.
4660         (arm_add_to_rel, elf32_arm_relocate_section): Ditto.
4661         (elf32_arm_gc_sweep_hook, elf32_arm_check_relocs): Ditto
4662         (elf32_arm_adjust_dynamic_symbol): Ditto.
4663         * elfarm-nabi.c (elf32_arm_howto_table): Add R_ARM_CALL and
4664         R_ARM_JUMP32.  Move R_ARM_R{REL32,ABS32,PC24,BASE}...
4665         (elf32_arm_r_howto): ... To here.
4666         (elf32_arm_howto_from_type): Use elf32_arm_r_howto.
4668 2004-10-26  H.J. Lu  <hongjiu.lu@intel.com>
4670         PR 475
4671         * elfxx-ia64.c (elfNN_ia64_relocate_section): Correct
4672         R_IA64_SECREL32MSB, R_IA64_SECREL32LSB, R_IA64_SECREL64MSB
4673         and R_IA64_SECREL64LSB.
4675 2004-10-26  Paul Brook  <paul@codesourcery.com>
4677         * elflink.c (elf_finalize_dynstr): Skip shared aux structure.
4678         (bfd_elf_size_dynamic_sections): Create default version definition.
4679         (elf_link_output_extsym): Adjust for default symbol version.
4681 2004-10-24  Hans-Peter Nilsson  <hp@bitrange.com>
4683         * mmo.c: Adjust to ISO C.
4685         * mmo.c (mmo_write_section_description): New function broken out
4686         of mmo_internal_write_section.
4687         (mmo_internal_write_section): For each of .text and .data, call
4688         mmo_write_section_description before outputting contents if it has
4689         nontrivially deducible vma or contents.
4690         (mmo_has_leading_or_trailing_zero_tetra_p): New function.
4691         (mmo_canonicalize_symtab): Adjust absolute symbols to .data
4692         symbols if found within the .data address range.
4694 2004-10-24  Daniel Jacobowitz  <dan@debian.org>
4696         * opncls.c (bfd_close): Return TRUE for BFD_IN_MEMORY.
4698 2004-10-24  Hans-Peter Nilsson  <hp@bitrange.com>
4700         * mmo.c (File Layout): Correct place of misplaced blurb about
4701         special data.
4703 2004-10-22  Mark Kettenis  <kettenis@gnu.org>
4705         * config.bfd: Add mips64*-*-openbsd.
4707 2004-10-21  Bob Wilson  <bob.wilson@acm.org>
4709         * elf32-xtensa.c (ebb_propose_action): Put declarations before
4710         statements.
4712 2004-10-21  H.J. Lu  <hongjiu.lu@intel.com>
4714         * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.94.
4715         * configure: Regenerate.
4717 2004-10-21  H.J. Lu  <hongjiu.lu@intel.com>
4719         PR 463
4720         * aoutx.h (aout_link_input_section_std): Pass proper hash entry
4721         to linker reloc_overflow callback.
4722         (aout_link_input_section_ext): Likewise.
4723         (aout_link_reloc_link_order): Likewise.
4724         * coff-a29k.c (coff_a29k_relocate_section): Likewise.
4725         * coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
4726         Likewise.
4727         (alpha_relocate_section): Likewise.
4728         * coff-arm.c (coff_arm_relocate_section): Likewise.
4729         * coff-h8300.c (h8300_reloc16_extra_cases): Likewise.
4730         * coff-h8500.c (extra_case): Likewise.
4731         * coff-i960.c (coff_i960_relocate_section): Likewise.
4732         * coff-mcore.c (coff_mcore_relocate_section): Likewise.
4733         * coff-mips.c (mips_relocate_section): Likewise.
4734         * coff-or32.c (coff_or32_relocate_section): Likewise.
4735         * coff-ppc.c (coff_ppc_relocate_section): Likewise.
4736         * coff-rs6000.c (xcoff_ppc_relocate_section): Likewise.
4737         * coff-sh.c (sh_relocate_section): Likewise.
4738         * coff-tic80.c (coff_tic80_relocate_section): Likewise.
4739         * coff-w65.c (w65_reloc16_extra_cases): Likewise.
4740         * coff-z8k.c (extra_case): Likewise.
4741         * coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise.
4742         * cofflink.c (_bfd_coff_reloc_link_order): Likewise.
4743         (_bfd_coff_generic_relocate_section): Likewise.
4744         * ecoff.c (ecoff_reloc_link_order): Likewise.
4745         * elf-hppa.h (elf_hppa_relocate_section): Likewise.
4746         * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
4747         * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
4748         * elf32-arm.h (elf32_arm_relocate_section): Likewise.
4749         * elf32-avr.c (elf32_avr_relocate_section): Likewise.
4750         * elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise.
4751         * elf32-cris.c (cris_elf_relocate_section): Likewise.
4752         * elf32-crx.c (elf32_crx_relocate_section): Likewise.
4753         * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
4754         * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
4755         * elf32-frv.c (elf32_frv_relocate_section): Likewise.
4756         * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
4757         * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
4758         * elf32-i370.c (i370_elf_relocate_section): Likewise.
4759         * elf32-i386.c (elf_i386_relocate_section): Likewise.
4760         * elf32-i860.c (elf32_i860_relocate_section): Likewise.
4761         * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
4762         * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
4763         * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
4764         * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
4765         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
4766         * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
4767         * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
4768         * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
4769         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
4770         * elf32-s390.c (elf_s390_relocate_section): Likewise.
4771         * elf32-sh.c (sh_elf_relocate_section): Likewise.
4772         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
4773         * elf32-v850.c (v850_elf_relocate_section): Likewise.
4774         * elf32-vax.c (elf_vax_relocate_section): Likewise.
4775         * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
4776         * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
4777         * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
4778         * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
4779         * elf64-s390.c (elf_s390_relocate_section): Likewise.
4780         * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
4781         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
4782         * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
4783         * elflink.c (elf_reloc_link_order): Likewise.
4784         * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
4785         * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
4786         (_bfd_elf_mips_get_relocated_section_contents): Likewise.
4787         * linker.c (_bfd_generic_reloc_link_order): Likewise.
4788         * pdp11.c (pdp11_aout_link_input_section): Likewise.
4789         (aout_link_reloc_link_order): Likewise.
4790         * reloc.c (bfd_generic_get_relocated_section_contents):
4791         Likewise.
4792         * xcofflink.c (xcoff_reloc_link_order): Likewise.
4793         * simple.c (simple_dummy_reloc_overflow): Updated.
4795 2004-10-20  Andreas Schwab  <schwab@suse.de>
4797         * elf32-m68k.c (elf_m68k_plt_sym_val): New function.
4798         (elf_backend_plt_sym_val): Define.
4800 2004-10-19  Danny Smith  <dannysmith@users.sourceforege.net>
4802         * config.bfd: Set targ_underscore=yes for PE COFF targets
4804 2004-10-19  Alan Modra  <amodra@bigpond.net.au>
4806         * elf64-ppc.c (opd_entry_value): Handle --just-symbols objects.
4807         (ppc64_elf_edit_opd): Likewise.
4809 2004-10-18  Mark Mitchell  <mark@codesourcery.com>
4811         * elfarm-nabi.c (ELF_DYNAMIC_SEC_FLAGS): Add comment.
4812         * elflink.c (_bfd_elf_create_dynamic_sections): For a loaded PLT,
4813         set SEC_ALLOC and SEC_LOAD.
4815 2004-10-18  Nick Clifton  <nickc@redhat.com>
4817         * elf32-xstormy16.c (xstormy16_elf_relocate_section): Compute
4818         'name' for relocs against both local and global symbols.
4820 2004-10-16  Daniel Jacobowitz  <dan@debian.org>
4822         * bfd-in2.h: Regenerate.
4823         * bfd.c (struct bfd): Add no_export.
4824         * elflink.c (elf_link_add_object_symbols): Handle no_export.
4826 2004-10-15  Alan Modra  <amodra@bigpond.net.au>
4828         * config.bfd: Whitespace cleanup.
4829         * Makefile.am: Run "make dep-am"
4830         * Makefile.in: Regenerate.
4832 2004-10-15  Jakub Jelinek  <jakub@redhat.com>
4834         * elflink.c (struct already_linked_section): Removed.
4835         (try_match_symbols_in_sections, already_linked): Removed.
4836         (_bfd_elf_section_already_linked): Skip ^\.gnu\.linkonce\.[^.]*\.
4837         prefix of section names when finding already_linked_table
4838         chain.  Compare section names.  Instead of calling already_linked,
4839         do it inline and only for sections in the same already_linked_list.
4841 2004-10-15  Alan Modra  <amodra@bigpond.net.au>
4843         * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Add "info"
4844         parameter.  If called after _bfd_elf_write_section_eh_frame,
4845         don't allow a -2 return unless need_* bit is already set, and
4846         handle offsets adjusted for output_offset.
4847         * elf-bfd.h (_bfd_elf_eh_frame_section_offset): Update prototype.
4848         * elf.c (_bfd_elf_section_offset): Update call.
4850 2004-10-13  H.J. Lu  <hongjiu.lu@intel.com>
4852         PR 440
4853         * coffcode.h (coff_compute_section_file_positions): Cast to
4854         bfd_vma when computing page alignment.
4856 2004-10-13  Mark Mitchell  <mark@codesourcery.com>
4858         * elf32-arm.h (elf32_arm_finish_dynamic_sections): Use file
4859         offsets, not VMAs, for DT_VERSYM, DT_VERDEF, DT_VERNEED.
4861 2004-10-12  Mark Mitchell  <mark@codesourcery.com>
4863         * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Make .rel.plt
4864         relocations use a virtual address, not a section offset.
4866 2004-10-12  Bob Wilson  <bob.wilson@acm.org>
4868         * elf32-xtensa.c (elf_xtensa_get_private_bfd_flags): Delete.
4869         (narrow_instruction, widen_instruction): Remove unnecessary calls to
4870         xtensa_format_encode.
4871         (ebb_propose_action): Inline call to ebb_add_proposed_action.
4872         (ebb_add_proposed_action): Delete.
4874 2004-10-12  Bob Wilson  <bob.wilson@acm.org>
4876         * elf32-xtensa.c: Use ISO C90 formatting.
4878 2004-10-12  Paul Brook  <paul@codesourcery.com>
4880         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Rephrase error
4881         message.
4883 2004-10-12  Paul Brook  <paul@codesourcery.com>
4885         * elf32-arm.h: Support EABI version 4 objects.
4887 2004-10-12  Alan Modra  <amodra@bigpond.net.au>
4889         PR 325
4890         * cpu-i386.c (bfd_x86_64_arch_intel_syntax): Place last in chain.
4891         Don't mark as default.
4892         (bfd_x86_64_arch): Don't mark as default.
4894 2004-10-12  Alan Modra  <amodra@bigpond.net.au>
4896         * elflink.c (enum action_discarded): New.
4897         (elf_section_complain_discarded): Delete.
4898         (elf_action_discarded): New function subsuming the above and also
4899         controlling reloc behaviour.
4900         (elf_link_input_bfd): Use it.
4902 2004-10-11  Jakub Jelinek  <jakub@redhat.com>
4904         * elf.c (bfd_section_from_shdr): Handle SHT_GNU_LIBLIST.
4905         (special_sections): Add .gnu.liblist and .gnu.conflict.
4906         (assign_section_numbers): Handle SHT_GNU_LIBLIST.
4908 2004-10-11  Alan Modra  <amodra@bigpond.net.au>
4910         PR 233
4911         * elflink.c (elf_link_input_bfd): Try harder to support
4912         relocations against symbols in removed linkonce sections.
4914 2004-10-11  Alan Modra  <amodra@bigpond.net.au>
4916         * elflink.c (elf_link_input_bfd): Revert PR 354 change.
4918         PR 354
4919         * elflink.c (elf_link_input_bfd): Check that relocs in SEC_ALLOC
4920         sections do not reference symbols in non-SEC_ALLOC sections.
4922 2004-10-11  Alan Modra  <amodra@bigpond.net.au>
4924         PR 437
4925         * elflink.c (elf_link_sort_relocs): Don't bomb on unusual sections.
4926         (_bfd_elf_link_omit_section_dynsym): Formatting.
4928 2004-10-10  Alan Modra  <amodra@bigpond.net.au>
4930         * libbfd-in.h (BFD_ASSERT, BFD_FAIL): Wrap macro body in do while.
4931         * libbfd.h: Regnerate.
4932         * elf32-cris.c: Add missing semicolon to BFD_ASSERTs.
4933         * elf32-frv.c: Likewise.
4934         * elf32-m32r.c: Likewise.
4935         * elf32-ppc.c: Likewise.
4936         * elf64-hppa.c: Likewise.
4937         * elfxx-ia64.c: Likewise.
4938         * opncls.c: Likewise.
4940 2004-10-10  Alan Modra  <amodra@bigpond.net.au>
4942         * elf-bfd.h (struct eh_frame_hdr_info): Add offsets_adjusted.
4943         * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Adjust
4944         offsets stored in struct eh_cie_fde entries before doing other
4945         work.
4947         * elf-bfd.h (struct eh_cie_fde): Add cie_inf, remove sec.
4948         (struct eh_frame_hdr_info): Add last_cie_inf, remove last_cie_offset.
4949         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Delete code
4950         setting offsets for removed CIEs.  Don't set "sec", instead set
4951         cie_inf for FDEs.  Keep a pointer to last struct eh_cie_fde for a
4952         CIE in hdr_info.  Only set make_relative and make_lsda_relative
4953         for CIEs.  Use pointers rather than array indices.
4954         (_bfd_elf_eh_frame_section_offset): Test/set make_relative,
4955         make_lsda_relative, need_* on cie_inf for FDEs.
4956         (_bfd_elf_write_section_eh_frame): Adjust offset and new_offset for
4957         section output_offset.  Delete cie_offset, instead use cie_inf
4958         pointer to CIE entry.  Use need_relative and need_lsda_relative on
4959         CIE entry for FDEs.  Use pointers rather than array indices.
4961 2004-10-09  Alan Modra  <amodra@bigpond.net.au>
4963         * coff-rs6000.c (rs6000coff_vec): Add initializer for
4964         bfd_is_target_special_symbol.
4965         * coff64-rs6000.c (rs6000coff64_vec): Likewise.
4966         * som.c (som_bfd_is_target_special_symbol): Define.
4968 2004-10-08  Nick Clifton  <nickc@redhat.com>
4970         * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.93.
4971         * configure: Regenerate.
4972         * bfd-in2.h: Regenerate.
4973         * syms.c (bfd_is_target_special_symbol): New interface function.
4974         Returns true when a symbol should be considered to be special.
4975         * targets.c (bfd_target): Include bfd_is_target_special_symbol in
4976         the symbol jump table.
4977         * elf32-arm.h (elf32_arm_is_target_special_symbol): New function.
4978         Return true iff the symbol is a mapping symbol.
4979         (bfd_elf32_bfd_is_target_special_symbol): Define.
4980         * elfxx-target.h: Provide a default definition for
4981         bfd_is_target_special_symbol.
4982         * aout-target.h: Likewise.
4983         * aout-tic30.c: Likewise.
4984         * binary.c: Likewise.
4985         * coffcode.h: Likewise.
4986         * i386msdos.c: Likewise.
4987         * ieee.c: Likewise.
4988         * ihex.c: Likewise.
4989         * libaout.h: Likewise.
4990         * libbfd-in.h: Likewise
4991         * libecoff.h: Likewise.
4992         * mach-o.c: Likewise.
4993         * mmo.c: Likewise.
4994         * nlm-target.h: Likewise.
4995         * oasys.c: Likewise.
4996         * pef.c: Likewise.
4997         * ppcboot.c: Likewise.
4998         * srec.c: Likewise.
4999         * tekhex.c: Likewise.
5000         * versados.c: Likewise.
5001         * vms.c: Likewise.
5002         * xcoff-target.h: Likewise.
5003         * xsym.c: Likewise.
5004         * libbfd.h: Regenerate.
5006 2004-10-08  Daniel Jacobowitz  <dan@debian.org>
5008         * config.bfd: Include 64-bit support for i[3-7]86-*-solaris2*.
5009         * elf64-x86-64.c (elf64_x86_64_section_from_shdr): New function.
5010         (elf_backend_section_from_shdr): Define.
5012 2004-10-08  Alan Modra  <amodra@bigpond.net.au>
5014         * syms.c (bfd_is_local_label): Return false for file symbols.
5016 2004-10-07  Bob Wilson  <bob.wilson@acm.org>
5017             David Heine  <dlheine@tensilica.com>
5019         * elf32-xtensa.c (elf32xtensa_size_opt): New global variable.
5020         (xtensa_default_isa): Global variable moved here from xtensa-isa.c.
5021         (elf32xtensa_no_literal_movement): New global variable.
5022         (elf_howto_table): Add entries for new relocations.
5023         (elf_xtensa_reloc_type_lookup): Handle new relocations.
5024         (property_table_compare): When addresses are equal, compare sizes and
5025         various property flags.
5026         (property_table_matches): New.
5027         (xtensa_read_table_entries): Extend to read new property tables.  Add
5028         output_addr parameter to indicate that output addresses should be used.
5029         Use bfd_get_section_limit.
5030         (elf_xtensa_find_property_entry): New.
5031         (elf_xtensa_in_literal_pool): Use elf_xtensa_find_property_entry.
5032         (elf_xtensa_check_relocs): Handle new relocations.
5033         (elf_xtensa_do_reloc): Use bfd_get_section_limit.  Handle new
5034         relocations.  Use new xtensa-isa.h functions.
5035         (build_encoding_error_message): Remove encode_result parameter.  Add
5036         new target_address parameter used to detect alignment errors.
5037         (elf_xtensa_relocate_section): Use bfd_get_section_limit.  Clean up
5038         error handling.  Use new is_operand_relocation function.
5039         (elf_xtensa_combine_prop_entries, elf_xtensa_merge_private_bfd_data):
5040         Use underbar macro for error messages.  Formatting.
5041         (get_const16_opcode): New.
5042         (get_l32r_opcode): Add a separate flag for initialization.
5043         (get_relocation_opnd): Operand number is no longer explicit in the
5044         relocation.  Change to decode the opcode and analyze its operands.
5045         (get_relocation_slot): New.
5046         (get_relocation_opcode): Add bfd parameter.  Use bfd_get_section_limit.
5047         Use new xtensa-isa.h functions to handle multislot instructions.
5048         (is_l32r_relocation): Add bfd parameter.  Use is_operand_relocation.
5049         (get_asm_simplify_size, is_alt_relocation, is_operand_relocation,
5050         insn_decode_len, insn_decode_opcode, check_branch_target_aligned,
5051         check_loop_aligned, check_branch_target_aligned_address, narrowable,
5052         widenable, narrow_instruction, widen_instruction, op_single_fmt_table,
5053         get_single_format, init_op_single_format_table): New.
5054         (elf_xtensa_do_asm_simplify): Add error_message parameter and use it
5055         instead of calling _bfd_error_handler.  Use new xtensa-isa.h functions.
5056         (contract_asm_expansion): Add error_message parameter and pass it to
5057         elf_xtensa_do_asm_simplify.  Replace use of R_XTENSA_OP0 relocation
5058         with R_XTENSA_SLOT0_OP.
5059         (get_expanded_call_opcode): Extend to handle either L32R or CONST16
5060         instructions.  Use new xtensa-isa.h functions.
5061         (r_reloc struct): Add new virtual_offset field.
5062         (r_reloc_init): Add contents and content_length parameters.  Set
5063         virtual_offset field to zero.  Add contents to target_offset field for
5064         partial_inplace relocations.
5065         (r_reloc_is_defined): Check for null.
5066         (print_r_reloc): New debug function.
5067         (source_reloc struct): Replace xtensa_operand field with pair of the
5068         opcode and the operand position.  Add is_abs_literal field.
5069         (init_source_reloc): Specify operand by opcode/position pair.  Set
5070         is_abs_literal field.
5071         (source_reloc_compare): When target_offsets are equal, compare other
5072         fields to make sorting predictable.
5073         (literal_value struct): Add is_abs_literal field.
5074         (value_map_hash_table struct): Add has_last_loc and last_loc fields.
5075         (init_literal_value): New.
5076         (is_same_value): Replace with ...
5077         (literal_value_equal): ... this function.  Add comparisons of
5078         virtual_offset and is_abs_literal fields.
5079         (value_map_hash_table_init): Use bfd_zmalloc.  Check for allocation
5080         failure.  Initialize has_last_loc field.
5081         (value_map_hash_table_delete): New.
5082         (hash_literal_value): Rename to ...
5083         (literal_value_hash): ... this.  Include is_abs_literal flag and
5084         virtual_offset field in the hash value.
5085         (get_cached_value): Rename to ...
5086         (value_map_get_cached_value): ... this.  Update calls to
5087         literal_value_hash and literal_value_equal.
5088         (add_value_map): Check for allocation failure.  Update calls to
5089         value_map_get_cached_value and literal_value_hash.
5090         (text_action, text_action_list, text_action_t): New types.
5091         (find_fill_action, compute_removed_action_diff, adjust_fill_action,
5092         text_action_add, text_action_add_literal, offset_with_removed_text,
5093         offset_with_removed_text_before_fill, find_insn_action,
5094         print_action_list, print_removed_literals): New.
5095         (offset_with_removed_literals): Delete.
5096         (xtensa_relax_info struct): Add is_relaxable_asm_section, action_list,
5097         fix_array, fix_array_count, allocated_relocs, relocs_count, and
5098         allocated_relocs_count fields.
5099         (init_xtensa_relax_info): Initialize new fields.
5100         (reloc_bfd_fix struct): Add new translated field.
5101         (reloc_bfd_fix_init): Add translated parameter and use it to set the
5102         translated field.
5103         (fix_compare, cache_fix_array): New.
5104         (get_bfd_fix): Remove fix_list parameter and get all relax_info for the
5105         section via get_xtensa_relax_info.  Use cache_fix_array to set up
5106         sorted fix_array and use bsearch instead of linear search.
5107         (section_cache_t): New struct.
5108         (init_section_cache, section_cache_section, clear_section_cache): New.
5109         (ebb_t, ebb_target_enum, proposed_action, ebb_constraint): New types.
5110         (init_ebb_constraint, free_ebb_constraint, init_ebb, extend_ebb_bounds,
5111         extend_ebb_bounds_forward, extend_ebb_bounds_backward,
5112         insn_block_decodable_len, ebb_propose_action, ebb_add_proposed_action):
5113         New.
5114         (retrieve_contents): Use bfd_get_section_limit.
5115         (elf_xtensa_relax_section): Add relocations_analyzed flag.  Update call
5116         to compute_removed_literals.  Free value_map_hash_table when no longer
5117         needed.
5118         (analyze_relocations): Check is_relaxable_asm_section flag.  Call
5119         compute_text_actions for all sections.
5120         (find_relaxable_sections): Mark sections as relaxable if they contain
5121         ASM_EXPAND relocations that can be optimized.  Adjust r_reloc_init
5122         call.  Increment relax_info src_count field only for appropriate
5123         relocation types.  Remove is_literal_section check.
5124         (collect_source_relocs): Use bfd_get_section_limit.  Adjust calls to
5125         r_reloc_init and find_associated_l32r_irel.  Check
5126         is_relaxable_asm_section flag.  Handle L32R instructions with absolute
5127         literals.  Pass is_abs_literal flag to init_source_reloc.
5128         (is_resolvable_asm_expansion): Use bfd_get_section_limit.  Check for
5129         CONST16 instructions.  Adjust calls to r_reloc_init and
5130         pcrel_reloc_fits.  Handle weak symbols conservatively.
5131         (find_associated_l32r_irel): Add bfd parameter and pass it to
5132         is_l32r_relocation.
5133         (compute_text_actions, compute_ebb_proposed_actions,
5134         compute_ebb_actions, check_section_ebb_pcrels_fit,
5135         check_section_ebb_reduces, text_action_add_proposed,
5136         compute_fill_extra_space): New.
5137         (remove_literals): Replace with ...
5138         (compute_removed_literals): ... this function.  Call
5139         init_section_cache.  Use bfd_get_section_limit.  Sort internal_relocs.
5140         Call xtensa_read_table_entries to get the property table.  Skip
5141         relocations other than R_XTENSA_32 and R_XTENSA_PLT.  Use new
5142         is_removable_literal, remove_dead_literal, and
5143         identify_literal_placement functions.
5144         (get_irel_at_offset): Rewrite to use bsearch on sorted relocations
5145         instead of linear search.
5146         (is_removable_literal, remove_dead_literal,
5147         identify_literal_placement): New.
5148         (relocations_reach): Update check for literal not referenced by any
5149         PC-relative relocations.  Adjust call to pcrel_reloc_fits.
5150         (coalesce_shared_literal, move_shared_literal): New.
5151         (relax_section): Use bfd_get_section_limit.  Call
5152         translate_section_fixes.  Update calls to r_reloc_init and
5153         offset_with_removed_text.  Check new is_relaxable_asm_section flag.
5154         Add call to pin_internal_relocs.  Add special handling for
5155         R_XTENSA_ASM_SIMPLIFY and R_XTENSA_DIFF* relocs.  Use virtual_offset
5156         info to calculate new addend_displacement variable.  Replace code for
5157         deleting literals with more general code to perform the actions
5158         determined by the action_list for the section.
5159         (translate_section_fixes, translate_reloc_bfd_fix): New.
5160         (translate_reloc): Check new is_relaxable_asm_section flag.  Call
5161         find_removed_literal only if is_operand_relocation.  Update call to
5162         offset_with_removed_text.  Use new target_offset and removed_bytes
5163         variables.
5164         (move_literal): New.
5165         (relax_property_section):  Use bfd_get_section_limit.  Set new
5166         is_full_prop_section flag and handle new property tables.  Update calls
5167         to r_reloc_init and offset_with_removed_text.  Check
5168         is_relaxable_asm_section flag.  Handle expansion of zero-sized
5169         unreachable entries, with use of offset_with_removed_text_before_fill.
5170         For relocatable links, combine entries only for literal tables.
5171         (relax_section_symbols): Check is_relaxable_asm_section flag.  Update
5172         calls to offset_with_removed_text.  Translate st_size field for
5173         function symbols.
5174         (do_fix_for_relocatable_link): Change to return bfd_boolean to indicate
5175         failure.  Add contents parameter.  Update call to get_bfd_fix.  Update
5176         call to r_reloc_init.  Call _bfd_error_handler and return FALSE for
5177         R_XTENSA_ASM_EXPAND relocs.
5178         (do_fix_for_final_link): Add input_bfd and contents parameters.  Update
5179         call to get_bfd_fix.  Include offset from contents for partial_inplace
5180         relocations.
5181         (is_reloc_sym_weak): New.
5182         (pcrel_reloc_fits): Use new xtensa-isa.h functions.
5183         (prop_sec_len): New.
5184         (xtensa_is_property_section): Handle new property sections.
5185         (is_literal_section): Delete.
5186         (internal_reloc_compare): When r_offset matches, compare r_info and
5187         r_addend to make sorting predictable.
5188         (internal_reloc_matches): New.
5189         (xtensa_get_property_section_name): Handle new property sections.
5190         (xtensa_get_property_predef_flags): New.
5191         (xtensa_callback_required_dependence): Use bfd_get_section_limit.
5192         Update calls to xtensa_isa_init, is_l32r_relocation, and r_reloc_init.
5193         * xtensa-isa.c (xtensa_default_isa): Moved to elf32-xtensa.c.
5194         (xtisa_errno, xtisa_error_msg): New variables.
5195         (xtensa_isa_errno, xtensa_isa_error_msg): New.
5196         (xtensa_insnbuf_alloc): Add error handling.
5197         (xtensa_insnbuf_to_chars): Add num_chars parameter.  Update to
5198         use xtensa_format_decode.  Add error handling.
5199         (xtensa_insnbuf_from_chars): Add num_chars parameter.  Decode the
5200         instruction length to find the number of bytes to copy.
5201         (xtensa_isa_init): Add error handling.  Replace calls to
5202         xtensa_load_isa and xtensa_extend_isa with code to initialize lookup
5203         tables in the xtensa_modules structure.
5204         (xtensa_check_isa_config, xtensa_add_isa, xtensa_load_isa,
5205         xtensa_extend_isa): Delete.
5206         (xtensa_isa_free): Change to only free lookup tables.
5207         (opname_lookup_compare): Replace with ...
5208         (xtensa_isa_name_compare): ... this function.  Use strcasecmp.
5209         (xtensa_insn_maxlength): Rename to ...
5210         (xtensa_isa_maxlength): ... this.
5211         (xtensa_insn_length): Delete.
5212         (xtensa_insn_length_from_first_byte): Replace with ...
5213         (xtensa_isa_length_from_chars): ... this function.
5214         (xtensa_num_opcodes): Rename to ...
5215         (xtensa_isa_num_opcodes): ... this.
5216         (xtensa_isa_num_pipe_stages, xtensa_isa_num_formats,
5217         xtensa_isa_num_regfiles, xtensa_isa_num_stages,
5218         xtensa_isa_num_sysregs, xtensa_isa_num_interfaces,
5219         xtensa_isa_num_funcUnits, xtensa_format_name, xtensa_format_lookup,
5220         xtensa_format_decode, xtensa_format_encode, xtensa_format_length,
5221         xtensa_format_num_slots, xtensa_format_slot_nop_opcode,
5222         xtensa_format_get_slot, xtensa_format_set_slot): New functions.
5223         (xtensa_opcode_lookup): Add error handling.
5224         (xtensa_decode_insn): Replace with ...
5225         (xtensa_opcode_decode): ... this function, with new format and
5226         slot parameters.  Add error handling.
5227         (xtensa_encode_insn): Replace with ...
5228         (xtensa_opcode_encode): ... this function, which does the encoding via
5229         one of the entries in the "encode_fns" array.  Add error handling.
5230         (xtensa_opcode_name): Add error handling.
5231         (xtensa_opcode_is_branch, xtensa_opcode_is_jump, xtensa_opcode_is_loop,
5232         xtensa_opcode_is_call): New.
5233         (xtensa_num_operands): Replace with ...
5234         (xtensa_opcode_num_operands): ... this function.  Add error handling.
5235         (xtensa_opcode_num_stateOperands,
5236         xtensa_opcode_num_interfaceOperands, xtensa_opcode_num_funcUnit_uses,
5237         xtensa_opcode_funcUnit_use, xtensa_operand_name,
5238         xtensa_operand_is_visible): New.
5239         (xtensa_get_operand, xtensa_operand_kind): Delete.
5240         (xtensa_operand_inout): Add error handling and special-case for
5241         "sout" operands.
5242         (xtensa_operand_get_field, xtensa_operand_set_field): Rewritten to
5243         operate on one slot of an instruction.  Added error handling.
5244         (xtensa_operand_encode): Handle default operands with no encoding
5245         functions.  Check for success by comparing against decoded value.
5246         Add error handling.
5247         (xtensa_operand_decode): Handle default operands.  Return decoded value
5248         through argument pointer.  Add error handling.
5249         (xtensa_operand_is_register, xtensa_operand_regfile,
5250         xtensa_operand_num_regs, xtensa_operand_is_known_reg): New.
5251         (xtensa_operand_isPCRelative): Rename to ...
5252         (xtensa_operand_is_PCrelative): ... this.  Add error handling.
5253         (xtensa_operand_do_reloc, xtensa_operand_undo_reloc): Return value
5254         through argument pointer.  Add error handling.
5255         (xtensa_stateOperand_state, xtensa_stateOperand_inout,
5256         xtensa_interfaceOperand_interface, xtensa_regfile_lookup,
5257         xtensa_regfile_lookup_shortname, xtensa_regfile_name,
5258         xtensa_regfile_shortname, xtensa_regfile_view_parent,
5259         xtensa_regfile_num_bits, xtensa_regfile_num_entries,
5260         xtensa_state_lookup, xtensa_state_name, xtensa_state_num_bits,
5261         xtensa_state_is_exported, xtensa_sysreg_lookup,
5262         xtensa_sysreg_lookup_name, xtensa_sysreg_name, xtensa_sysreg_number,
5263         xtensa_sysreg_is_user, xtensa_interface_lookup, xtensa_interface_name,
5264         xtensa_interface_num_bits, xtensa_interface_inout,
5265         xtensa_interface_has_side_effect, xtensa_funcUnit_lookup,
5266         xtensa_funcUnit_name, xtensa_funcUnit_num_copies): New.
5267         * xtensa-modules.c: Rewrite to use new data structures.
5268         * reloc.c (BFD_RELOC_XTENSA_DIFF8, BFD_RELOC_XTENSA_DIFF16,
5269         BFD_RELOC_XTENSA_DIFF32, BFD_RELOC_XTENSA_SLOT0_OP,
5270         BFD_RELOC_XTENSA_SLOT1_OP, BFD_RELOC_XTENSA_SLOT2_OP,
5271         BFD_RELOC_XTENSA_SLOT3_OP, BFD_RELOC_XTENSA_SLOT4_OP,
5272         BFD_RELOC_XTENSA_SLOT5_OP, BFD_RELOC_XTENSA_SLOT6_OP,
5273         BFD_RELOC_XTENSA_SLOT7_OP, BFD_RELOC_XTENSA_SLOT8_OP,
5274         BFD_RELOC_XTENSA_SLOT9_OP, BFD_RELOC_XTENSA_SLOT10_OP,
5275         BFD_RELOC_XTENSA_SLOT11_OP, BFD_RELOC_XTENSA_SLOT12_OP,
5276         BFD_RELOC_XTENSA_SLOT13_OP, BFD_RELOC_XTENSA_SLOT14_OP,
5277         BFD_RELOC_XTENSA_SLOT0_ALT, BFD_RELOC_XTENSA_SLOT1_ALT,
5278         BFD_RELOC_XTENSA_SLOT2_ALT, BFD_RELOC_XTENSA_SLOT3_ALT,
5279         BFD_RELOC_XTENSA_SLOT4_ALT, BFD_RELOC_XTENSA_SLOT5_ALT,
5280         BFD_RELOC_XTENSA_SLOT6_ALT, BFD_RELOC_XTENSA_SLOT7_ALT,
5281         BFD_RELOC_XTENSA_SLOT8_ALT, BFD_RELOC_XTENSA_SLOT9_ALT,
5282         BFD_RELOC_XTENSA_SLOT10_ALT, BFD_RELOC_XTENSA_SLOT11_ALT,
5283         BFD_RELOC_XTENSA_SLOT12_ALT, BFD_RELOC_XTENSA_SLOT13_ALT,
5284         BFD_RELOC_XTENSA_SLOT14_ALT): Add new relocations.
5285         * Makefile.am (xtensa-isa.lo, xtensa-modules.lo): Update dependencies.
5286         * Makefile.in: Regenerate.
5287         * bfd-in2.h: Likewise.
5288         * libbfd.h: Likewise.
5290 2004-10-07  Richard Sandiford  <rsandifo@redhat.com>
5292         * elf64-mips.c (mips_elf64_write_rel): Use STN_UNDEF for relocs
5293         against the absolute section.
5294         (mips_elf64_write_rela): Likewise.
5296 2004-10-07  Jan Beulich <jbeulich@novell.com>
5298         * elf.c (elf_find_function): Don't generally check for matching
5299         section, just for non-file symbols.  Remove redunant comparison
5300         for the latter.
5301         * elf32-arm.h (arm_elf_find_function): Likewise.
5303 2004-10-07  Jeff Baker  <jbaker@qnx.com>
5305         * elflink.c (_bfd_elf_add_dynamic_entry): Add code to warn if
5306         adding a DT_TEXTREL to a shared object and --warn-shared-textrel
5307         was specified.
5309 2004-10-04  Roland McGrath  <roland@redhat.com>
5311         * hash.c (bfd_hash_set_default_size): Use const for table.
5312         Use size_t instead of int for variable compared to sizeof results.
5314 2004-10-05  Alan Modra  <amodra@bigpond.net.au>
5316         PR 425
5317         * syms.c (_bfd_stab_section_find_nearest_line): Ignore R_*_NONE relocs.
5319 2004-10-01  Paul Brook  <paul@codesourcery.com>
5321         * elf32-arm.h (elf32_arm_fake_sections,
5322         is_arm_elf_unwind_section_name, elf32_arm_section_from_shdr): New
5323         functions.
5324         (elf_backend_fake_sections, elf_backend_section_from_shdr): Define.
5326 2004-10-01  Alan Modra  <amodra@bigpond.net.au>
5328         * elf-bfd.h (struct eh_cie_fde): Add need_relative and
5329         need_lsda_relative.
5330         * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Set
5331         need_relative or need_lsda_relative if we are processing an
5332         offset for a reloc on a FDE initial loc or LSDA field
5333         respectively.
5334         (_bfd_elf_write_section_eh_frame): Test need_relative and
5335         need_lsda_relative in place of corresponding make_* field
5336         when deciding to use pc-relative encodings.
5338 2004-09-30  Paul Brook  <paul@codesourcery.com>
5340         * elf32-arm.h (bfd_elf32_arm_set_target_relocs): Handle "abs"
5341         target2 relocation type.
5343 2004-09-30  H.J. Lu  <hongjiu.lu@intel.com>
5345         PR 414
5346         * elflink.c (_bfd_elf_merge_symbol): Check TLS symbol.
5348 2004-09-30  Paul Brook  <paul@codesourcery.com>
5350         * reloc.c: Add BFD_RELOC_ARM_SMI.
5351         * bfd-in2.h: Regenerate.
5352         * libbfd.h: Ditto.
5354 2004-09-24  Alan Modra  <amodra@bigpond.net.au>
5356         * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add output section
5357         vma and output offset to address.
5358         * simple.c (simple_save_output_info): Only set output section
5359         and offset for debug sections, or those not already set up by
5360         the linker.
5361         (bfd_simple_get_relocated_section_contents): Update comment.
5363 2004-09-24  Alan Modra  <amodra@bigpond.net.au>
5365         * elf.c (IS_LOADED): Delete.
5366         (assign_file_positions_for_segments): Just test SEC_LOAD instead.
5367         Restore SEC_HAS_CONTENTS test to the one place it was used prior
5368         to 2004-09-22.
5370 2004-09-23  Alan Modra  <amodra@bigpond.net.au>
5372         PR gas/396
5373         * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
5374         bfd_mach_sparc_sparclet and bfd_mach_sparc_sparclite.  Remove
5375         redundant assignment of EM_SPARC.
5377 2004-09-22  Brian Ford  <ford@vss.fsi.com>
5379         * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
5380         alignment for .rdata sections so sse[2] code works with gcc >= 3.3.3
5381         constants.
5382         * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
5384 2004-09-22  Alan Modra  <amodra@bigpond.net.au>
5386         * elf32-ppc.c (ppc_elf_modify_segment_map): Delete.
5387         (elf_backend_modify_segment_map): Don't define.
5389 2004-09-22  Alan Modra  <amodra@bigpond.net.au>
5391         * elf.c (IS_LOADED): Define.
5392         (assign_file_positions_for_segments): Don't round up file offset of
5393         PT_LOAD segments containing no SEC_LOAD sections, instead round down.
5394         Delete code handling link script adjustment of lma.  Do the adjust
5395         in later code handling similar ajustments.  Remove dead code error
5396         check.  Warn if section lma would require a negative offset
5397         adjustment.  Tweak lma adjustment to use p_filesz rather than p_memsz.
5398         Use p_vaddr + p_memsz inside section loop in place of voff.  Don't
5399         update voff in section loop.  Change voff in segment loop to be an
5400         adjustment on top of "off".  Set sec->filepos and update "off" later.
5401         Test for loadable sections consistently using IS_LOADED.  Similarly,
5402         test for alloc-only sections other than .tbss consistently.
5403         Don't bother checking SEC_ALLOC in PT_LOAD segments.  Remove FIXME.
5404         Tidy PT_NOTE handling.  Use %B and %A in error messages.
5405         (assign_file_positions_except_relocs): Use %B in error message.
5407 2004-09-17  H.J. Lu  <hongjiu.lu@intel.com>
5409         * Makefile.am (AUTOMAKE_OPTIONS): Require 1.9.
5410         (CONFIG_STATUS_DEPENDENCIES): New.
5411         (Makefile): Removed.
5412         (config.status): Likewise.
5413         * Makefile.in: Regenerated.
5415 2004-09-17  Paul Brook  <paul@codesourcery.com>
5417         * bfd-in.h (bfd_elf32_arm_set_target_relocs): Add prototype.
5418         (bfd_elf32_arm_process_before_allocation): Update prototype.
5419         * bfd-in2.h: Regenerate.
5420         * bfd/elf32-arm.h (elf32_arm_link_hash_table): Add target2_reloc.
5421         (elf32_arm_link_hash_table_create): Set it.
5422         (bfd_elf32_arm_process_before_allocation): Remove target1_is_rel.
5423         (bfd_elf32_arm_set_target_relocs): New function.
5424         (arm_real_reloc_type): New function.
5425         (elf32_arm_final_link_relocate): Use it.  Handle R_ARM_PREL31 and
5426         R_ARM_GOT_PREL.  Remove R_ARM_TARGET1.
5427         (elf32_arm_gc_sweep_hook): Ditto.
5428         (elf32_arm_check_relocs): Ditto.
5429         (elf32_arm_relocate_section): Handle R_ARM_GOT_PREL.
5430         * elfarm-nabi.c (elf32_arm_howto_table): Add R_ARM_PREL31 and
5431         R_ARM_GOT_TARGET2.
5432         (elf32_arm_got_prel): New variable.
5433         (elf32_arm_howto_from_type): New function.
5434         (elf32_arm_info_to_howto): Use it.
5435         (elf32_arm_reloc_map): Add BFD_RELOC_ARM_PREL31 and
5436         BFD_RELOC_ARM_TARGET2.
5437         * libbfd.h: Regenerate.
5438         * reloc.c: Add BFD_RELOC_ARM_TARGET2 and BFD_RELOC_ARM_PREL31.
5440 2004-09-17  Alan Modra  <amodra@bigpond.net.au>
5442         * ecoff.c: Update u.undef.next refs.
5443         * elf64-ppc.c: Likewise.
5444         * elflink.c: Likewise.
5445         * linker.c: Likewise.
5446         * xcofflink.c: Likewise.
5448         * elf-bfd.h (struct elf_link_hash_entry): Rearrange.  Add FIXME to
5449         dynamic_def.  Combine weakdef and elf_hash_value.  Move vtable
5450         fields to indirect struct.
5451         * elf-m10300.c: Update u.weakdef refs.
5452         * elf32-arm.h: Likewise.
5453         * elf32-cris.c: Likewise.
5454         * elf32-frv.c: Likewise.
5455         * elf32-hppa.c: Likewise.
5456         * elf32-i370.c: Likewise.
5457         * elf32-i386.c: Likewise.
5458         * elf32-m32r.c: Likewise.
5459         * elf32-m68k.c: Likewise.
5460         * elf32-ppc.c: Likewise.
5461         * elf32-s390.c: Likewise.
5462         * elf32-sh.c: Likewise.
5463         * elf32-sparc.c: Likewise.
5464         * elf32-vax.c: Likewise.
5465         * elf32-xtensa.c: Likewise.
5466         * elf64-alpha.c: Likewise.
5467         * elf64-hppa.c: Likewise.
5468         * elf64-ppc.c: Likewise.
5469         * elf64-s390.c: Likewise.
5470         * elf64-sh64.c: Likewise.
5471         * elf64-sparc.c: Likewise.
5472         * elf64-x86-64.c: Likewise.
5473         * elfxx-ia64.c: Likewise.
5474         * elfxx-mips.c: Likewise.
5475         * elflink.c: Likewise.  Also u.elf_hash_value.
5476         (elf_gc_propagate_vtable_entries_used): Update for h->vtable
5477         indirection.
5478         (elf_gc_smash_unused_vtentry_relocs): Likewise.
5479         (bfd_elf_gc_record_vtinherit): Alloc vtable.
5480         (bfd_elf_gc_record_vtentry): Likewise.
5481         * elf.c (_bfd_elf_link_hash_newfunc): Use memset.
5483 2004-09-17  Alan Modra  <amodra@bigpond.net.au>
5485         * Makefile.am: Run "make dep-am".
5486         * Makefile.in: Regenerate.
5487         * bfd-in2.h: Regenerate.
5488         * po/SRC-POTFILES.in: Regenerate.
5489         * po/bfd.pot: Regenerate.
5491 2004-09-16  Alan Modra  <amodra@bigpond.net.au>
5493         * elf-bfd.h (struct elf_link_hash_entry): Replace elf_link_hash_flags
5494         with bitfields.  Make "type" and "other" bitfields too.
5495         (ELF_LINK_HASH_REF_REGULAR, ELF_LINK_HASH_DEF_REGULAR,
5496         ELF_LINK_HASH_REF_DYNAMIC, ELF_LINK_HASH_DEF_DYNAMIC,
5497         ELF_LINK_HASH_REF_REGULAR_NONWEAK, ELF_LINK_HASH_DYNAMIC_ADJUSTED,
5498         ELF_LINK_HASH_NEEDS_COPY, ELF_LINK_HASH_NEEDS_PLT, ELF_LINK_NON_ELF,
5499         ELF_LINK_HIDDEN, ELF_LINK_FORCED_LOCAL, ELF_LINK_HASH_MARK,
5500         ELF_LINK_NON_GOT_REF, ELF_LINK_DYNAMIC_DEF, ELF_LINK_DYNAMIC_WEAK,
5501         ELF_LINK_POINTER_EQUALITY_NEEDED): Delete.
5502         (ELF_COMMON_DEF_P, WILL_CALL_FINISH_DYNAMIC_SYMBOL): Update.
5503         * elf-hppa.h: Update all uses of elf_link_hash_flags.
5504         * elf-m10300.c: Likewise.
5505         * elf.c: Likewise.
5506         * elf32-arm.h: Likewise.
5507         * elf32-cris.c: Likewise.
5508         * elf32-frv.c: Likewise.
5509         * elf32-hppa.c: Likewise.
5510         * elf32-i370.c: Likewise.
5511         * elf32-i386.c: Likewise.
5512         * elf32-m32r.c: Likewise.
5513         * elf32-m68k.c: Likewise.
5514         * elf32-ppc.c: Likewise.
5515         * elf32-s390.c: Likewise.
5516         * elf32-sh-symbian.c: Likewise.
5517         * elf32-sh.c: Likewise.
5518         * elf32-sh64.c: Likewise.
5519         * elf32-sparc.c: Likewise.
5520         * elf32-vax.c: Likewise.
5521         * elf32-xtensa.c: Likewise.
5522         * elf64-alpha.c: Likewise.
5523         * elf64-hppa.c: Likewise.
5524         * elf64-ppc.c: Likewise.
5525         * elf64-s390.c: Likewise.
5526         * elf64-sh64.c: Likewise.
5527         * elf64-sparc.c: Likewise.
5528         * elf64-x86-64.c: Likewise.
5529         * elflink.c: Likewise.
5530         * elfxx-ia64.c: Likewise.
5531         * elfxx-mips.c: Likewise.
5532         * configure.in (AM_INIT_AUTOMAKE): Set version to 2.15.92.
5533         * configure: Regenerate.
5534         * aclocal.m4: Regenerate.
5536 2004-09-16  Alan Modra  <amodra@bigpond.net.au>
5538         * elf32-arm.h (elf32_arm_gc_sweep_hook): Add #ifndef OLD_ARM_ABI
5539         around uses of R_ARM_TARGET1.
5540         (elf32_arm_check_relocs): Likewise.
5542 2004-09-13  Paul Brook  <paul@codesourcery.com>
5544         * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update
5545         prototype.
5546         * bfd-in2.h: Regenerate.
5547         * libbfd.h: Regenerate.
5548         * elf32-arm.h (elf32_arm_link_hash_table): Add target1_is_rel.
5549         (elf32_arm_link_hash_table_create): Set target1_is_rel.
5550         (bfd_elf32_arm_process_before_allocation): Ditto.
5551         (elf32_arm_final_link_relocate): Handle R_ARM_TARGET1.
5552         (elf32_arm_gc_sweep_hook, elf32_arm_check_relocs): Ditto.
5553         * elfarm-nabi.c (elf32_arm_howto_table): Rename RELABS to TARGET1.
5554         * reloc.c: Ditto.
5556 2004-09-10  Joel Brobecker  <brobecker@gnat.com>
5558         * hpux-core.c (thread_section_p): New function.
5559         (hpux_core_core_file_p): Fix computation of offset in call
5560         to bfd_seek. Create a ".reg" section from an arbitrary
5561         ".reg/<id>" section if none was created after having read
5562         all sections.
5564 2004-09-11  Andreas Schwab  <schwab@suse.de>
5566         * acinclude.m4: Fix spelling of ACX_NONCANONICAL_*.
5567         * aclocal.m4: Rebuild.
5568         * configure: Rebuild.
5570 2004-09-10  Joel Brobecker  <brobecker@gnat.com>
5572         * section.c (bfd_sections_find_if): Fix parameter name in
5573         comment to match code.
5575 2004-09-10  Alan Modra  <amodra@bigpond.net.au>
5577         * elf.c  (assign_file_positions_except_relocs): Assign relocs
5578         stored in a bfd section.
5580 2004-09-08  Hans-Peter Nilsson  <hp@axis.com>
5582         * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Reset
5583         h->gotplt_refcount to 0, not -1.
5585 2004-09-07  Hans-Peter Nilsson  <hp@axis.com>
5587         * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOTPLT,
5588         case R_CRIS_32_GOTPLT>: For internal error message, handle NULL
5589         symname.
5590         (cris_elf_check_relocs) <case R_CRIS_32_PLT_PCREL>: Don't try to
5591         handle symbol visibility here.
5593 2004-09-07  Alan Modra  <amodra@bigpond.net.au>
5595         * elf64-ppc.c (struct ppc_link_hash_table): Add stub_globals.
5596         (is_ppc64_elf_target): Rename from is_ppc64_target.  Update all
5597         callers.
5598         (ppc_stub_name): Remove trailing "+0" on stub name.
5599         (create_linkage_sections): Create relocations for
5600         branch lookup table when --emit-relocs as well as when --shared.
5601         (ppc_build_one_stub): Emit relocs for long branch stubs.  Adjust
5602         relbrlt test.  For --emit-stub-syms, always output a sym even when
5603         one already exists on a plt call stub.  Put stub type in the stub
5604         symbol name.
5605         (ppc_size_one_stub): Size long branch stub relocs.  Adjust relbrlt
5606         test.
5607         (ppc64_elf_size_stubs): Count global sym stubs added.  Zero
5608         reloc_count in stub sections.  Adjust relbrlt test.
5609         (ppc64_elf_build_stubs): Adjust relbrlt test.  Tweak stats output.
5610         * elflink.c (bfd_elf_size_dynamic_sections): Fix comment typo.
5611         (elf_link_input_bfd): Ignore symbol index zero relocs when checking
5612         for relocs against discarded symbols.  Fix comments.
5614 2004-09-06  Mark Mitchell  <mark@codesourcery.com>
5616         * elf-bfd.h (_bfd_elf_make_dynamic_segment): Declare it.
5617         * elf.c (_bfd_elf_make_dynamic_segment): New function, split out
5618         from ...
5619         (map_sections_to_segments): ... here.  Use it.  Assign a file
5620         position to the .dynamic section if it is not loadable, but part
5621         of the PT_DYNAMIC segment.
5622         * elf32-arm.h (elf32_arm_finish_dynamic_sections): Use file
5623         offsets, not VMAs, for the BPABI.  Do not fill in the header in
5624         the .got.plt section for the BPABI.
5625         * elfarm-nabi.c (elf32_arm_symbian_modify_segment_map): Add a
5626         PT_DYNAMIC segment.
5627         (elf_backend_want_got_plt): Define to zero for Symbian OS.
5629 2004-09-06  Nick Clifton  <nickc@redhat.com>
5631         * elflink.c (elf_link_add_object_symbols): Set the error code to
5632         bfd_error_wrong_format when the input format does not match the
5633         output format.
5635 2004-09-06  Alan Modra  <amodra@bigpond.net.au>
5637         * elf64-ppc.c (is_ppc64_target): New function, extracted from..
5638         (ppc64_elf_check_directives): ..here.
5639         (ppc64_elf_size_dynamic_sections): Use it here to check bfd type
5640         before accessing ppc64_elf_tdata.
5641         (ppc64_elf_finish_dynamic_sections): And here too.
5643 2004-09-04  Alan Modra  <amodra@bigpond.net.au>
5645         * bfd.c (_bfd_default_error_handler): Correct loop exit.
5647 2004-09-03  Mark Mitchell  <mark@codesourcery.com>
5649         * config.bfd (arm*-*-symbianelf*): Use OS-specific target vectors.
5650         * configure.in (bfd_elf32_bigarm_symbian_vec): Add it.
5651         (bfd_elf32_littlearm_symbian_vec): Likewise.
5652         * configure: Regenerated.
5653         * elf-bfd.h (elf_backend_data): Add dynamic_sec_flags.
5654         * elf32-arm.h (PLT_HEADER_SIZE): Do not define.
5655         (PLT_ENTRY_SIZE): Likewise.
5656         (bfd_vma_elf32_arm_symbian_plt_entry): New
5657         variable.
5658         (elf32_arm_link_hash_table): Add plt_header_size, plt_entry_size,
5659         and symbian_p.
5660         (create_got_section): Don't create sections when generating BPABI
5661         objects.
5662         (elf32_arm_create_dynamic_sections): Tidy.
5663         (elf32_arm_link_hash_table_create): Set plt_header_size,
5664         plt_entry_size, and symbian_p.
5665         (elf32_arm_check_relocs): Do not mark .rel.dyn as loadable when
5666         generating BPABI objects.
5667         (allocate_dynrelocs): Use htab->plt_header_size, not
5668         PLT_HEADER_SIZE.  Do not add to .got.plt when
5669         generating BPABI objects.
5670         (elf32_arm_finish_dynamic_symbol): Generate Symbian OS PLTs.
5671         * elfarm-nabi.c: Add SymbianOS target vectors.
5672         * elflink.c (_bfd_elf_create_got_section): Use dynamic_sec_flags.
5673         (_bfd_elf_link_create_dynamic_sections): Likewise.
5674         * elfxx-target.h (ELF_DYNAMIC_SEC_FLAGS): New macro.
5675         (elfNN_bed): Use it.
5676         * targets.c (bfd_elf32_bigarm_symbian_vec): New variable.
5677         (bfd_elf32_littlearm_symbian_vec): Likewise.
5678         (_bfd_target_vector): Add them.
5680 2004-09-03  Nick Clifton  <nickc@redhat.com>
5682         PR 360
5683         * coffcode.h (handle_COMDAT): Replace abort with an warning
5684         message and allow the scan to continue.
5686 2004-09-02  Alan Modra  <amodra@bigpond.net.au>
5688         * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Use static_syms passed
5689         in when reading relocs, not our sorted syms.  Remove unnecessary
5690         var.
5692 2004-08-31  Eric Botcazou  <ebotcazou@libertysurf.fr>
5694         * elf.c (special_sections): Add .gnu.linkonce.b modelled on .bss.
5696 2004-08-30  Nathanael Nerode  <neroden@gcc.gnu.org>
5698         * acinclude.m4: Require AC_CANONICAL_TARGET, not AC_CANONICAL_SYSTEM.
5699         Include ../config/acx.m4 and use ACX_NONCANONICAL_* where appropriate;
5700         replace uses of *_alias with *_noncanonical.
5701         * aclocal.m4: Rebuild with aclocal 1.4p6.
5702         * Makefile.in: Rebuild with automake 1.4p6.
5703         * doc/Makefile.in: Rebuild with automake 1.4p6.
5704         * configure.in: Autoupdate with autoupdate 2.59.
5705         * config.in: Regenerate with autoheader 2.59.
5706         * configure: Regnerate with autoconf 2.59.
5708 2004-08-28  Alan Modra  <amodra@bigpond.net.au>
5710         * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Copy input
5711         symbol pointer arrays before modifying.
5713 2004-08-28  Alan Modra  <amodra@bigpond.net.au>
5715         * bfd.c (bfd_get_synthetic_symtab): Pass counts and both symbol tables.
5716         * elf-bfd.h (_bfd_elf_get_synthetic_symtab): Adjust.
5717         * elf.c (_bfd_elf_get_synthetic_symtab): Adjust.
5718         * libbfd-in.h (_bfd_nodynamic_get_synthetic_symtab): Adjust.
5719         * targets.c (struct bfd_target <_bfd_get_synthetic_symtab>): Adjust.
5720         * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't read symbols.
5721         Use both symbol tables on non-relocatable objects.  Use a common
5722         error exit.  Fix "mid" warning.
5723         * libbfd.h: Regenerate.
5724         * bfd-in2.h: Regenerate.
5726 2004-08-28  Alan Modra  <amodra@bigpond.net.au>
5728         * elf64-ppc.c (ppc64_elf_branch_reloc): Check .opd is in a regular
5729         object file.
5730         (struct sfpr_def_parms): Save some space.
5731         (sfpr_define): Here too.
5733         * elf64-ppc.c (compare_symbols): Put section syms first.
5734         (sym_exists_at): New function.
5735         (ppc64_elf_get_synthetic_symtab): Use relocs to find code entry
5736         points only for relocatable files.  Use .opd section contents
5737         otherwise.  Generally clean up the code.
5739 2004-08-27  Alan Modra  <amodra@bigpond.net.au>
5741         * elf64-ppc.c (STD_R0_0R1, STD_R0_0R12, LD_R0_0R1, LD_R0_0R12,
5742         LI_R12_0, STVX_VR0_R12_R0, LVX_VR0_R12_R0, MTLR_R0, SFPR_MAX): Define.
5743         (struct sfpr_def_parms): New.
5744         (sfpr_define): New function.
5745         (savegpr0, savegpr0_tail, restgpr0, restgpr0_tail): New functions.
5746         (savegpr1, savegpr1_tail, restgpr1, restgpr1_tail): New functions.
5747         (savefpr, savefpr0_tail, restfpr, restfpr0_tail): New functions.
5748         (savefpr1_tail, restfpr1_tail): New functions.
5749         (savevr, savevr_tail, restvr, restvr_tail): New functions.
5750         (MIN_SAVE_FPR, MAX_SAVE_FPR): Don't define.
5751         (ppc64_elf_func_desc_adjust): Use sfpr_define in place of existing
5752         code.  Define all ABI mandated _save and _rest functions.
5754 2004-08-26  Paul Brook  <paul@codesourcery.com>
5756         * elf32-arm.h (INTERWORK_FLAG): Return true for EABIv3 objects.
5758 2004-08-26  Alan Modra  <amodra@bigpond.net.au>
5760         * elf32-m32r.c (m32r_elf_relocate_section): Don't compare with
5761         TRUE or FALSE.
5763 2004-08-26  Alan Modra  <amodra@bigpond.net.au>
5765         * elf32-i386.c (elf_i386_relocate_section): Tweak last change so
5766         that pcrel correction is applied for R_386_PC32.
5768 2004-08-25  Alan Modra  <amodra@bigpond.net.au>
5770         * elf32-i386.c (elf_i386_relocate_section): Zero section contents
5771         for R_386_32 and R_386_PC32 relocs against symbols defined in
5772         discarded sections.
5774 2004-08-25  Dmitry Diky  <diwil@spec.ru>
5776         * reloc.c (BFD_RELOC_MSP430_2X_PCREL,BFD_RELOC_MSP430_RL_PCREL):
5777         Add new relocations.
5778         * bfd-in2.h: Regenerate.
5779         * libbfd.h: Regenerate.
5780         * elf32-msp430.c: Clean-up code.
5781         (elf_msp430_howto_table): Add new relocation entries.
5782         (bfd_elf32_bfd_reloc_type_lookup): New relocation handlers.
5783         (msp430_elf_relax_section): New function.
5784         (msp430_elf_relax_delete_bytes): New function.
5785         (msp430_elf_symbol_address_p): New function.
5787 2004-08-24  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.com>
5789         * elf32-m32r.c (m32r_elf_relocate_section): Handle
5790         R_M32R_SDA16_RELA in the same way as R_M32R_SDA16.
5792 2004-08-20  Daniel Jacobowitz  <dan@debian.org>
5794         * elflink.c (_bfd_elf_section_already_linked): Handle
5795         SEC_LINK_DUPLICATES_SAME_CONTENTS.
5797 2004-08-19  Mark Mitchell  <mark@codesourcery.com>
5799         * config.bfd (arm*-*-symbianelf*): New target.
5800         (arm*-*-eabi*): Likewise.
5802 2004-08-19  Alan Modra  <amodra@bigpond.net.au>
5804         * elf64-ppc.c (ppc_get_stub_entry): Change third param to a
5805         "struct ppc_link_hash_entry *".
5806         (ppc64_elf_relocate_section): Ditto for type of h.  Introduce h_elf
5807         to satisfy RELOC_FOR_GLOBAL_SYMBOL.
5809 2004-08-19  Jakub Jelinek  <jakub@redhat.com>
5811         * elf64-ppc.c (ppc64_elf_edit_opd): Support 16 byte long .opd
5812         entries (where fd_aux overlaps next entry's fd_func).
5813         Add non_overlapping argument, use it.
5814         (ppc64_elf_check_relocs, ppc64_elf_gc_mark_hook, adjust_opd_syms,
5815         ppc64_elf_size_stubs, ppc64_elf_relocate_section,
5816         ppc64_elf_output_symbol_hook): Use address / 8 instead of address / 24
5817         as indexes into opd_sym_map/opd_adjust array.
5818         * elf64-ppc.h (ppc64_elf_edit_opd): Adjust prototype.
5820 2004-08-18  Alan Modra  <amodra@bigpond.net.au>
5822         * elf64-ppc.c (func_desc_adjust): Give undefined dot-symbols a value
5823         if we can look up their function descriptor in a regular file.
5825 2004-08-18  Nick Clifton  <nickc@redhat.com>
5827         PR 324
5828         * cofflink.c (coff_link_add_symbols): Check that the comdat
5829         pointer in the coff_section_data structure has been initialised
5830         before using it.
5832 2004-08-18  Alan Modra  <amodra@bigpond.net.au>
5834         PR 338
5835         * elflink.c (bfd_elf_record_link_assignment): Add comment about
5836         changing bfd_link_hash_undefined to bfd_link_hash_new.
5838 2004-08-17  Jakub Jelinek  <jakub@redhat.com>
5840         * elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Only define
5841         if not yet defined.
5842         * elf64-ppc.c (bfd_elf64_get_synthetic_symtab): Define.
5843         (synthetic_opd, synthetic_relocatable): New variables.
5844         (compare_symbols, compare_relocs): New helper routines.
5845         (ppc64_elf_get_synthetic_symtab): New function.
5846         * bfd.c (bfd_get_synthetic_symtab): Rename dynsyms argument
5847         to relsyms.
5848         * bfd-in2.h: Regenerated.
5849         * elf.c (_bfd_elf_get_synthetic_symtab): Rename dynsyms argument
5850         to relsyms.  Return 0 if abfd is relocatable.
5852 2004-08-17  Alan Modra  <amodra@bigpond.net.au>
5854         * elflink.h (elf_gc_sweep): Keep non-alloc, non-load sections.
5856 2004-08-17  Nick Clifton  <nickc@redhat.com>
5858         * (is_arm_mapping_symbol_name): New function - return true
5859         when a symbol name matches the requirements for an ARM mapping
5860         symbol name.
5861         (arm_elf_find_function): New function based on
5862         elf_find_function in elf.c but skipping ARM mapping symbols
5863         and including thumb function symbols.
5864         (elf32_arm_find_nearest_line): Use arm_elf_find_function.
5865         (elf32_arm_output_symbol_hook): Use is_arm_mapping_symbol_name.
5867 2004-08-17  Alan Modra  <amodra@bigpond.net.au>
5869         * elf64-ppc.c (ppc64_elf_branch_reloc): New function.
5870         (ppc64_elf_howto_raw): Use ppc64_elf_branch_reloc.
5871         (ppc64_elf_brtaken_reloc): Here too.
5873 2004-08-17  Alan Modra  <amodra@bigpond.net.au>
5875         * elf64-ppc.c (add_symbol_adjust): Correct mismatched function
5876         symbol visibility.
5877         (ppc64_elf_check_directives): Check that we have the right hash
5878         table before proceeding.
5880 2004-08-17  Alan Modra  <amodra@bigpond.net.au>
5882         * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add "deleted_section".
5883         (adjust_opd_syms): Attach opd syms for deleted entries to one of
5884         the sections that will be discarded.
5886 2004-08-16  Alan Modra  <amodra@bigpond.net.au>
5888         * elflink.c (elf_section_complain_discarded): Ignore .fixup.
5890 2004-08-16  Alan Modra  <amodra@bigpond.net.au>
5892         * bfd.c (_bfd_default_error_handler): Account for doubled '%' in
5893         free space available.
5895 2004-08-16  Alan Modra  <amodra@bigpond.net.au>
5897         * pdp11.c (struct pdp11_aout_reloc_external): Delete.  Replace
5898         occurrences with bfd_byte * thoughout file.
5900         * coff-rs6000.c (do_shared_object_padding): Warning fix.
5901         (xcoff_write_armap_big): Likewise.
5902         (xcoff_write_archive_contents_old): Likewise.
5903         (xcoff_write_archive_contents_big): Likewise.
5905         * elf64-mmix.c (mmix_elf_get_section_contents): Delete declaration.
5907 2004-08-13  Nick Clifton  <nickc@redhat.com>
5909         * elf32-arm.h: Convert to ISO C90.
5911 2004-08-13  Alan Modra  <amodra@bigpond.net.au>
5913         PR 293
5914         * elf32-hppa.c (elf32_hppa_hide_symbol): Use init_refcount to
5915         zero the plt field.
5917 2004-08-13  Alan Modra  <amodra@bigpond.net.au>
5919         * bfd.c (_bfd_default_error_handler): Handle %A and %B.
5920         (bfd_archive_filename, bfd_get_section_ident): Delete.
5921         * ecofflink.c (bfd_ecoff_debug_accumulate_other): Don't call
5922         bfd_archive_filename.
5923         * elflink.c (elf_link_input_bfd): Don't use callbacks->error_handler
5924         to warn about symbols in discarded sections.  Use _bfd_error_handler.
5925         * aout-adobe.c (aout_adobe_callback): See below.
5926         * aout-cris.c (swap_ext_reloc_in): ..
5927         * coff-arm.c (find_thumb_glue, find_arm_glue,
5928         coff_arm_relocate_section, bfd_arm_process_before_allocation,
5929         coff_arm_merge_private_bfd_data, _bfd_coff_arm_set_private_flags,
5930         coff_arm_copy_private_bfd_data): ..
5931         * coff-i860.c (i860_reloc_processing): ..
5932         * coff-mcore.c (mcore_coff_unsupported_reloc,
5933         coff_mcore_relocate_section): ..
5934         * coff-ppc.c (coff_ppc_relocate_section): ..
5935         * coff-rs6000.c (xcoff_create_csect_from_smclas
5936         * coff-sh.c (sh_relax_section, sh_relax_delete_bytes,
5937         sh_swap_insns, sh_relocate_section): ..
5938         * coff-tic54x.c (tic54x_reloc_processing): ..
5939         * coff-tic80.c (coff_tic80_relocate_section): ..
5940         * coff64-rs6000.c (xcoff64_create_csect_from_smclas): ..
5941         * coffcode.h (styp_to_sec_flags, coff_slurp_line_table,
5942         coff_slurp_symbol_table, coff_classify_symbol,
5943         coff_slurp_reloc_table): ..
5944         * coffgen.c (_bfd_coff_read_string_table): ..
5945         * cofflink.c (coff_link_add_symbols, _bfd_coff_link_input_bfd,
5946         _bfd_coff_generic_relocate_section): ..
5947         * cpu-arm.c (bfd_arm_merge_machines): ..
5948         * cpu-sh.c (sh_merge_bfd_arch): ..
5949         * elf-hppa.h (elf_hppa_relocate_section): ..
5950         * elf.c (bfd_elf_string_from_elf_section, setup_group,
5951         _bfd_elf_setup_group_pointers, bfd_section_from_shdr,
5952         assign_section_numbers, _bfd_elf_symbol_from_bfd_symbol,
5953         copy_private_bfd_data, _bfd_elf_validate_reloc): ..
5954         * elf32-arm.h (find_thumb_glue, find_arm_glue,
5955         bfd_elf32_arm_process_before_allocation, elf32_thumb_to_arm_stub,
5956         elf32_arm_to_thumb_stub, elf32_arm_final_link_relocate,
5957         elf32_arm_relocate_section, elf32_arm_set_private_flags,
5958         elf32_arm_copy_private_bfd_data, elf32_arm_merge_private_bfd_data): ..
5959         * elf32-cris.c (cris_elf_relocate_section, cris_elf_check_relocs,
5960         cris_elf_merge_private_bfd_data
5961         * elf32-frv.c (elf32_frv_relocate_section, elf32_frv_check_relocs): ..
5962         * elf32-gen.c (elf32_generic_link_add_symbols): ..
5963         * elf32-hppa.c (hppa_add_stub, hppa_build_one_stub,
5964         elf32_hppa_check_relocs, get_local_syms, final_link_relocate,
5965         elf32_hppa_relocate_section): ..
5966         * elf32-i370.c (i370_elf_merge_private_bfd_data,
5967         i370_elf_check_relocs, i370_elf_relocate_section): ..
5968         * elf32-i386.c (elf_i386_info_to_howto_rel, elf_i386_check_relocs,
5969         elf_i386_relocate_section): ..
5970         * elf32-m32r.c (m32r_elf_relocate_section,
5971         m32r_elf_merge_private_bfd_data): ..
5972         * elf32-m68hc1x.c (m68hc12_add_stub,
5973         _bfd_m68hc11_elf_merge_private_bfd_data): ..
5974         * elf32-m68k.c (elf_m68k_relocate_section): ..
5975         * elf32-mcore.c (mcore_elf_unsupported_reloc,
5976         mcore_elf_relocate_section): ..
5977         * elf32-ppc.c (ppc_elf_merge_private_bfd_data, bad_shared_reloc,
5978         ppc_elf_check_relocs, ppc_elf_relocate_section,
5979         ppc_elf_begin_write_processing): ..
5980         * elf32-s390.c (elf_s390_check_relocs, invalid_tls_insn,
5981         elf_s390_relocate_section): ..
5982         * elf32-sh-symbian.c (sh_symbian_import_as,
5983         sh_symbian_process_embedded_commands,
5984         sh_symbian_relocate_section): ..
5985         * elf32-sh.c (sh_elf_relax_section, sh_elf_relax_delete_bytes,
5986         sh_elf_swap_insns, sh_elf_relocate_section, sh_elf_check_relocs,
5987         sh_elf_merge_private_data): ..
5988         * elf32-sparc.c (elf32_sparc_check_relocs,
5989         elf32_sparc_relocate_section,
5990         elf32_sparc_merge_private_bfd_data): ..
5991         * elf32-v850.c (v850_elf_check_relocs,
5992         v850_elf_merge_private_bfd_data): ..
5993         * elf32-xtensa.c (elf_xtensa_check_relocs,
5994         elf_xtensa_relocate_section, elf_xtensa_merge_private_bfd_data): ..
5995         * elf64-alpha.c (elf64_alpha_relax_with_lituse,
5996         elf64_alpha_relax_got_load, elf64_alpha_size_got_sections,
5997         elf64_alpha_relocate_section_r, elf64_alpha_relocate_section): ..
5998         * elf64-gen.c (elf64_generic_link_add_symbols): ..
5999         * elf64-ppc.c (ppc64_elf_merge_private_bfd_data, ppc_add_stub,
6000         ppc64_elf_check_relocs, ppc64_elf_edit_opd,
6001         ppc64_elf_relocate_section): ..
6002         * elf64-s390.c (elf_s390_check_relocs, invalid_tls_insn,
6003         elf_s390_relocate_section): ..
6004         * elf64-sh64.c (sh_elf64_relocate_section): ..
6005         * elf64-sparc.c (sparc64_elf_check_relocs,
6006         sparc64_elf_add_symbol_hook, sparc64_elf_relocate_section,
6007         sparc64_elf_merge_private_bfd_data): ..
6008         * elf64-x86-64.c (elf64_x86_64_check_relocs,
6009         elf64_x86_64_relocate_section): ..
6010         * elflink.c (_bfd_elf_add_default_symbol,
6011         _bfd_elf_link_assign_sym_version, elf_link_read_relocs_from_section,
6012         _bfd_elf_link_output_relocs, elf_link_add_object_symbols,
6013         bfd_elf_size_dynamic_sections, elf_link_output_extsym,
6014         elf_get_linked_section_vma, elf_fixup_link_order,
6015         bfd_elf_final_link, bfd_elf_gc_record_vtinherit,
6016         bfd_elf_gc_record_vtinherit, _bfd_elf_section_already_linked): ..
6017         * elfxx-ia64.c (elfNN_ia64_relax_section,
6018         elfNN_ia64_relocate_section, elfNN_ia64_merge_private_bfd_data): ..
6019         * elfxx-mips.c (mips_elf_perform_relocation,
6020         _bfd_mips_elf_check_relocs,
6021         _bfd_mips_elf_merge_private_bfd_data): ..
6022         * ieee.c (ieee_slurp_external_symbols): ..
6023         * ihex.c (ihex_bad_byte, ihex_scan, ihex_read_section): ..
6024         * libbfd.c (_bfd_generic_verify_endian_match): ..
6025         * linker.c (_bfd_generic_link_add_one_symbol,
6026         _bfd_generic_section_already_linked): ..
6027         * pdp11.c (translate_to_native_sym_flags): ..
6028         * pe-mips.c (coff_pe_mips_relocate_section): ..
6029         * peicode.h (pe_ILF_build_a_bfd): ..
6030         * srec.c (srec_bad_byte): ..
6031         * stabs.c (_bfd_link_section_stabs): ..
6032         * xcofflink.c (xcoff_link_add_symbols, xcoff_link_input_bfd): ..
6033         Replace all uses of bfd_archive_filename and bfd_get_section_ident
6034         with corresponding %B and %A in _bfd_error_handler format string.
6035         Replace occurrences of "fprintf (stderr," with _bfd_error_handler
6036         calls to use %A and %B.  Fix "against symbol .. from section" and
6037         similar error messages.  Combine multiple _bfd_error_handler calls
6038         where they were separated due to bfd_archive_filename deficiencies.
6039         * bfd-in2.h: Regenerate.
6041 2004-08-12  H.J. Lu  <hongjiu.lu@intel.com>
6043         * elf32-i386.c (elf_i386_relocate_section): Report unrecognized
6044         relocation.
6046 2004-08-10  Alan Modra  <amodra@bigpond.net.au>
6048         * elf64-ppc.c (struct ppc_link_hash_entry): Add was_undefined.
6049         (struct ppc_link_hash_table): Remove no_multi_toc, multi_toc_needed.
6050         Make emit_stub_syms, stub_error and has_14bit_branch bit-fields.
6051         Add twiddled_syms.
6052         (link_hash_newfunc): Init was_undefined.
6053         (add_symbol_adjust): Don't set undefined dot symbols to defweak;
6054         Use undefweak instead.
6055         (ppc64_elf_check_directives): Fix undefs chain.
6056         (ppc64_elf_next_toc_section): Remove no_multi_toc and multi_toc_needed
6057         references.
6058         (ppc64_elf_size_stubs): Adjust for add_symbol_adjust change.
6059         (undo_symbol_twiddle, ppc64_elf_restore_symbols): New functions.
6060         * elf64-ppc.h (ppc64_elf_restore_symbols): Declare.
6062 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
6064         * elf64-x86-64.c (elf64_x86_64_relocate_section): For -fno-pic
6065         error, test input_section flags rather than sec.
6067 2004-08-09  Alan Modra  <amodra@bigpond.net.au>
6069         * elf-bfd.h (struct elf_backend_data): Add
6070         elf_backend_archive_symbol_lookup.
6071         (_bfd_elf_archive_symbol_lookup): Declare.
6072         * elflink.c (_bfd_elf_archive_symbol_lookup): New function..
6073         (elf_link_add_archive_symbols): ..extracted from here.  Call the
6074         backend version.
6075         * elfxx-target.h (elf_backend_archive_symbol_lookup): Provide default.
6076         (elfNN_bed): Init new field.
6077         * elf64-ppc.c (elf_backend_check_directives): Define.
6078         (elf_backend_archive_symbol_lookup): Define.
6079         (struct ppc_link_hash_table): Add tls_get_add_fd.  Make tls_get_add
6080         a ppc_link_hash_entry pointer.
6081         (get_fdh): Move.
6082         (ppc64_elf_archive_symbol_lookup, opd_entry_value): New functions.
6083         (add_symbol_adjust, ppc64_elf_check_directives): New functions.
6084         (ppc64_elf_check_relocs, ppc64_elf_gc_mark_hook, func_desc_adjust,
6085         ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup,
6086         ppc64_elf_tls_optimize, allocate_dynrelocs, ppc_type_of_stub,
6087         ppc_build_one_stub, ppc64_elf_size_stubs, ppc64_elf_relocate_section,
6088         ppc64_elf_finish_dynamic_symbol): Handle branch relocs to function
6089         descriptor symbols.
6091 2004-08-09  Alan Modra  <amodra@bigpond.net.au>
6093         * elf64-ppc.c (struct ppc_link_hash_entry): Expand adjust_done comment.
6094         (ppc64_elf_add_symbol_hook): Test for NULL section.
6095         (get_sym_h): Formatting.
6096         (ppc64_elf_size_stubs): Include reloc addend in value stored as
6097         stub target_value.
6099         * elf64-ppc.c (ppc64_elf_relocate_section): Combine handling of
6100         long branch stubs with code handling plt and r2off branch stubs.
6102 2004-08-09  Alan Modra  <amodra@bigpond.net.au>
6104         * elf-bfd.h (_bfd_elf_gc_mark): Declare.
6105         * elflink.c (elf_link_input_bfd): Formatting.
6106         (_bfd_elf_gc_mark): Rename from elf_gc_mark and make global.  Adjust
6107         all callers.
6108         * elf64-ppc.c (struct ppc_link_hash_entry): Remove is_entry.
6109         (link_hash_newfunc): Don't set it.
6110         (ppc64_elf_copy_indirect_symbol): Nor copy it.
6111         (ppc64_elf_mark_entry_syms): Delete.
6112         (ppc64_elf_gc_mark_hook): Mark entry syms here.  Also mark opd
6113         sections.  Use get_opd_info.
6114         * elf64-ppc.h (ppc64_elf_mark_entry_syms): Delete.
6116 2004-08-09  Alan Modra  <amodra@bigpond.net.au>
6118         * elf64-ppc.c (adjust_opd_syms): Fix merge error.
6120         * elf64-ppc.c (struct ppc_link_hash_table): Remove have_undefweak.
6121         (func_desc_adjust): Don't set have_undefweak.
6122         (ppc64_elf_func_desc_adjust): Don't add an extr nop to sfpr.
6123         (ppc64_elf_relocate_section): NOP out calls to undefweak functions.
6125         * elf64-ppc.c (struct ppc_link_hash_entry): Make "oh" a
6126         "struct ppc_link_hash_entry *".  Adjust all references.
6127         (ppc64_elf_hide_symbol): Correct a comment.
6129         * elf64-ppc.c (get_opd_info): New function.
6130         (adjust_opd_syms): Use get_opd_info.  Define removed symbols as zero.
6131         (ppc64_elf_edit_opd): Use get_opd_info.  Check that sym has a dot
6132         before calling get_fdh.  Test fdh rather than h before dereferencing
6133         fdh.  Mark removed symbols in opd_adjust.
6134         (ppc64_elf_tls_optimize): Don't bother with opd adjustment here.
6135         (ppc64_elf_relocate_section): Use get_opd_info, and handle removed
6136         opd symbols.
6137         (ppc64_elf_output_symbol_hook): Likewise.
6139 2004-08-06  Paul Brook  <paul@codesourcery.com>
6141         * elfarm-nabi.c (elf32_arm_howto_table): Add new EABI relocations.
6142         (elf32_arm_reloc_map): Add BFD_RELOC_ARM_RELABS32,
6143         BFD_RELOC_ARM_ROSEGREL32 and BFD_RELOC_ARM_SBREL32.
6144         * reloc.c: Add BFD_RELOC_ARM_RELABS32, BFD_RELOC_ARM_ROSEGREL32
6145         and BFD_RELOC_ARM_SBREL32.
6146         * bfd-in2.h, bbfd.h: Regenerate.
6148 2004-08-01  Thiemo Seufer  <seufer@csv.ica.uni-stuttgart.de>
6150         * elfxx-mips.c (mips_elf_calculate_relocation): Test only for
6151         the dynamic link symbol actually in use.
6153 2004-08-01  Stephane Carrez  <stcarrez@nerim.fr>
6155         * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Handle bfd_link_hash_new
6157 2004-07-31  Joel Brobecker  <brobecker@gnat.com>
6158             Thiemo Seufer  <seufer@csv.ica.uni-stuttgart.de>
6160         * elfxx-mips.c (_bfd_mips_elf_symbol_processing): Handle
6161         SHN_MIPS_TEXT and SHN_MIPS_DATA.
6163 2004-07-30  H.J. Lu  <hongjiu.lu@intel.com>
6164             Nick Clifton  <nickc@redhat.com>
6166         PR 290
6167         * bfd.c (_bfd_default_error_handler): Make it global.
6169         * elf-bfd.h (elf_backend_data): Add link_order_error_handler.
6171         * elf.c (assign_section_numbers): Cope gracefully with sections
6172         which have SHF_LINK_ORDER set but no sh_link set up.
6173         * elflink.c (elf_get_linked_section_vma): Likewise.
6175         * elfxx-ia64.c (elf_backend_link_order_error_handler): New. Set
6176         it to NULL.
6178         * elfxx-target.h (elf_backend_link_order_error_handler): New.
6179         Set it to _bfd_default_error_handler.
6180         (elfNN_bed): Add elf_backend_link_order_error_handler.
6182         * libbfd-in.h (_bfd_default_error_handler): New.
6184         * libbfd.h: Regenerated.
6186 2004-07-30  Jakub Jelinek  <jakub@redhat.com>
6188         * archures.c (bfd_mach_sparc_64bit_p): Define.
6189         * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Use it.
6190         * bfd-in2.h: Rebuilt.
6192 2004-07-29  Alexandre Oliva  <aoliva@redhat.com>
6194         Introduce SH2a support.
6195         2004-02-18  Corinna Vinschen  <vinschen@redhat.com>
6196         * archures.c (bfd_mach_sh2a_nofpu): New.
6197         * bfd-in2.h: Rebuilt.
6198         * cpu-sh.c (SH2A_NOFPU_NEXT): New.
6199         (arch_info_struct): Add sh2a_nofpu.
6200         * elf32-sh.c (sh_elf_set_mach_from_flags): Handle sh2a_nofpu.
6201         2003-12-29  DJ Delorie  <dj@redhat.com>
6202         * reloc.c: Add relocs for sh2a.
6203         * bfd-in2.h: Regenerate.
6204         * libbfd.hh: Regenerate.
6205         2003-12-01  Michael Snyder  <msnyder@redhat.com>
6206         * archures.c (bfd_mach_sh2a): New.
6207         * bfd-in2.h: Rebuilt.
6208         * cpu-sh.c (SH_NEXT, SH2_NEXT, etc.): Change defines to enums.
6209         (SH2A_NEXT): New.
6210         (arch_info_struct): Add sh2a.
6211         * elf32-sh.c (sh_elf_set_mach_from_flags): Handle sh2a.
6213 2004-07-28  Nick Clifton  <nickc@redhat.com>
6214             John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
6216         PR 273
6217         * som.c (setup_sections): Improve estimation of space sizes in
6218         relocatable objects.
6220 2004-07-27  Jason Thorpe  <thorpej@wasabisystems.com>
6221         * config.bfd (hppa*-*-netbsd*): Set targ_defvec to
6222         bfd_elf32_hppa_nbsd_vec.  Add bfd_elf32_hppa_linux_vec
6223         to targ_selvecs.
6224         * configure.in (bfd_elf32_hppa_nbsd_vec): Add case.
6225         * configure: Regenerate.
6226         * elf32-hppa.c (elf32_hppa_object_p): Add "elf32-hppa-netbsd"
6227         case that accepts OSABI=NetBSD and OSABI=SysV.
6228         (elf32_hppa_set_gp): For "elf32-hppa-netbsd", set the GP to
6229         the base of .got or .data (if .got does not exist).
6230         (elf32_hppa_post_process_headers): For elf32-hppa-netbsd,
6231         set OSABI=NetBSD.
6232         (TARGET_BIG_SYM): Add bfd_elf32_hppa_nbsd_vec case.
6233         (TARGET_BIG_NAME): Add "elf32-hppa-netbsd" case.
6234         * targets.c (bfd_elf32_hppa_nbsd_vec): Add extern declaration.
6235         (_bfd_target_vector): Add bfd_elf32_hppa_nbsd_vec.
6237 2004-07-27  H.J. Lu  <hongjiu.lu@intel.com>
6239         PR 161/251
6240         * elf-bfd.h (bfd_elf_section_data): Add sec_group.
6241         (elf_sec_group): Defined.
6242         (bfd_elf_match_symbols_in_sections): New prototype.
6243         (_bfd_elf_setup_group_pointers): Likewise.
6245         * elf.c (bfd_elf_discard_group): Abort.
6246         (bfd_elf_set_group_contents): Also include relocation sections.
6247         Remove zero-fill for ld -r.
6248         (_bfd_elf_setup_group_pointers): New function.
6249         (elf_sort_elf_symbol): Likewise.
6250         (elf_sym_name_compare): Likewise.
6251         (bfd_elf_match_symbols_in_sections): Likewise.
6253         * elfcode.h (elf_object_p): Call _bfd_elf_setup_group_pointers.
6255         * elflink.c (match_group_member): New.
6256         (elf_link_input_bfd): Check group member for discarded section.
6257         (try_match_symbols_in_sections): New function.
6258         (already_linked): Likewise.
6259         (_bfd_elf_section_already_linked): Support mixing comdat group
6260         and linkonce section.
6262         * libbfd-in.h (bfd_section_already_linked_table_traverse): New.
6263         * linker.c (bfd_section_already_linked_table_traverse): New.
6265         * libbfd.h: Regenerated.
6267 2004-07-27  Tomer Levi  <Tomer.Levi@nsc.com>
6269         * reloc.c: Add BFD_RELOC_CRX_SWITCH8, BFD_RELOC_CRX_SWITCH16,
6270         BFD_RELOC_CRX_SWITCH32.
6271         * bfd-in2.h: Regenerate.
6272         * libbfd.h: Regenerate.
6273         * elf32-crx.c: Support relocation/relaxation of
6274         BFD_RELOC_CRX_SWITCH* types.
6276 2004-07-27  Alan Modra  <amodra@bigpond.net.au>
6278         * elf64-ppc.c: Correct "Linker stubs" comment.
6280 2004-07-26  H.J. Lu  <hongjiu.lu@intel.com>
6282         * elf-bfd.h (bfd_elf_section_data): Add a pointer for the
6283         linked-to section.
6284         (elf_linked_to_section): New.
6286         * elf.c (assign_section_numbers): Set up sh_link for
6287         SHF_LINK_ORDER.
6289         * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set sh_info
6290         to sh_link for SHT_IA_64_UNWIND sections.
6292 2004-07-22  H.J. Lu  <hongjiu.lu@intel.com>
6294         * elflink.c (elf_fixup_link_order): Add _() to error message.
6296 2004-07-22  H.J. Lu  <hongjiu.lu@intel.com>
6298         * elflink.c (elf_fixup_link_order): Issue a warning and flag
6299         an error if failed.
6301 2004-07-21  H.J. Lu  <hongjiu.lu@intel.com>
6303         * aout-adobe.c (aout_32_section_already_linked): Defined.
6304         * aout-target.h (MY_section_already_linked): Likewise.
6305         * aout-tic30.c (MY_section_already_linked): Likewise.
6306         * binary.c (binary_section_already_linked): Likewise.
6307         * bout.c (b_out_section_already_linked): Likewise.
6308         * coff-alpha.c (_bfd_ecoff_section_already_linked): Likewise.
6309         * coff-mips.c (_bfd_ecoff_section_already_linked): Likewise.
6310         * coffcode.h (coff_section_already_linked): Likewise.
6311         * i386msdos.c (msdos_section_already_linked): Likewise.
6312         * i386os9k.c (os9k_section_already_linked): Likewise.
6313         * ieee.c (ieee_section_already_linked): Likewise.
6314         * ihex.c (ihex_section_already_linked): Likewise.
6315         * mach-o.c (bfd_mach_o_section_already_linked): Likewise.
6316         * mmo.c (mmo_section_already_linked): Likewise.
6317         * nlm-target.h (nlm_section_already_linked): Likewise.
6318         * oasys.c (oasys_section_already_linked): Likewise.
6319         * pef.c (bfd_pef_section_already_linked): Likewise.
6320         * ppcboot.c (ppcboot_section_already_linked): Likewise.
6321         * som.c (som_bfd_discard_group): Likewise.
6322         * srec.c (srec_section_already_linked): Likewise.
6323         * tekhex.c (tekhex_section_already_linked): Likewise.
6324         * versados.c (versados_section_already_linked): Likewise.
6325         * vms.c (vms_section_already_linked): Likewise.
6326         * coff-target.h (_bfd_xcoff_section_already_linked): Likewise.
6327         * xsym.c (bfd_sym_section_already_linked): Likewise.
6329         * bfd-in.h (bfd_section_already_linked_table_init): New.
6330         (bfd_section_already_linked_table_free): Likewise.
6332         * coff-rs6000.c (rs6000coff_vec): Add
6333         _bfd_generic_section_already_linked.
6334         (pmac_xcoff_vec): Likewise.
6335         * coff64-rs6000.c (rs6000coff64_vec): Likewise.
6336         (aix5coff64_vec): Likewise.
6338         * elf-bfd.h (_bfd_elf_section_already_linked): New prototype.
6339         * elflink.c (_bfd_elf_section_already_linked): New function.
6341         * elfxx-target.h (bfd_elfNN_section_already_linked): Defined.
6343         * libbfd-in.h (_bfd_nolink_section_already_linked): Defined.
6344         (_bfd_generic_section_already_linked): New.
6345         (bfd_section_already_linked_hash_entry): Likewise.
6346         (bfd_section_already_linked): Likewise.
6347         (bfd_section_already_linked_table_lookup): Likewise.
6348         (bfd_section_already_linked_table_insert): Likewise.
6350         * linker.c (bfd_section_already_linked): New.
6351         (_bfd_section_already_linked_table): Likewise.
6352         (bfd_section_already_linked_table_lookup): Likewise.
6353         (bfd_section_already_linked_table_insert): Likewise.
6354         (already_linked_newfunc): Likewise.
6355         (bfd_section_already_linked_table_init): Likewise.
6356         (bfd_section_already_linked_table_free): Likewise.
6357         (_bfd_generic_section_already_linked): Likewise.
6359         * section.c (bfd_section): Remove comdat.
6360         (bfd_comdat_info): Moved to ...
6361         * bfd-in.h (coff_comdat_info): Here.
6362         (bfd_coff_get_comdat_section): New.
6363         * coffgen.c (bfd_coff_get_comdat_section): Likewise.
6364         * libcoff-in.h (coff_section_tdata): Add comdat.
6365         * coffcode.h (handle_COMDAT): Updated.
6366         * cofflink.c (coff_link_add_symbols): Likewise.
6367         * ecoff.c (bfd_debug_section): Likewise.
6369         * targets.c (bfd_target): Add _section_already_linked.
6370         (BFD_JUMP_TABLE_LINK): Updated.
6372         * bfd-in2.h: Regenerated.
6373         * libbfd.h: Likewise.
6374         * libcoff.h: Likewise.
6376 2003-07-21  Paul Brook  <paul@codesourcery.com>
6378         * elflink.c (elf_get_linked_section_vma, compare_link_order,
6379         elf_fixup_link_order): New functions.
6380         (bfd_elf_final_link): Call elf_fixup_link_order.
6382 2004-07-21  Alexandre Oliva  <aoliva@redhat.com>
6384         * elf-bfd.h (ELF_COMMON_DEF_P): New.
6385         * elflink.c (_bfd_elf_symbol_refs_local_p): Use it to handle
6386         common definitions.
6387         * elf-m10300.c: Use SYMBOL_REFERENCES_LOCAL instead of
6388         _bfd_elf_symbol_refs_local_p.
6389         * elf32-frv.c (FRVFDPIC_SYM_LOCAL): Remove hack for common
6390         symbols.
6392 2004-07-19  H.J. Lu  <hongjiu.lu@intel.com>
6394         * bfd-in.h (dynamic_lib_link_class): Add DYN_NO_ADD_NEEDED and
6395         DYN_NO_NEEDED.
6396         (bfd_elf_get_dyn_lib_class): New prototype.
6397         * elf.c (bfd_elf_get_dyn_lib_class): New function.
6399         * elflink.c (elf_link_add_object_symbols): Check DYN_AS_NEEDED,
6400         DYN_DT_NEEDED and DYN_NO_NEEDED bits to see if a DT_NEEDED
6401         entry is needed. Issue an error if a DT_NEEDED entry is needed
6402         for a file marked DYN_NO_NEEDED.
6403         (elf_link_check_versioned_symbol): Check the DYN_DT_NEEDED bit
6404         for DT_NEEDED tags.
6406         * bfd-in2.h: Regenerated.
6408 2004-07-14  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
6410         * elflink.c (elf_section_complain_discarded): Don't complain in
6411         .PARISC.unwind.
6413 2004-07-10  James E Wilson  <wilson@specifixinc.com>
6415         * elfxx-ia64.c (elfNN_ia64_relax_ldxmov): Remove abfd parameter.
6416         (elfNN_ia64_install_value, elfNN_ia64_relax_brl): Likewise.
6417         (elfNN_ia64_relax_section, elfNN_ia64_relocate_section,
6418         elfNN_ia64_finish_dynamic_symbol, elfNN_ia64_finish_dynamic_sections):
6419         Fix callers.
6420         (elfNN_ia64_relax_brl): Change bfd_get_64 to bfd_getl64.  Change
6421         bfd_put_64 to bfd_putl64.
6422         (elfNN_ia64_relax_ldxmov, elfNN_ia64_install_value): Likewise.
6424 2004-07-09  H.J. Lu  <hongjiu.lu@intel.com>
6426         PR 240
6427         * elfxx-ia64.c (elfNN_ia64_relax_section): Only warn br in
6428         .init/.fini sections when trying to relax it.
6430 2004-07-09  Jie Zhang  <zhangjie@magima.com.cn>
6432         * elf.c (assign_file_positions_for_segments): Make sure the
6433         .dynamic section is the first section in the PT_DYNAMIC segment.
6435 2004-07-09  Nick Clifton  <nickc@redhat.com>
6437         * config.bfd: Change sh-sybmian-elf to sh-*-symbianelf.
6438         * elf32-sh-symbian.c: Rename the sh_find_elf_flags and
6439         sh_elf_get_flags_from_mach functions so that they do not conflict
6440         when this target is built with other sh-elf targets.
6441         * elf32-sh.c (sh_elf_get_flags_from_mach): Remove bogus
6442         suppression of this function.
6443         (sh_elf_find_flags): Likewise.
6445 2004-07-07  Tomer Levi  <Tomer.Levi@nsc.com>
6447         * Makefile.am (ALL_MACHINES): Add cpu-crx.lo.
6448         (ALL_MACHINES_CFILES): Add cpu-crx.c.
6449         (BFD32_BACKENDS): Add elf32-crx.lo.
6450         (BFD32_BACKENDS_CFILES): Add elf32-crx.c.
6451         (cpu-crx.lo): New target.
6452         (elf32-crx.lo): New target.
6453         * Makefile.in: Regenerate.
6454         * archures.c (bfd_architecture): Add bfd_{arch,mach}_crx.
6455         (bfd_archures_list): Add bfd_crx_arch.
6456         * bfd-in2.h: Regenerate.
6457         * config.bfd: Handle crx-*-elf*, crx*.
6458         * configure.in: Handle bfd_elf32_crx_vec.
6459         * configure: Regenerate.
6460         * cpu-crx.c: New file.
6461         * elf32-crx.c: Likewise.
6462         * libbfd.h: Regenerate.
6463         * reloc.c: Add BFD_RELOC_CRX_REL4, BFD_RELOC_CRX_REL8,
6464         BFD_RELOC_CRX_REL8_CMP, BFD_RELOC_CRX_REL16, BFD_RELOC_CRX_REL24,
6465         BFD_RELOC_CRX_REL32, BFD_RELOC_CRX_REGREL12, BFD_RELOC_CRX_REGREL22,
6466         BFD_RELOC_CRX_REGREL28, BFD_RELOC_CRX_REGREL32, BFD_RELOC_CRX_ABS16,
6467         BFD_RELOC_CRX_ABS32, BFD_RELOC_CRX_NUM8, BFD_RELOC_CRX_NUM16,
6468         BFD_RELOC_CRX_NUM32, BFD_RELOC_CRX_IMM16 and BFD_RELOC_CRX_IMM32
6469         * targets.c (bfd_elf32_crx_vec): Declare.
6470         (bfd_target_vector): Add bfd_elf32_crx_vec.
6472 2004-07-06  Nick Clifton  <nickc@redhat.com>
6474         * config.bfd: Add sh-symbian-elf target.
6475         * configure.in: Add bfd_elf32_shl_symbian_vec.
6476         * configure: Regenerate.
6477         * elf-bfd.h (struct elf_backend_data): Add new field
6478         'check_directives'.
6479         * elflink.c (elf_link_add_object_symbols): Invoke the
6480         check_directives function, if defined.
6481         * elfxx-target.h: Provide a default, NULL definition for
6482         check_directives.
6483         * targets.c: Add bfd_elf32_shl_symbian_vec.
6484         * elf32-sh.c (sh_elf_swap_insns): Protect against unnecessary
6485         definition.
6486         (elf32_shlin_grok_prstatus, elf32_shlib_grok_psinfo,
6487         * sh_elf_get_flags_from_mach, sh_elf_find_flags): Likewise.
6488         (TARGET_BIG_SYM, TARGET_LITTLE_SYM): Only define if they have
6489         not already been defined.
6490         * elf32-sh64.c: Use SH_TARGET_ALREADY_DEFINED.
6491         * sh-symbian.c: New file.  Provide functions to support the
6492         * sh-symbian-elf target.
6493         * Makefile.am: Add elf32-sh-symbian.c
6494         * Makefile.in: Regenerate.
6496 2004-07-05  Andrew Stubbs <andrew.stubbs@superh.com>
6498         * elf32-sh.c: Include ../opcodes/sh-opc.h.
6499         * Makefile.am: Ran make dep-am.
6500         * Makefile.in: Ran make dep-in.
6502 2004-07-03  Aaron W. LaFramboise  <aaron98wiridge9@aaronwl.com>
6504         * cofflink.c (_bfd_coff_generic_relocate_section): Resolve PE weak
6505         externals properly.
6507 2004-07-02  Martin Schwidefsky  <schwidefsky@de.ibm.com>
6509         * config.bfd: Add want64 to configuration target s390-*-linux*.
6511 2004-07-01  H.J. Lu  <hongjiu.lu@intel.com>
6513         * bfd.c (bfd_get_section_ident): New.
6515         * elflink.c (elf_link_read_relocs_from_section): Call
6516         bfd_get_section_ident to identify the section when reporting
6517         error.
6518         (_bfd_elf_link_output_relocs): Likewise.
6519         (elf_link_output_extsym): Likewise.
6520         (elf_link_input_bfd): Likewise.
6521         (bfd_elf_gc_record_vtinherit): Likewise.
6523         * bfd-in2.h: Regenerated.
6525 2004-07-01  Jie Zhang  <zhangjie@magima.com.cn>
6526             Nick Clifton  <nickc@redhat.com>
6528         PR 204
6529         * elfxx-mips.c (_bfd_mips_elf_final_link): Pass the correct number
6530         of section symbols to mips_elf_sort_hash_table ().
6532 2004-07-01  Alan Modra  <amodra@bigpond.net.au>
6534         * elflink.c (elf_section_ignore_discarded_relocs): Revert last
6535         change.  Comment.
6536         (elf_section_complain_discarded): New function.  Handle
6537         .gcc_except_table too.
6538         (elf_link_input_bfd): Rewrite handling of relocs against symbols
6539         in discarded sections.
6540         * elf-bfd.h (elf_discarded_section): Protect macro arg.
6542 2004-06-30  James E Wilson  <wilson@specifixinc.com>
6544         * elfxx-ia64.c (elfNN_ia64_check_relocs): New local pltoff.  Initialize
6545         to NULL.  Call get_pltoff if NULL and NEED_PLTOFF is true.
6547 2004-06-30  H.J. Lu  <hongjiu.lu@intel.com>
6549         PR 233
6550         * elflink.c (elf_link_input_bfd): Issue an error for non-debug
6551         local references to discarded sections and report their
6552         locations.
6554 2004-06-30  Alan Modra  <amodra@bigpond.net.au>
6556         * elflink.c (elf_section_ignore_discarded_relocs): Don't test
6557         sec_info_type, test section name instead.
6559 2004-06-29  H.J. Lu  <hongjiu.lu@intel.com>
6561         PR 240
6562         * elfxx-ia64.c (elfNN_ia64_relax_section): Don't relax branch
6563         in .init/.fini sections.
6565 2004-06-29  Bob Wilson  <bob.wilson@acm.org>
6567         * elf32-xtensa.c (elf_xtensa_relocate_section): Use
6568         bfd_get_section_limit.
6570 2004-06-29  Bob Wilson  <bob.wilson@acm.org>
6572         * elf32-xtensa.c (elf_xtensa_combine_prop_entries): Don't change the
6573         output section size.
6575 2004-06-29  Alan Modra  <amodra@bigpond.net.au>
6577         * elf64-mmix.c (mmix_set_relaxable_size): Save original size in
6578         rawsize.
6579         (mmix_elf_perform_relocation): Adjust for above change.
6580         (mmix_elf_relocate_section): Likewise.
6581         (mmix_elf_relax_section): Likewise.  Use output_section->rawsize.
6582         (mmix_elf_get_section_contents): Delete.
6583         (bfd_elf64_get_section_contents): Delete.
6584         (mmix_elf_relocate_section): Zero stub area.
6585         * linker.c (default_indirect_link_order): Alloc max of section size
6586         and rawsize.
6587         * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
6588         * section.c (bfd_malloc_and_get_section): Likewise.
6589         (struct bfd_section): Update rawsize comment.
6590         * bfd-in2.h: Regenerate.
6592         * reloc16.c (bfd_coff_reloc16_relax_section): Set rawsize.
6594 2004-06-29  Alan Modra  <amodra@bigpond.net.au>
6596         * bfd-in.h (bfd_get_section_limit): Define.
6597         * reloc.c (bfd_perform_relocation, bfd_install_relocation)
6598         (_bfd_final_link_relocate): Use bfd_get_section_limit.
6599         * aout-tic30.c (tic30_aout_final_link_relocate): Likewise.
6600         * coff-arm.c (coff_arm_relocate_section): Likewise.
6601         * coff-mips.c (mips_refhi_reloc, mips_gprel_reloc): Likewise.
6602         * cpu-ns32k.c (do_ns32k_reloc): Likewise.
6603         (bfd_ns32k_final_link_relocate): Likewise.
6604         * elf32-d30v.c (bfd_elf_d30v_reloc, bfd_elf_d30v_reloc_21): Likwise.
6605         * elf32-dlx.c (_bfd_dlx_elf_hi16_reloc): Likewise.
6606         * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc)
6607         (i860_howto_highadj_reloc, i860_howto_splitn_reloc): Likewise.
6608         * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc, m32r_elf_hi16_reloc)
6609         (m32r_elf_generic_reloc, m32r_elf_relocate_section): Likewise.
6610         * elf32-m68hc1x.c (m68hc11_elf_special_reloc): Likewise.
6611         * elf32-mips.c (gprel32_with_gp, mips16_gprel_reloc): Likewise.
6612         * elf32-or32.c (or32_elf_consth_reloc): Likewise.
6613         * elf32-ppc.c (ppc_elf_addr16_ha_reloc): Likewise.
6614         * elf32-s390.c (s390_elf_ldisp_reloc): Likewise.
6615         * elf32-sh.c (sh_elf_reloc_loop): Likewise.
6616         * elf32-sparc.c (sparc_elf_wdisp16_reloc): Likewise.
6617         (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc): Likwise.
6618         * elf32-v850.c (v850_elf_reloc): Likewise.
6619         * elf32-xstormy16.c (xstormy16_elf_24_reloc): Likewise.
6620         * elf32-xtensa.c (bfd_elf_xtensa_reloc): Likewise.
6621         * elf64-alpha.c (elf64_alpha_reloc_gpdisp): Likewise.
6622         * elf64-mips.c (mips_elf64_gprel32_reloc)
6623         (mips16_gprel_reloc): Likewise.
6624         * elf64-mmix.c (mmix_elf_reloc): Likewise.
6625         * elf64-s390.c (s390_elf_ldisp_reloc): Likewise.
6626         * elf64-sparc.c (init_insn_reloc): Likewise.
6627         * elfn32-mips.c (gprel32_with_gp, mips16_gprel_reloc): Likewise.
6628         * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp)
6629         (_bfd_mips_elf_hi16_reloc, _bfd_mips_elf_lo16_reloc)
6630         (_bfd_mips_elf_generic_reloc): Likewise.
6631         * bfd-in2.h: Regenerate.
6633 2004-06-28  Alan Modra  <amodra@bigpond.net.au>
6635         * bfd-in.h (struct stab_info): Move from stabs.c.
6636         * stabs.c (struct stab_link_includes_table): Delete.
6637         (stab_link_includes_lookup): Delete.
6638         (_bfd_write_section_stabs, _bfd_write_stab_strings): Remove one
6639         level of indirection from sinfo parm.
6640         (_bfd_link_section_stabs): Likewise.  Set SEC_LINKER_CREATED on
6641         stabstr section.  Adjust hash table accesses.
6642         * coff-ppc.c (ppc_bfd_coff_final_link): Do include rawsize in contents
6643         alloc.  Adjust stab_info test.
6644         * cofflink.c (_bfd_coff_link_hash_table_init): Clear stab_info.
6645         (_bfd_coff_final_link): Adjust stab_info test.
6646         (_bfd_coff_link_input_bfd): Ignore SEC_LINKER_CREATED sections.
6647         * elf-bfd.h (struct elf_link_hash_table): Include struct stab_info
6648         in place.
6649         * libcoff-in.h (struct coff_link_hash_table): Likewise.
6650         * elf.c (_bfd_elf_link_hash_table_init): Clear stab_info.
6651         * elflink.c (bfd_elf_final_link): Don't attempt to link linker created
6652         stabstr section.  Adjust stab_info test.
6653         * libbfd-in.h (_bfd_link_section_stabs, _bfd_write_section_stabs)
6654         (_bfd_write_stab_strings): Adjust prototypes.
6655         * libbfd.h: Regenerate.
6656         * libcoff.h: Regenerate.
6657         * bfd-in2.h: Regenerate.
6659 2004-06-27  Mark Kettenis  <kettenis@gnu.org>
6661         From Miod Vallat <miod@online.fr>:
6662         * aoutx.h (NAME(aout,machine_type)): Handle bfd_arch_m88k.
6664 2004-06-26  Alexandre Oliva  <aoliva@redhat.com>
6666         * elf-m10300.c (struct elf_mn10300_pcrel_relocs_copied): Delete.
6667         (struct elf32_mn10300_link_hash_entry): Remove
6668         pcrel_relocs_copied.
6669         (mn10300_elf_check_relocs): Only reserve dynamic relocations for
6670         R_MN10300_32.  Don't adjust pcrel_relocs_copied.
6671         (mn10300_elf_final_link_relocate): Fail for direct, pc-relative
6672         and gotoff relocations if the symbol doesn't bind locally.  Use
6673         _bfd_elf_symbol_refs_local_p to test.  Don't create dynamic
6674         relocation for PCREL32.
6675         (mn10300_elf_relocate_section): Use _bfd_elf_symbol_refs_local_p
6676         to test whether a symbol binds locally.
6677         (elf32_mn10300_link_hash_newfunc): Don't initialize
6678         pcrel_relocs_copied.
6679         (_bfd_mn10300_elf_discard_copies): Delete.
6680         (_bfd_mn10300_elf_size_dynamic_sections): Don't call it.
6682 2004-06-26  Mark Kettenis  <kettenis@gnu.org>
6684         * config.bfd: Replace m88k-*-openbsd* with m88*-*-openbsd*.
6686 2004-06-25  Joel Brobecker  <brobecker@gnat.com>
6688         * som.c (som_set_reloc_info): Correct small typo.
6690 2004-06-25  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.com>
6692         * elf32-m32r.c (m32r_elf_howto_table): Support R_M32R_GOTOFF.
6693         (m32r_elf_relocate_section): Changed for R_M32R_GOTOFF.
6694         (m32r_elf_gcsweep_hook): Likewise.
6695         (m32r_elf_check_relocs): Likewise.
6696         (m32r_elf_howto_table): Added R_M32R_GOTOFF_HI_ULO,
6697         R_M32R_GOTOFF_HI_SLO and R_M32R_GOTOFF_LO.
6698         * reloc.c: Added BFD_RELOC_M32R_GOTOFF_HI_ULO,
6699         BFD_RELOC_M32R_GOTOFF_HI_SLO and BFD_RELOC_M32R_GOTOFF_LO.
6700         * bfd-in2.h: Regenerated.
6701         * libbfd.h: Regenerated.
6703 2004-06-24  H.J. Lu  <hongjiu.lu@intel.com>
6705         * elf64-x86-64.c (elf64_x86_64_check_relocs): Warn overflow
6706         relocation symbol.
6707         (elf64_x86_64_relocate_section): Issue an error for
6708         R_X86_64_PC8, R_X86_64_PC16 and R_X86_64_PC32 relocations
6709         against global symbols when building shared library.
6711 2004-06-24  Alan Modra  <amodra@bigpond.net.au>
6713         * section.c (struct sec): Rename "_cooked_size" to "size".
6714         Rename "_raw_size" to "rawsize".
6715         (STD_SECTION): Adjust comments.
6716         (bfd_set_section_size, bfd_get_section_contents): Use size.
6717         (bfd_malloc_and_get_section): New function.
6718         * bfd-in.h (bfd_section_size, bfd_get_section_size): Use size.
6719         * coff-sh.c (sh_relax_section): Alloc coff_section_data struct early.
6720         Correctly free reloc and contents memory.
6721         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Delete FIXME
6722         and fake CIE now that we can shink section size to zero.
6723         (_bfd_elf_write_section_eh_frame): Likewise..
6724         * elf32-ppc.c (ppc_elf_relax_section): Delay reading section contents.
6725         * elf-m10300.c (mn10300_elf_final_link_relocate): Don't use
6726         _bfd_stab_section_offset.  Use _bfd_elf_section_offset.
6727         * stabs.c (_bfd_stab_section_offset_): Remove unused args and
6728         unneeded indirection.
6729         * elf.c (_bfd_elf_section_offset): .. and update call.
6730         * libbfd-in.h (_bfd_stab_section_offset): Update prototype.
6731         * libbfd.h: Regenerate.
6732         * bfd-in2.h: Regenerate.
6734         Replace occurrences of "_raw_size" and "_cooked_size" in most places
6735         with "size".  Set new "rawsize" for stabs, eh_frame, and SEC_MERGE
6736         sections.  Use "rawsize", if non-zero, for bfd_get_section_contents
6737         calls if the section might be a stabs, eh_frame, or SEC_MERGE section.
6738         Similarly use "rawsize", if non-zero, in reloc functions to validate
6739         reloc addresses.  Use new bfd_malloc_and_get_section in most places
6740         where bfd_get_section_contents was called.  Expand all occurrences of
6741         bfd_section_size and bfd_get_section_size.  Rename "raw_size" var in
6742         grok_prstatus and similar functions to "size".
6743         * aix386-core.c (aix386_core_file_p): ..
6744         * aix5ppc-core.c (xcoff64_core_p): ..
6745         * aout-adobe.c (aout_adobe_callback, aout_adobe_write_object_contents,
6746         aout_adobe_set_section_contents): ..
6747         * aout-target.h (callback): ..
6748         * aout-tic30.c (tic30_aout_callback, tic30_aout_final_link_relocate,
6749         MY_bfd_final_link): ..
6750         * aoutf1.h (sunos4_core_file_p): ..
6751         * aoutx.h (some_aout_object_p, adjust_o_magic, adjust_z_magic,
6752         adjust_n_magic, adjust_sizes_and_vmas, translate_from_native_sym_flags,
6753         final_link, aout_link_input_section): ..
6754         * binary.c (binary_object_p, binary_canonicalize_symtab,
6755         binary_set_section_contents): ..
6756         * bout.c (b_out_callback, b_out_write_object_contents,
6757         b_out_set_section_contents, b_out_bfd_relax_section,
6758         b_out_bfd_get_relocated_section_contents): ..
6759         * cisco-core.c (cisco_core_file_validate): ..
6760         * coff-alpha.c (alpha_ecoff_object_p,
6761         alpha_ecoff_get_relocated_section_conten, alpha_relocate_section): ..
6762         * coff-arm.c (coff_arm_relocate_section,
6763         bfd_arm_allocate_interworking_sections): ..
6764         * coff-h8300.c (h8300_reloc16_extra_cases,
6765         h8300_bfd_link_add_symbols): ..
6766         * coff-mips.c (mips_refhi_reloc, mips_gprel_reloc): ..
6767         * coff-ppc.c (coff_ppc_relocate_section, ppc_allocate_toc_section,
6768         ppc_bfd_coff_final_link): ..
6769         * coff-rs6000.c (xcoff_reloc_type_br, xcoff_ppc_relocate_section): ..
6770         * coff-sh.c (sh_relax_section, sh_relax_delete_bytes,
6771         sh_align_loads, sh_coff_get_relocated_section_contents): ..
6772         * coff64-rs6000.c (xcoff64_write_object_contents,
6773         xcoff64_reloc_type_br, xcoff64_ppc_relocate_section): ..
6774         * coffcode.h (coff_compute_section_file_positions,
6775         coff_write_object_contents): ..
6776         * coffgen.c (make_a_section_from_file, coff_write_symbols,
6777         coff_section_symbol, build_debug_section): ..
6778         * cofflink.c (coff_link_add_symbols, _bfd_coff_final_link,
6779         process_embedded_commands, _bfd_coff_link_input_bfd,
6780         _bfd_coff_write_global_sym): ..
6781         * cpu-arm.c (bfd_arm_update_notes, bfd_arm_get_mach_from_notes): ..
6782         * cpu-ns32k.c (do_ns32k_reloc, _bfd_ns32k_final_link_relocate): ..
6783         * dwarf1.c (parse_line_table, _bfd_dwarf1_find_nearest_line): ..
6784         * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
6785         _bfd_dwarf2_find_nearest_line): ..
6786         * ecoff.c (bfd_debug_section, ecoff_set_symbol_info,
6787         ecoff_compute_section_file_positions,
6788         _bfd_ecoff_write_object_contents, ecoff_indirect_link_order): ..
6789         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame,
6790         _bfd_elf_discard_section_eh_frame_hdr,
6791         _bfd_elf_maybe_strip_eh_frame_hdr, _bfd_elf_eh_frame_section_offset,
6792         _bfd_elf_write_section_eh_frame,
6793         _bfd_elf_write_section_eh_frame_hdr): ..
6794         * elf-hppa.h (elf_hppa_sort_unwind): ..
6795         * elf-m10200.c (mn10200_elf_relax_section,
6796         mn10200_elf_relax_delete_bytes,
6797         mn10200_elf_get_relocated_section_contents): ..
6798         * elf-m10300.c (_bfd_mn10300_elf_create_got_section,
6799         mn10300_elf_check_relocs, mn10300_elf_relax_section,
6800         mn10300_elf_relax_delete_bytes,
6801         mn10300_elf_get_relocated_section_contents,
6802         _bfd_mn10300_elf_adjust_dynamic_symbol,
6803         _bfd_mn10300_elf_discard_copies,
6804         _bfd_mn10300_elf_size_dynamic_sections,
6805         _bfd_mn10300_elf_finish_dynamic_sections): ..
6806         * elf.c (_bfd_elf_print_private_bfd_data, bfd_elf_get_bfd_needed_list,
6807         _bfd_elf_make_section_from_phdr, elf_fake_sections,
6808         bfd_elf_set_group_contents, map_sections_to_segments,
6809         elf_sort_sections, assign_file_positions_for_segments,
6810         SECTION_SIZE, copy_private_bfd_data,
6811         _bfd_elf_get_dynamic_reloc_upper_bound,
6812         _bfd_elf_canonicalize_dynamic_reloc, elfcore_maybe_make_sect,
6813         _bfd_elfcore_make_pseudosection, elfcore_grok_prstatus,
6814         elfcore_grok_lwpstatus, elfcore_grok_win32pstatus,
6815         elfcore_grok_note, elfcore_grok_nto_status, elfcore_grok_nto_gregs,
6816         _bfd_elf_rel_local_sym, _bfd_elf_get_synthetic_symtab): ..
6817         * elf32-arm.h (bfd_elf32_arm_allocate_interworking_sect,
6818         bfd_elf32_arm_process_before_allocation,
6819         elf32_arm_adjust_dynamic_symbol, allocate_dynrelocs,
6820         elf32_arm_size_dynamic_sections, elf32_arm_finish_dynamic_sections,
6821         elf32_arm_write_section): ..
6822         * elf32-cris.c (cris_elf_grok_prstatus,
6823         elf_cris_finish_dynamic_sections, cris_elf_gc_sweep_hook,
6824         elf_cris_adjust_gotplt_to_got, elf_cris_adjust_dynamic_symbol,
6825         cris_elf_check_relocs, elf_cris_size_dynamic_sections,
6826         elf_cris_discard_excess_dso_dynamics,
6827         elf_cris_discard_excess_program_dynamics): ..
6828         * elf32-d30v.c (bfd_elf_d30v_reloc, bfd_elf_d30v_reloc_21): ..
6829         * elf32-dlx.c (_bfd_dlx_elf_hi16_reloc): ..
6830         * elf32-frv.c (_frvfdpic_add_dyn_reloc, _frvfdpic_add_rofixup,
6831         _frv_create_got_section, _frvfdpic_assign_plt_entries,
6832         elf32_frvfdpic_size_dynamic_sections,
6833         elf32_frvfdpic_modify_segment_map,
6834         elf32_frvfdpic_finish_dynamic_sections): ..
6835         * elf32-h8300.c (elf32_h8_relax_section, elf32_h8_relax_delete_bytes,
6836         elf32_h8_get_relocated_section_contents): ..
6837         * elf32-hppa.c (hppa_build_one_stub, hppa_size_one_stub,
6838         elf32_hppa_adjust_dynamic_symbol, allocate_plt_static,
6839         allocate_dynrelocs, elf32_hppa_size_dynamic_sections, group_sections,
6840         elf32_hppa_size_stubs, elf32_hppa_set_gp, elf32_hppa_build_stubs,
6841         elf32_hppa_finish_dynamic_sections): ..
6842         * elf32-i370.c (i370_elf_adjust_dynamic_symbol,
6843         i370_elf_size_dynamic_sections, i370_elf_check_relocs,
6844         i370_elf_finish_dynamic_sections): ..
6845         * elf32-i386.c (elf_i386_grok_prstatus, elf_i386_adjust_dynamic_symbol,
6846         allocate_dynrelocs, elf_i386_size_dynamic_sections,
6847         elf_i386_relocate_section, elf_i386_finish_dynamic_sections): ..
6848         * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc,
6849         i860_howto_highadj_reloc, i860_howto_splitn_reloc): ..
6850         * elf32-ip2k.c (ip2k_is_switch_table_128,
6851         ip2k_relax_switch_table_128, ip2k_is_switch_table_256,
6852         ip2k_relax_switch_table_256, ip2k_elf_relax_section,
6853         adjust_all_relocations, ip2k_elf_relax_delete_bytes): ..
6854         * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc, m32r_elf_hi16_reloc,
6855         m32r_elf_generic_reloc, m32r_elf_adjust_dynamic_symbol,
6856         allocate_dynrelocs, m32r_elf_size_dynamic_sections,
6857         m32r_elf_relocate_section, m32r_elf_finish_dynamic_sections,
6858         m32r_elf_relax_section, m32r_elf_relax_delete_bytes,
6859         m32r_elf_get_relocated_section_contents): ..
6860         * elf32-m68hc11.c (m68hc11_elf_build_one_stub,
6861         m68hc11_elf_size_one_stub, m68hc11_elf_relax_section,
6862         m68hc11_elf_relax_delete_bytes): ..
6863         * elf32-m68hc12.c (m68hc12_elf_build_one_stub,
6864         m68hc12_elf_size_one_stub): ..
6865         * elf32-m68hc1x.c (elf32_m68hc11_size_stubs,
6866         elf32_m68hc11_build_stubs, m68hc11_elf_special_reloc): ..
6867         * elf32-m68k.c (elf_m68k_check_relocs, elf_m68k_gc_sweep_hook,
6868         elf_m68k_adjust_dynamic_symbol, elf_m68k_size_dynamic_sections,
6869         elf_m68k_discard_copies, elf_m68k_finish_dynamic_sections): ..
6870         * elf32-mips.c (gprel32_with_gp, mips16_gprel_reloc,
6871         elf32_mips_grok_prstatus): ..
6872         * elf32-or32.c (or32_elf_consth_reloc): ..
6873         * elf32-ppc.c (ppc_elf_relax_section, ppc_elf_addr16_ha_reloc,
6874         elf_create_pointer_linker_section, ppc_elf_create_linker_section,
6875         ppc_elf_additional_program_headers, ppc_elf_adjust_dynamic_symbol,
6876         allocate_dynrelocs, ppc_elf_size_dynamic_sections,
6877         ppc_elf_finish_dynamic_sections, ppc_elf_grok_prstatus,
6878         ppc_elf_final_write_processing): ..
6879         * elf32-s390.c (s390_elf_ldisp_reloc, elf_s390_adjust_dynamic_symbol,
6880         allocate_dynrelocs, elf_s390_size_dynamic_sections,
6881         elf_s390_finish_dynamic_sections, elf_s390_grok_prstatus): ..
6882         * elf32-sh.c (sh_elf_reloc_loop, sh_elf_relax_section,
6883         sh_elf_relax_delete_bytes, sh_elf_align_loads,
6884         sh_elf_adjust_dynamic_symbol, allocate_dynrelocs,
6885         sh_elf_size_dynamic_sections, sh_elf_get_relocated_section_contents,
6886         sh_elf_finish_dynamic_sections, elf32_shlin_grok_prstatus): ..
6887         * elf32-sh64-com.c (sh64_address_in_cranges,
6888         sh64_get_contents_type): ..
6889         * elf32-sh64.c (sh64_find_section_for_address,
6890         sh64_elf_final_write_processing): ..
6891         * elf32-sparc.c (sparc_elf_wdisp16_reloc, sparc_elf_hix22_reloc,
6892         sparc_elf_lox10_reloc, elf32_sparc_adjust_dynamic_symbol,
6893         allocate_dynrelocs, elf32_sparc_size_dynamic_sections,
6894         elf32_sparc_relocate_section, elf32_sparc_finish_dynamic_sections): ..
6895         * elf32-v850.c (v850_elf_reloc, v850_elf_relax_section): ..
6896         * elf32-vax.c (elf_vax_check_relocs, elf_vax_adjust_dynamic_symbol,
6897         elf_vax_size_dynamic_sections, elf_vax_discard_copies,
6898         elf_vax_instantiate_got_entries, elf_vax_relocate_section,
6899         elf_vax_finish_dynamic_sections): ..
6900         * elf32-xstormy16.c (xstormy16_elf_24_reloc,
6901         xstormy16_elf_check_relocs, xstormy16_relax_plt_check,
6902         xstormy16_elf_relax_section, xstormy16_elf_always_size_sections,
6903         xstormy16_elf_finish_dynamic_sections): ..
6904         * elf32-xtensa.c (xtensa_read_table_entries,
6905         elf_xtensa_allocate_got_size, elf_xtensa_allocate_local_got_size,
6906         elf_xtensa_size_dynamic_sections, elf_xtensa_do_reloc,
6907         bfd_elf_xtensa_reloc, elf_xtensa_relocate_section,
6908         elf_xtensa_combine_prop_entries, elf_xtensa_finish_dynamic_sections,
6909         elf_xtensa_discard_info_for_section, elf_xtensa_grok_prstatus,
6910         get_relocation_opcode, retrieve_contents, find_relaxable_sections,
6911         collect_source_relocs, is_resolvable_asm_expansion, remove_literals,
6912         relax_section, shrink_dynamic_reloc_sections, relax_property_section,
6913         xtensa_callback_required_dependence): ..
6914         * elf64-alpha.c (elf64_alpha_reloc_gpdisp, elf64_alpha_relax_section,
6915         elf64_alpha_check_relocs, elf64_alpha_adjust_dynamic_symbol,
6916         elf64_alpha_calc_got_offsets_for_symbol, elf64_alpha_calc_got_offsets,
6917         elf64_alpha_size_plt_section, elf64_alpha_size_plt_section_1,
6918         elf64_alpha_always_size_sections, elf64_alpha_calc_dynrel_sizes,
6919         elf64_alpha_size_rela_got_section, elf64_alpha_size_rela_got_1,
6920         elf64_alpha_size_dynamic_sections, elf64_alpha_emit_dynrel,
6921         elf64_alpha_finish_dynamic_sections, elf64_alpha_final_link): ..
6922         * elf64-hppa.c (allocate_dynrel_entries,
6923         elf64_hppa_size_dynamic_sections,
6924         elf64_hppa_finish_dynamic_sections): ..
6925         * elf64-mips.c (mips_elf64_gprel32_reloc, mips16_gprel_reloc,
6926         mips_elf64_canonicalize_dynamic_reloc, mips_elf64_slurp_reloc_table,
6927         elf64_mips_grok_prstatus): ..
6928         * elf64-mmix.c (mmix_elf_perform_relocation, mmix_elf_reloc,
6929         mmix_elf_relocate_section, mmix_elf_final_link,
6930         mmix_set_relaxable_size, _bfd_mmix_after_linker_allocation,
6931         mmix_elf_relax_section, mmix_elf_get_section_contents): ..
6932         * elf64-ppc.c (ppc64_elf_object_p, ppc64_elf_grok_prstatus,
6933         ppc64_elf_check_relocs, ppc64_elf_func_desc_adjust,
6934         ppc64_elf_adjust_dynamic_symbol, ppc64_elf_edit_opd,
6935         allocate_dynrelocs, ppc64_elf_size_dynamic_sections,
6936         ppc_build_one_stub, ppc_size_one_stub, ppc64_elf_next_toc_section,
6937         toc_adjusting_stub_needed, group_sections, ppc64_elf_size_stubs,
6938         ppc64_elf_build_stubs, ppc64_elf_relocate_section,
6939         ppc64_elf_finish_dynamic_sections): ..
6940         * elf64-s390.c (s390_elf_ldisp_reloc, elf_s390_adjust_dynamic_symbol,
6941         allocate_dynrelocs, elf_s390_size_dynamic_sections,
6942         elf_s390_finish_dynamic_sections): ..
6943         * elf64-sh64.c (sh_elf64_get_relocated_section_contents,
6944         sh_elf64_check_relocs, sh64_elf64_adjust_dynamic_symbol,
6945         sh64_elf64_discard_copies, sh64_elf64_size_dynamic_sections,
6946         sh64_elf64_finish_dynamic_sections): ..
6947         * elf64-sparc.c (sparc64_elf_slurp_reloc_table, init_insn_reloc,
6948         sparc64_elf_check_relocs, sparc64_elf_adjust_dynamic_symbol,
6949         sparc64_elf_size_dynamic_sections, sparc64_elf_relocate_section,
6950         sparc64_elf_finish_dynamic_symbol,
6951         sparc64_elf_finish_dynamic_sections): ..
6952         * elf64-x86-64.c (elf64_x86_64_grok_prstatus,
6953         elf64_x86_64_adjust_dynamic_symbol, allocate_dynrelocs,
6954         elf64_x86_64_size_dynamic_sections, elf64_x86_64_relocate_section,
6955         elf64_x86_64_finish_dynamic_sections): ..
6956         * elfarm-nabi.c (elf32_arm_nabi_grok_prstatus): ..
6957         * elfcode.h (elf_slurp_reloc_table): ..
6958         * elflink.c (_bfd_elf_create_got_section, elf_add_dt_needed_tag,
6959         elf_finalize_dynstr, elf_link_add_object_symbols,
6960         bfd_elf_size_dynamic_sections, elf_link_sort_relocs,
6961         elf_link_input_bfd, bfd_elf_final_link, bfd_elf_discard_info): ..
6962         * elfn32-mips.c (gprel32_with_gp, mips16_gprel_reloc,
6963         elf32_mips_grok_prstatus): ..
6964         * elfxx-ia64.c (elfNN_ia64_relax_section, allocate_dynrel_entries,
6965         elfNN_ia64_size_dynamic_sections, elfNN_ia64_install_dyn_reloc,
6966         elfNN_ia64_choose_gp, elfNN_ia64_final_link,
6967         elfNN_ia64_finish_dynamic_sections): ..
6968         * elfxx-mips.c (mips_elf_create_procedure_table,
6969         mips_elf_check_mips16_stubs, _bfd_mips_elf_gprel16_with_gp,
6970         _bfd_mips_elf_hi16_reloc, _bfd_mips_elf_generic_reloc,
6971         mips_elf_global_got_index, mips_elf_multi_got,
6972         mips_elf_create_compact_rel_section, mips_elf_calculate_relocation,
6973         mips_elf_allocate_dynamic_relocations,
6974         mips_elf_create_dynamic_relocation, _bfd_mips_elf_fake_sections,
6975         _bfd_mips_relax_section, _bfd_mips_elf_adjust_dynamic_symbol,
6976         _bfd_mips_elf_always_size_sections,
6977         _bfd_mips_elf_size_dynamic_sections,
6978         _bfd_mips_elf_finish_dynamic_symbol,
6979         _bfd_mips_elf_finish_dynamic_sections,
6980         _bfd_mips_elf_modify_segment_map, _bfd_mips_elf_discard_info,
6981         _bfd_mips_elf_write_section, _bfd_mips_elf_set_section_contents,
6982         _bfd_elf_mips_get_relocated_section_contents,
6983         _bfd_mips_elf_final_link, _bfd_mips_elf_merge_private_bfd_data): ..
6984         * hp300hpux.c (callback): ..
6985         * hppabsd-core.c (make_bfd_asection): ..
6986         * hpux-core.c (make_bfd_asection): ..
6987         * i386linux.c (linux_link_create_dynamic_sections,
6988         bfd_i386linux_size_dynamic_sections, linux_finish_dynamic_link): ..
6989         * i386msdos.c (msdos_write_object_contents): ..
6990         * i386os9k.c (os9k_callback, os9k_write_object_contents,
6991         os9k_set_section_contents): ..
6992         * ieee.c (parse_expression, ieee_slurp_external_symbols,
6993         ieee_slurp_sections, ieee_slurp_debug, ieee_slurp_section_data,
6994         ieee_write_section_part, do_with_relocs, do_as_repeat,
6995         do_without_relocs, ieee_write_debug_part, init_for_output,
6996         ieee_set_section_contents): ..
6997         * ihex.c (ihex_scan, ihex_read_section, ihex_get_section_contents): ..
6998         * irix-core.c (do_sections, make_bfd_asection): ..
6999         * libaout.h (aout_section_merge_with_text_p): ..
7000         * libbfd.c (_bfd_generic_get_section_contents,
7001         _bfd_generic_get_section_contents_in_window): ..
7002         * linker.c (default_indirect_link_order): ..
7003         * lynx-core.c (make_bfd_asection): ..
7004         * m68klinux.c (linux_link_create_dynamic_sections,
7005         bfd_m68klinux_size_dynamic_sections, linux_finish_dynamic_link): ..
7006         * mach-o.c (bfd_mach_o_make_bfd_section,
7007         bfd_mach_o_scan_read_dylinker, bfd_mach_o_scan_read_dylib,
7008         bfd_mach_o_scan_read_thread, bfd_mach_o_scan_read_symtab,
7009         bfd_mach_o_scan_read_segment): ..
7010         * merge.c (_bfd_add_merge_section, record_section, merge_strings,
7011         _bfd_merge_sections): ..
7012         * mmo.c (mmo_find_sec_w_addr, mmo_get_spec_section, mmo_get_loc,
7013         mmo_map_set_sizes, mmo_canonicalize_symtab,
7014         mmo_internal_write_section, mmo_write_object_contents): ..
7015         * netbsd-core.c (netbsd_core_file_p): ..
7016         * nlm32-alpha.c (nlm_alpha_read_reloc, nlm_alpha_write_import,
7017         nlm_alpha_set_public_section): ..
7018         * nlm32-ppc.c (nlm_powerpc_read_reloc, nlm_powerpc_write_reloc): ..
7019         * nlm32-sparc.c (nlm_sparc_write_import): ..
7020         * nlmcode.h (add_bfd_section, nlm_swap_auxiliary_headers_in,
7021         nlm_compute_section_file_positions): ..
7022         * oasys.c (oasys_object_p, oasys_slurp_section_data,
7023         oasys_write_sections, oasys_write_data, oasys_set_section_contents): ..
7024         * opncls.c (get_debug_link_info): ..
7025         * osf-core.c (make_bfd_asection): ..
7026         * pdp11.c (some_aout_object_p, adjust_o_magic, adjust_z_magic,
7027         adjust_n_magic, adjust_sizes_and_vmas, squirt_out_relocs,
7028         final_link, aout_link_input_section): ..
7029         * peXXigen.c (_bfd_XXi_swap_sym_in, _bfd_XXi_swap_aouthdr_out,
7030         pe_print_idata, pe_print_edata, pe_print_pdata, pe_print_reloc): ..
7031         * pef.c (bfd_pef_make_bfd_section, bfd_pef_print_loader_section,
7032         bfd_pef_scan_start_address, bfd_pef_parse_symbols): ..
7033         * ppcboot.c (ppcboot_object_p, ppcboot_canonicalize_symtab): ..
7034         * ptrace-core.c (ptrace_unix_core_file_p): ..
7035         * reloc.c (bfd_perform_relocation, bfd_install_relocation,
7036         _bfd_final_link_relocate, bfd_generic_relax_section,
7037         bfd_generic_get_relocated_section_contents): ..
7038         * reloc16.c (bfd_coff_reloc16_relax_section,
7039         bfd_coff_reloc16_get_relocated_section_c): ..
7040         * riscix.c (riscix_some_aout_object_p): ..
7041         * rs6000-core.c (read_hdr, make_bfd_asection): ..
7042         * sco5-core.c (make_bfd_asection): ..
7043         * simple.c (bfd_simple_get_relocated_section_contents): ..
7044         * som.c (som_object_setup, setup_sections, som_prep_headers,
7045         som_write_fixups, som_begin_writing, bfd_section_from_som_symbol,
7046         som_set_reloc_info, som_get_section_contents,
7047         som_bfd_link_split_section): ..
7048         * sparclinux.c (linux_link_create_dynamic_sections,
7049         bfd_sparclinux_size_dynamic_sections, linux_finish_dynamic_link): ..
7050         * srec.c (srec_scan, srec_read_section, srec_get_section_contents): ..
7051         * stabs.c (_bfd_link_section_stabs, _bfd_discard_section_stabs,
7052         _bfd_write_stab_strings, _bfd_stab_section_offset): ..
7053         * sunos.c (sunos_read_dynamic_info, sunos_create_dynamic_sections,
7054         bfd_sunos_size_dynamic_sections, sunos_scan_std_relocs,
7055         sunos_scan_ext_relocs, sunos_scan_dynamic_symbol,
7056         sunos_write_dynamic_symbol, sunos_check_dynamic_reloc,
7057         sunos_finish_dynamic_link): ..
7058         * syms.c (_bfd_stab_section_find_nearest_line): ..
7059         * tekhex.c (first_phase, tekhex_set_section_contents,
7060         tekhex_write_object_contents): ..
7061         * trad-core.c (trad_unix_core_file_p): ..
7062         * versados.c (process_esd, process_otr, process_otr): ..
7063         * vms-gsd.c (_bfd_vms_slurp_gsd, _bfd_vms_write_gsd): ..
7064         * vms-misc.c (add_new_contents): ..
7065         * vms-tir.c (check_section, new_section, _bfd_vms_write_tir): ..
7066         * vms.c (vms_set_section_contents): ..
7067         * xcofflink.c (xcoff_get_section_contents, xcoff_link_add_symbols,
7068         xcoff_sweep, bfd_xcoff_size_dynamic_sections, xcoff_build_ldsyms,
7069         _bfd_xcoff_bfd_final_link, xcoff_link_input_bfd): ..
7070         * xsym.c (bfd_sym_scan): .. See above.
7072 2004-06-21  H.J. Lu  <hongjiu.lu@intel.com>
7074         * elfxx-ia64.c (elfNN_ia64_relax_section): Add addend when
7075         calling _bfd_merged_section_offset only for section symbols.
7077 2004-06-22  Alan Modra  <amodra@bigpond.net.au>
7079         * elf32-ppc.c (ppc_elf_relax_section): Implement reference code
7080         for handling SEC_MERGE symbols in relax_section.
7082 2004-06-21  Alexandre Oliva  <aoliva@redhat.com>
7084         2003-05-15  Richard Sandiford  <rsandifo@redhat.com>
7085         * cpu-h8300.c (compatible): Allow h8300s and h8300sx code to be
7086         linked together. Mark the result as h8300sx code.
7088 2004-06-21  Alexandre Oliva  <aoliva@redhat.com>
7090         * elf-bfd.h (struct elf_backend_data): Added
7091         elf_backend_omit_section_dynsym.
7092         (_bfd_elf_link_omit_section_dynsym): Declare.
7093         * elf32-frv.c (_frvfdpic_link_omit_section_dynsym): New.
7094         (elf_backend_omit_section_dynsym): Use it for frvfdpic.
7095         * elflink.c (_bfd_elf_link_omit_section_dynsym): Split out of...
7096         (_bfd_elf_link_renumber_dynsyms): ... this function.
7097         * elfxx-target.h (elf_backend_omit_section_dynsym): Default to
7098         _bfd_elf_link_omit_section_dynsym).
7099         (elfNN_bed): Added elf_backend_omit_section_dynsym.
7101 2004-06-21  Nick Clifton  <nickc@redhat.com>
7103         * coffcode.h (styp_to_sec_flags): Ignore IMAGE_SCN_MEM_NOT_PAGED
7104         flags.
7106 2004-06-17  Jerome Guitton  <guitton@gnat.com>
7108         * bfd-in.h (bfd_cache_close_all): New function declaration.
7109         * bfd-in2.h: Regenerate.
7110         * cache.c (bfd_cache_close_all): New function definition.
7112 2004-06-16  Mark Kettenis  <kettenis@gnu.org>
7114         * configure.in: Don't set COREFILE to trad-core.lo for FreeBSD
7115         4.10 and beyond.
7116         * configure: Regenerate.
7118 2004-06-16  Daniel Jacobowitz  <dan@debian.org>
7120         * elf32-ppc.c (ppc_elf_create_linker_section): Create symbols in
7121         the pre-existing section.
7123 2004-06-15  Alan Modra  <amodra@bigpond.net.au>
7125         * section.c (struct sec): Remove usused flags.  Reorganize a little.
7126         (bfd_get_section_size_before_reloc): Delete.
7127         (bfd_get_section_size_after_reloc): Delete.
7128         (STD_SECTION): Update.
7129         (bfd_get_section_size_now): Delete.
7130         (bfd_set_section_contents): Don't referece reloc_done.
7131         (bfd_get_section_contents): Remove reloc_done comment.
7132         * bout.c (b_out_bfd_get_relocated_section_contents): Don't set
7133         reloc_done.
7134         * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Likewise.
7135         * ecoff.c (bfd_debug_section): Update initializer.
7136         * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents): Ditto.
7137         * reloc.c (bfd_generic_get_relocated_section_contents): Likewise.
7138         * bfd-in.h (bfd_section_size): Expand.
7139         (bfd_get_section_size): New macro.
7140         * bfd-in2.h: Regenerate.
7141         * coff64-rs6000.c (xcoff64_write_object_contents): Replace
7142         bfd_get_section_size_before_reloc with bfd_get_section_size.
7143         * coffcode.h (coff_write_object_contents): Likewise.
7144         * coffgen.c (build_debug_section): Likewise.
7145         * dwarf1.c (parse_line_table): Likewise.
7146         (_bfd_dwarf1_find_nearest_line): Likewise.
7147         * ecoff.c (_bfd_ecoff_write_object_contents): Likewise.
7148         * i386msdos.c (msdos_write_object_contents): Likewise.
7149         * pdp11.c (squirt_out_relocs): Likewise.
7150         * elf32-sh64.c (sh64_find_section_for_address): Remove comment.
7151         * elf64-mmix.c (mmix_elf_final_link): Update comment.
7153 2004-06-14  Chris Demetriou  <cgd@broadcom.com>
7155         * elf32-mips.c (elf_mips_gnu_pcrel32): Add (undoing 2004-04-24
7156         removal) with updated comment.
7157         (bfd_elf32_bfd_reloc_type_lookup): Add back case for
7158         BFD_RELOC_32_PCREL.
7159         (mips_elf32_rtype_to_howto): Add back case for R_MIPS_PC32.
7160         * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
7162 2004-06-12  Alan Modra  <amodra@bigpond.net.au>
7164         * elf64-x86-64.c (elf64_x86_64_relocate_section): Ignore reloc
7165         overflow on branches to undefweaks.
7167 2004-06-11  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
7169         * coff-alpha.c (alpha_relocate_section): Set used_by_bfd directly
7170         as ecoff_section_data() does not return a valid lvalue.
7172 2004-06-09  Alexandre Oliva  <aoliva@redhat.com>
7174         * elflink.c (elf_sort_symbol): Compare section id, not pointers.
7175         (elf_link_add_object_symbols): Likewise.
7177         * elf-m10300.c (_bfd_mn10300_elf_reloc_type_class): New.
7178         (elf_backend_reloc_type_class): New.
7180 2004-06-08  Mark Kettenis  <kettenis@gnu.org>
7182         * configure.in (hppa*-*-netbsd*, hppa*-*-openbsd): Set COREFILE to
7183         netbsd-core.lo.
7184         * configure: Regenerate.
7186 2004-06-07  Daniel Jacobowitz  <dan@debian.org>
7188         From:  Albert Chin-A-Young  <china@thewrittenword.com>
7189         * bfd/elf-bfd.h (struct eh_cie_fde): Convert unsigned char bitfields
7190         to unsigned int.
7192 2004-05-29  H.J. Lu  <hongjiu.lu@intel.com>
7194         * elfxx-ia64.c (elfNN_ia64_relax_section): Undo the last
7195         change.
7197 2004-05-28  DJ Delorie  <dj@redhat.com>
7199         * elf-m10300.c (mn10300_elf_relax_section): Preserve reloc addend
7200         for linking, but otherwise adjust reloc for merged sections.
7202 2004-05-28  H.J. Lu  <hongjiu.lu@intel.com>
7204         * elfxx-ia64.c (elfNN_ia64_relax_section): Properly call
7205         _bfd_merged_section_offset for local symbols.
7207 2004-05-28  Andrew Stubbs <andrew.stubbs@superh.com>
7209         * Makefile.am: Regenerate dependencies.
7210         * Makefile.in: Regenerate.
7211         * archures.c: Add bfd_mach_sh3_nommu .
7212         * bfd-in2.h: Regenerate.
7213         * cpu-sh.c: Add sh3-nommu architecture.
7214         (bfd_to_arch_table): Create new table.
7215         (sh_get_arch_from_bfd_mach): Create new function.
7216         (sh_get_arch_up_from_bfd_mach): Create new function.
7217         (sh_merge_bfd_arch): Create new function.
7218         * elf32-sh.c (sh_ef_bfd_table): Add table.
7219         (sh_elf_check_relocs): Replace switch statement with
7220         use of sh_ef_bfd_table .
7221         (sh_elf_get_flags_from_mach): Add new function.
7222         (sh_find_elf_flags): Likewise.
7223         (sh_elf_copy_private_data): Replace most of non-elf contents
7224         with a call to sh_merge_bfd_arch() .
7226 2004-05-27  Michael Chastain  <mec.gnu@mindspring.com>
7228         * Makefile.am (bfdver.h): Use explicit filename, not $< .
7229         * Makefile.in: Regenerate.
7231 2004-05-27  Alexandre Oliva  <aoliva@redhat.com>
7233         * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Avoid
7234         custom calling conventions for dynamic symbols.
7235         (mn10300_elf_relax_section): Avoid relaxing a function as a local
7236         symbol if it's an alias to a global one.
7238 2004-05-26  H.J. Lu  <hongjiu.lu@intel.com>
7240         * elf.c (_bfd_elf_make_section_from_shdr): Undo the last
7241         change.
7243 2004-05-27  Alexandre Oliva  <aoliva@redhat.com>
7245         * elf-m10300.c (mn10300_elf_relax_section): Don't test isym within
7246         loop over hashes.
7248 2004-05-26  Alan Modra  <amodra@bigpond.net.au>
7250         * elf.c (_bfd_elf_make_section_from_shdr): Don't set SEC_EXCLUDE
7251         for SHT_GROUP sections.
7253 2004-05-25  Alan Modra  <amodra@bigpond.net.au>
7255         * elflink.c (elf_link_add_object_symbols): Don't set up merge
7256         section data here..
7257         * elf.c (_bfd_elf_merge_sections): .. Do it here instead.
7258         * merge.c: Formatting.  Remove unnecessary casts.  Expand
7259         bfd_get_section_alignment macro.
7260         (struct sec_merge_sec_info): Rename "first" to "first_str".  Update
7261         use throughout file.
7262         (_bfd_add_merge_section): Rename from _bfd_merge_section.  Update
7263         comment.  Abort on dynamic or non-SEC_MERGE input.  Don't test
7264         section name to determine sinfo group, instead test output section
7265         and alignment.
7266         (_bfd_merge_sections): Add struct bfd_link_info param.  Call
7267         _bfd_strip_section_from_output rather than just twiddling flags.
7268         * libbfd-in.h (_bfd_add_merge_section): Rename, update comment.
7269         (_bfd_merge_sections): Update prototype.
7270         * libbfd.h: Regenerate.
7272 2004-05-24  Mark Kettenis  <kettenis@gnu.org>
7274         * netbsd-core.c: Correctly indent section that sets architecture
7275         from machine ID.
7277         From Miod Vallat <miod@online.fr>:
7278         * m88kopenbsd.c: New file.
7279         * targets.c (m88k_openbsd_vec): New.
7280         * config.bfd: Add m88k-*-openbsd*.
7281         * configure.in (m88k-*-openbsd*): Set COREFILE to netbsd-core.lo.
7282         (m88kopenbsd_vec): New.
7283         * configure: Regenerate.
7284         * Makefile.am (BFD32_BACKENDS): Add m88kopenbsd.lo.
7285         (BFD32_BACKENDS_CFILES): Add m88kopenbsd.c.
7286         Run "make dep-am".
7287         * Makefile.in: Regenerate.
7288         * po/SRC-POTFILES.in: Regenerate.
7290 2004-05-24  Nick Clifton  <nickc@redhat.com>
7292         * hash.c: Remove bogus node "Changing the default Hash Table Size"
7293         introduced by hash table size patch.
7295 2004-05-22  Ben Elliston  <bje@au.ibm.com>
7297         * configure.in (is_release): Remove.
7298         (bfd_version_date, bfd_version, bfd_version_string): Likewise.
7299         (AC_OUTPUT): Don't output bfdver.h from version.h.
7300         * configure: Regenerate.
7301         * Makefile.am (RELEASE): New variable.
7302         (bfdver.h): New target.
7303         * Makefile.in: Regenerate.
7304         * doc/Makefile.in: Likewise.
7306 2004-05-22  Ben Elliston  <bje@au.ibm.com>
7308         * Makefile.am (config.status): Don't depend on version.h.
7309         * Makefile.in: Regenerate.
7311 2004-05-22  Alan Modra  <amodra@bigpond.net.au>
7313         * merge.c (_bfd_merged_section_offset): Remove "addend" param.
7314         * libbfd-in.h (_bfd_merged_section_offset): Adjust prototype.
7315         * libbfd.h: Regenerate.
7316         * elf.c (_bfd_elf_rela_local_sym): Adjust call.
7317         (_bfd_elf_rel_local_sym): Likewise.
7318         * elflink.c (_bfd_elf_link_sec_merge_syms): Likewise.
7319         (elf_link_input_bfd): Likewise.
7320         * elf32-ppc.c (ppc_elf_relax_section): Likewise.
7321         * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
7322         * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
7323         (elfNN_ia64_relocate_section): Likewise.
7325 2004-05-21  Andy Chittenden  <achittenden@bluearc.com>
7327         * hash.c (bfd_default_hash_table_size): New variable.
7328         (bfd_hash_table_init): Use new variable instead of DEFAULT_SIZE.
7329         (bfd_hash_set_default_size): New function.  Set the default size
7330         to a selected prime number close to the argument.  Document new
7331         function.
7332         * bfd-in.h: Add prototype for  bfd_hash_set_default_size.
7333         * bfd-in2.h: Regenerate.
7334         * Makefile.am (hash.lo): Add dependency upon libiberty.h.
7335         * Makefile.in: Regenerate.
7337 2004-05-21  Mark Kettenis  <kettenis@gnu.org>
7339         * libaout.h (machine_type): Add M_88K_OPENBSD and M_HPPA_OPENBSD.
7340         * netbsd-core.c (netbsd_core_file_p): Set architecture for alpha,
7341         arm, m68k, m88k and hppa core files.
7343 2004-05-21  Nick Clifton  <nickc@redhat.com>
7345         * bfdio.c (bfd_bread): Do not use iovec if it is NULL.
7346         (bfd_bwrite): Likewise.
7347         (bfd_tell): Likewise.
7348         (bfd_flush): Likewise.
7349         (bfd_stat): Likewise.
7350         (bfd_seek): Likewise.
7351         (bfd_get_mtime): Likewise.
7352         (bfd_get_size): Likewise.
7354 2004-05-19  Ben Elliston  <bje@au.ibm.com>
7356         * dwarf2.c (_bfd_dwarf2_find_nearest_line): Comment correction.
7358 2004-05-19  Mikulas Patocka  <mikulas@artax.karlin.mff.cuni.cz>
7360         * archive.c (_bfd_get_elt_at_filepos): Cope with a nested archives.
7361         (bfd_generic_openr_next_archived_file): Likewise.
7363 2004-05-17  Bob Wilson  <bob.wilson@acm.org>
7365         * elf32-xtensa.c (xtensa_get_property_section_name): Determine linkonce
7366         section names by inserting a new substring after .gnu.linkonce, except
7367         for .gnu.linkonce.t.* where the "t." is replaced.
7369 2004-05-17  Adam Nemet  <anemet@lnxw.com>
7371         * config.bfd (sparc-*-lynxos* case): Add to obsolete list.
7372         (m68-*-lynxos* case): Likewise.
7373         (powerpc-*-lyxnos* case): New case.
7374         (i[3-7]86-*-lynxos* case): Update to LynxOS 4.0 ELF.
7376 2004-05-17  David Heine  <dlheine@tensilica.com>
7378         * aout-target.h (MY_bfd_copy_private_header_data): Define.
7379         * aout-tic30.c (MY_bfd_copy_private_header_data): Define.
7380         * bfd.c (bfd_copy_private_header_data): Define.
7381         * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Add entries for new
7382         interface.
7383         * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
7384         * coffcode.h (coff_bfd_copy_private_header_data): Define.
7385         * elf-bfd.h (_bfd_elf_copy_private_header_data): Declare.
7386         * elf.c (_bfd_elf_copy_private_section_data): Remove code to set up
7387         segments by calling copy_private_bfd_data.
7388         (_bfd_elf_copy_private_header_data): Define.
7389         * elfxx-target.h (bfd_elfNN_bfd_copy_private_header_data): Define.
7390         * libbfd-in.h (_bfd_generic_bfd_copy_private_header_data): Define.
7391         * libecoff.h (_bfd_ecoff_bfd_copy_private_header_data): Define.
7392         * mach-o.c (bfd_mach_o_bfd_copy_private_header_data): Define.
7393         * mmo.c (mmo_bfd_copy_private_header_data): Define.
7394         * ppcboot.c (ppcboot_bfd_copy_private_header_data): Define.
7395         * som.c (som_bfd_copy_private_header_data): Define.
7396         * targets.c (BFD_JUMP_TABLE_COPY): Add _bfd_copy_private_header_data.
7397         * vms.c (vms_bfd_copy_private_header_data): Define.
7398         * bfd-in2.h: Regenerate.
7399         * libbfd.h: Regenerate.
7401 2004-05-15  Thiemo Seufer  <seufer@csv.ica.uni-stuttgart.de>
7403         * elfxx-mips.c (MINUS_TWO): Define.
7404         (mips_elf_higher, mips_elf_highest,
7405         mips_elf_create_dynamic_relocation): Use MINUS_ONE and MINUS_TWO for
7406         some bfd_vma values.
7407         (_bfd_mips_elf_finish_dynamic_symbol): Likewise. Code cleanup.
7409 2004-05-14  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
7411         * som.c (log2): Rename to exact_log2.  Adjust all callers.
7413 2004-05-13  Paul Brook  <paul@codesourcery.com>
7415         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Handle
7416         dwarf3 format CIE entries.  Remove comment about the size of the
7417         ra_column field.  It is now correctly deduced.
7419 2004-05-13  Joel Sherrill <joel@oarcorp.com>
7421         * config.bfd (or32-*-rtems*): Switch to elf.
7423 2004-05-13  Nick Clifton  <nickc@redhat.com>
7425         * po/fr.po: Updated French translation.
7427 2004-05-11  Jakub Jelinek  <jakub@redhat.com>
7429         * elflink.c (bfd_elf_final_link): Don't output STT_SECTION symbol
7430         into .dynsym if elf_section_data (sec)->dynindx <= 0.
7431         Adjust counting of last_local.
7432         (_bfd_elf_link_renumber_dynsyms): Don't assign dynindx to sections
7433         other than SHT_PROGBITS/SHT_NOBITS and neither for .got/.got.plt/.plt
7434         created by the linker nor !SHF_ALLOC.
7436         * elf32-i386.c (elf_i386_finish_dynamic_sections): Point
7437         DT_PLTGOT to the start of the .got.plt section instead of the
7438         .got output section.  Set sh_entsize for .got section in addition
7439         to .got.plt.
7440         (elf_i386_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
7441         is at sgot->output_section->vma.
7442         * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Point
7443         DT_PLTGOT to the start of the .got.plt section instead of the
7444         .got output section.
7445         (elf64_x86_64_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
7446         is at sgot->output_section->vma.  Set sh_entsize for .got section
7447         in addition to .got.plt.
7448         * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_RELRO.
7449         (bfd_section_from_phdr): Likewise.
7450         (map_sections_to_segments): Likewise.
7451         (assign_file_positions_for_segments): Likewise.
7452         (get_program_header_size): Likewise.
7453         * elflink.c (bfd_elf_size_dynamic_sections): Set
7454         elf_tdata (output_bfd)->relro from info->relro.
7455         * elf-bfd.h (struct elf_obj_tdata): Add relro field.
7457 2004-05-08  Alexandre Oliva  <aoliva@redhat.com>
7459         * elf32-frv.c (_frvfdpic_add_dyn_reloc): Don't warn when we get
7460         a zero symndx for which we hadn't accounted a dynamic relocation.
7461         (_frvfdpic_add_rofixup): Likewise.
7463 2004-05-07  Brian Ford  <ford@vss.fsi.com>
7464             DJ Delorie  <dj@redhat.com>
7466         * coffcode.h (coff_write_object_contents) [COFF_IMAGE_WITH_PE]:
7467         Propagate IMAGE_FILE_LARGE_ADDRESS_AWARE.
7468         * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Recognize
7469         IMAGE_FILE_LARGE_ADDRESS_AWARE.  Use PE defines.
7471 2004-05-07  Alexandre Oliva  <aoliva@redhat.com>
7473         * elf32-frv.c (elf32_frvfdpic_modify_segment_map): Return
7474         immediately if there's no link info.
7475         (elf32_frvfdpic_copy_private_bfd_data): New.
7476         (bfd_elf32_bfd_copy_private_bfd_data): Use it for frvfdpic.
7478 2004-05-06  Zack Weinberg  <zack@codesourcery.com>
7480         * dwarf2.c (add_line_info): Also set info->filename to NULL if
7481         filename argument is null; do not call strlen on a null pointer.
7483 2004-05-06  Daniel Jacobowitz  <drow@mvista.com>
7485         * elf32-arm.h (elf32_arm_relocate_section): Remove R_ARM_PLT32
7486         special case.
7488 2004-05-05  Alexandre Oliva  <aoliva@redhat.com>
7490         * configure.in (bfd_elf32_frvfdpic_vec): New.
7491         * configure: Rebuilt.
7492         * targets.c (bfd_elf32_frvfdpic_vec): New.
7493         * config.bfd: Enable it on frv-*-elf and frv-*-*linux*, as default
7494         on the latter.
7495         * elf32-frv.c: Prefix all identifiers added for FDPIC support with
7496         frvfdpic instead of frv.  Rearrange elf-target macros such that
7497         the FDPIC-specific ones are only defined for this new target
7498         vector.
7499         (bfd_elf32_frvfdpic_vec): Declare.
7500         (IS_FDPIC): New.
7501         (elf32_frv_relocate_section): Use it to enable segment checking
7502         and to control rofixup emission.  Add output section vma to
7503         applied relocation in non-LOAD non-ALLOC sections.  Use
7504         _bfd_error_handler for errors.
7505         (_frv_create_got_section): Create .rel.got and .rofixup only in
7506         FDPIC.  Create non-dynamic _gp at .got+2048 in non-FDPIC, like the
7507         linker script.
7508         (elf32_frvfdpic_size_dynamic_sections): Assume FDPIC.
7509         (elf32_frvfdpic_modify_segment_map): Likewise.
7510         (elf32_frv_finish_dynamic_sections): New, do-nothing.
7511         (elf32_frvfdpic_finish_dynamic_sections): Assume FDPIC.  Improve
7512         error message if we miscompute the rofixup size.
7513         (frvfdpic_elf_use_relative_eh_frame): Assume FDPIC.
7514         (frvfdpic_elf_encode_eh_address): Likewise.
7515         (elf32_frv_check_relocs): Reject FDPIC-only relocs in non-FDPIC.
7516         Record relocs only in FDPIC.  Make sure _gp is defined for GPREL
7517         relocs.  Reject unknown relocation types.
7518         (elf32_frv_object_p): Make sure target vector matches FDPIC bits.
7519         (frv_elf_merge_private_bfd_data): Likewise.
7520         (ELF_MAXPAGESIZE): Revert to 0x1000 for elf32-frv; keep it as
7521         0x4000 for newly-added elf32-frvfdpic.
7523 2004-05-05  Nick Clifton  <nickc@redhat.com>
7525         PR/136
7526         * cache.c (bfd_cache_lookup_worker): Call abort() rather than
7527         returning NULL as most users of this function do not check its
7528         return value.
7529         * hppabsd-core.c (hppabsd_core_core_file_p): Do not check result
7530         of bfd_cache_lookup().
7531         * sco5-core.c (sco5_core_file_p): Likewise.
7532         * trad-core.c (trad_unix_core_file_p): Likewise.
7534 2004-05-05  Nick Clifton  <nickc@redhat.com>
7536         * cache.c (bfd_cache_lookup): Improve formatting.
7537         * archive.c: Fix formatting.
7539 2004-05-05  Peter Barada  <peter@the-baradas.com>
7541         * bfd_archures.c(bfd_architecture): Add 521x,5249,547x,548x.
7542         * cpu-m68k.c(bfd_m68k_arch): Likewise.
7543         * bfd-in2.h(bfd_architecture): Regenerate.
7545 2004-05-03  Alan Modra  <amodra@bigpond.net.au>
7547         * elf.c (_bfd_elf_rela_local_sym): Set kept_section for excluded
7548         SEC_MERGE sections.
7549         * elflink.c (elf_link_input_bfd): Adjust output reloc index for
7550         those against discarded link-once and SEC_MERGE section symbols.
7552 2004-05-02  H.J. Lu  <hongjiu.lu@intel.com>
7554         * section.c (bfd_get_section_by_name_if): New.
7555         * bfd-in2.h: Regenerated.
7557 2004-05-02  Alan Modra  <amodra@bigpond.net.au>
7559         * som.c (som_bfd_is_group_section): Define.
7561 2004-05-01  Alan Modra  <amodra@bigpond.net.au>
7563         * section.c (bfd_make_section_anyway): Copy the whole
7564         bfd_hash_entry, not just "next" from existing entry.
7566 2004-04-30  H.J. Lu  <hongjiu.lu@intel.com>
7568         * elf.c (bfd_section_from_shdr): Maintain the section order in
7569         a section group.
7570         (special_sections): Add ".note.GNU-stack".
7571         (elf_fake_sections): Handle section group for relocatable
7572         link..
7574 2004-04-30  H.J. Lu  <hongjiu.lu@intel.com>
7576         * section.c (bfd_sections_find_if): New.
7577         * bfd-in2.h: Regenerated.
7579 2004-04-30  Alan Modra  <amodra@bigpond.net.au>
7581         * section.c (bfd_make_section_anyway): Add all sections to hash tab.
7583         * elf-bfd.h (bfd_elf_is_group_section): Declare.
7584         * elf.c (bfd_elf_is_group_section): New function.
7585         * elfxx-target.h (bfd_elfNN_bfd_is_group_section
7586         * section.c (bfd_generic_is_group_section): New function.
7587         * targets.c (struct bfd_target): Add _bfd_is_group_section field.
7588         (BFD_JUMP_TABLE_LINK): Adjust.
7589         * aout-adobe.c (aout_32_bfd_is_group_section): Define.
7590         * aout-target.h (MY_bfd_is_group_section): Define.
7591         * aout-tic30.c (MY_bfd_is_group_section): Define.
7592         * bfd.c (bfd_is_group_section): Define.
7593         * binary.c (binary_bfd_is_group_section): Define.
7594         * bout.c (b_out_bfd_is_group_section): Define.
7595         * coff-alpha.c (_bfd_ecoff_bfd_is_group_section): Define.
7596         * coff-mips.c (_bfd_ecoff_bfd_is_group_section): Define.
7597         * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Adjust.
7598         * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Adjust.
7599         * coffcode.h (coff_bfd_is_group_section): Define.
7600         * i386msdos.c (msdos_bfd_is_group_section): Define.
7601         * i386os9k.c (os9k_bfd_is_group_section): Define.
7602         * ieee.c (ieee_bfd_is_group_section): Define.
7603         * ihex.c (ihex_bfd_is_group_section): Define.
7604         * libbfd-in.h (_bfd_nolink_bfd_is_group_section): Define.
7605         * mach-o.c (bfd_mach_o_bfd_is_group_section): Define.
7606         * mmo.c (mmo_bfd_is_group_section): Define.
7607         * nlm-target.h (nlm_bfd_is_group_section): Define.
7608         * oasys.c (oasys_bfd_is_group_section): Define.
7609         * pef.c (bfd_pef_bfd_is_group_section): Define.
7610         * ppcboot.c (ppcboot_bfd_is_group_section): Define.
7611         * srec.c (srec_bfd_is_group_section): Define.
7612         * tekhex.c (tekhex_bfd_is_group_section): Define.
7613         * versados.c (versados_bfd_is_group_section): Define.
7614         * vms.c (vms_bfd_is_group_section): Define.
7615         * xsym.c (bfd_sym_bfd_is_group_section): Define.
7616         * bfd-in2.h: Regenerate.
7617         * libbfd.h: Regenerate.
7619 2004-04-30  Alan Modra  <amodra@bigpond.net.au>
7621         * elflink.c (elf_gc_mark): Follow indirect and warning syms.
7623 2004-04-30  Hans-Peter Nilsson  <hp@axis.com>
7625         * configure.in: Update version to 2.15.91.
7626         * configure: Regenerate.
7628 2004-04-29  Brian Ford  <ford@vss.fsi.com>
7630         * bfd.c (bfd_get_sign_extend_vma): Add pe[i]-i386 case to DJGPP hack.
7631         * coffcode.h (DOT_DEBUG, GNU_LINKONCE_WI): Define.
7632         [!COFF_WITH_PE] (sec_to_styp_flags, styp_to_sec_flags): Use them.
7633         (coff_compute_section_file_positions) [RS6000COFF_C]: Likewise.
7634         [COFF_WITH_PE] (sec_to_styp_flags): Handle DWARF 2/3 .debug* and
7635         .gnu.linkonce.wi. sections.
7636         * pe-i386.c (COFF_SUPPORT_GNU_LINKONCE): Define.
7637         (COFF_SECTION_ALIGNMENT_ENTRIES): Add entries for .debug and
7638         .gnu.linkonce.wi..
7639         * pei-i386.c (COFF_SUPPORT_GNU_LINKONCE): Likewise.
7640         (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
7642 2004-04-28  Chris Demetriou  <cgd@broadcom.com>
7644         * reloc.c: Remove BFD_RELOC_PCREL_HI16_S and BFD_RELOC_PCREL_LO16.
7645         * bfd-in2.h: Regenerate.
7646         * libbfd.h: Likewise.
7648 2004-04-28  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
7650         * som.c (struct som_misc_symbol_info): Add is_comdat, is_common and
7651         dup_common fields.
7652         (setup_sections): Use som_subspace_dictionary_record struct instead
7653         subspace_dictionary_record.  Set SEC_LINK_ONCE if subspace is
7654         is_comdat, is_common or dup_common.
7655         (som_prep_headers): Use som_subspace_dictionary_record struct.  Set
7656         is_comdat, is_common and dup_common in section subspace_dict from
7657         copy_data.
7658         (som_begin_writing): Use som_subspace_dictionary_record struct.
7659         (som_finish_writing): Likewise.
7660         (som_bfd_derive_misc_symbol_info): Add support to set is_comdat,
7661         is_common and dup_common flags in info for symbol.  Add comment
7662         regarding linker support for these fields.  Slightly reorganize
7663         function.
7664         (som_build_and_write_symbol_table): Set is_comdat, is_common and
7665         dup_common fields in symbol table from symbol info.
7666         (bfd_som_set_subsection_attributes): Add comdat, common and dup_common
7667         arguments.  Set corresponding fields in copy_data.  Change all callers.
7668         (som_bfd_ar_write_symbol_stuff): Set dup_common flag in library
7669         symbol table.
7670         (som_vec): Add SEC_LINK_ONCE to applicable section flags.
7671         * som.h (som_subspace_dictionary_record): Define.
7672         (som_copyable_section_data_struct): Add is_comdat, is_common and
7673         dup_common fields.
7674         (som_section_data_struct): Use som_subspace_dictionary_record struct
7675         instead of subspace_dictionary_record.
7676         (bfd_boolean bfd_som_set_subsection_attributes): Adjust prototype.
7678 2004-04-27  Bob Wilson  <bob.wilson@acm.org>
7680         * elf32-xtensa.c (xtensa_read_table_entries): Use section _cooked_size
7681         if set.  Check reloc_done flag before applying relocations.  Use
7682         output addresses, both when applying relocations and when comparing
7683         against the specified section.
7684         (elf_xtensa_relocate_section): Use output address to check if dynamic
7685         reloc is in a literal pool.  Set section's reloc_done flag.
7687 2004-04-27  H.J. Lu  <hongjiu.lu@intel.com>
7689         * elf32-sh64.c (elf_backend_section_flags): New. Defined.
7690         (sh64_elf_set_mach_from_flags): Remove the kludge for .cranges
7691         section.
7692         (sh64_elf_section_flags): New. Set SEC_DEBUGGING for .cranges
7693         section.
7695 2004-04-27  Alan Modra  <amodra@bigpond.net.au>
7697         * elf64-alpha.c (elf64_alpha_read_ecoff_info): Don't assign
7698         structure field removed in 2004-04-24 patch.
7699         * elf64-sparc.c (sparc64_elf_plt_sym_val): Warning fix.
7701         * elf-bfd.h (struct elf_backend_data <elf_backend_section_flags>):
7702         Constify hdr arg.
7703         * elf32-arm.h (elf32_arm_section_flags): Likewise.
7704         * elf64-alpha.c (elf64_alpha_section_flags): Likewise.
7705         * elfxx-ia64.c (elfNN_ia64_section_flags): Likewise.
7706         * elf.c (_bfd_elf_make_section_from_shdr): Set the bfd_section
7707         field before calling elf_backend_section_flags.
7709 2004-04-24  Chris Demetriou  <cgd@broadcom.com>
7711         * elf32-mips.c (elf_mips_gnu_rel_hi16, elf_mips_gnu_rel_lo16)
7712         (elf_mips_gnu_pcrel64, elf_mips_gnu_pcrel32): Remove.
7713         (bfd_elf32_bfd_reloc_type_lookup): Remove cases for
7714         BFD_RELOC_PCREL_HI16_S, BFD_RELOC_PCREL_LO16, BFD_RELOC_64_PCREL,
7715         and BFD_RELOC_32_PCREL.
7716         (mips_elf32_rtype_to_howto): Remove cases for R_MIPS_GNU_REL_HI16,
7717         R_MIPS_GNU_REL_LO16, R_MIPS_PC64, R_MIPS_PC32.
7718         * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
7719         (_bfd_mips_elf_lo16_reloc): Remove handling for R_MIPS_GNU_REL_HI16.
7720         (mips_elf_next_relocation): Move comment about matching HI/LO
7721         relocations to...
7722         (_bfd_mips_elf_relocate_section): Here.  Remove handling for
7723         R_MIPS_GNU_REL_HI16.
7725 2004-04-23  Chris Demetriou  <cgd@broadcom.com>
7727         * coff-mips.c (mips_relhi_reloc, mips_rello_reloc)
7728         (mips_switch_reloc, mips_read_relocs, mips_relax_section)
7729         (mips_relax_pcrel16, PCREL16_EXPANSION_ADJUSTMENT): Remove.
7730         (mips_relocate_hi): Remove now-unused 'adjust' and 'pcrel' arguments,
7731         and update comments to reflect current usage.
7732         (mips_howto_table): Remove entries for MIPS_R_RELHI, MIPS_R_RELLO,
7733         and MIPS_R_SWITCH, as well as several empty entries.  Update comment
7734         for MIPS_R_PCREL16.
7735         (mips_ecoff_swap_reloc_in, mips_ecoff_swap_reloc_out)
7736         (mips_adjust_reloc_out, mips_bfd_reloc_type_lookup): Remove support
7737         for MIPS_R_SWITCH, MIPS_R_RELLO, and MIPS_R_RELHI relocations.
7738         (mips_adjust_reloc_in): Likewise, adjust maximum accepted relocation
7739         type number to be MIPS_R_PCREL16.
7740         (mips_relocate_section): Remove support for link-time relaxation
7741         of branches used by embedded-PIC.  Remove support for MIPS_R_SWITCH,
7742         MIPS_R_RELLO, and MIPS_R_RELHI relocations.
7743         (_bfd_ecoff_bfd_relax_section): Redefine to bfd_generic_relax_section.
7744         * ecoff.c (ecoff_indirect_link_order): Remove support for link-time
7745         relaxation of branches used by embedded-PIC.
7746         * ecofflink.c (bfd_ecoff_debug_accumulate): Likewise.
7747         * libecoff.h (struct ecoff_section_tdata): Remove embedded-PIC
7748         related members, update comment.
7749         * pe-mips.c: Remove disabled (commented-out and #if 0'd)
7750         code related to embedded-PIC.
7751         * elfxx-mips.c (_bfd_mips_elf_read_ecoff_info): Remove
7752         initialization of now-removed 'adjust' member of
7753         'struct ecoff_debug_info'.
7755 2004-04-23  Chris Demetriou  <cgd@broadcom.com>
7757         * elfxx-mips.c (mips_elf_get_global_gotsym_index): Remove.
7759 2004-04-21  Philip Blundell  <pb@nexus.co.uk>
7761         * elf32-arm.h (elf32_arm_check_relocs): Don't output REL32
7762         relocs for locally defined symbols during -shared final link.
7763         (elf32_arm_final_link_relocate): Likewise.
7765 2004-04-22  Jakub Jelinek  <jakub@redhat.com>
7767         * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Copy also
7768         ELF_LINK_POINTER_EQUALITY_NEEDED.
7769         (elf64_x86_64_check_relocs): Set ELF_LINK_POINTER_EQUALITY_NEEDED
7770         if r_type is not R_X86_64_PC32.
7771         (elf64_x86_64_finish_dynamic_symbol): If
7772         ELF_LINK_POINTER_EQUALITY_NEEDED is not set, clear st_value of
7773         SHN_UNDEF symbols.
7775 2004-04-22  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7777         * elf32-sh.c (sh_elf_plt_sym_val): New function.
7778         (elf_backend_plt_sym_val): Define.
7780 2004-04-22  Andrew Cagney  <cagney@redhat.com>
7782         * opncls.c (bfd_alloc): Fix type of "wanted" in doco.
7784 2004-04-22  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
7786         * hpux-core.c (hpux_core_core_file_p): Add cast in call to
7787         make_bfd_asection.
7788         * som.c (som_set_section_contents): Constantify second argument.
7789         (hppa_som_gen_reloc_type): Abort for unsupported selectors.
7790         (som_object_setup): Rework to avoid warning.
7791         (setup_sections, som_write_fixups, bfd_section_from_som_symbol):
7792         Likewise.
7794 2004-04-22  Andrew Cagney  <cagney@redhat.com>
7796         * cache.c (bfd_cache_close): Check for a previously closed file.
7798 2004-04-22  Jakub Jelinek  <jakub@redhat.com>
7800         * bfd.c (bfd_get_synthetic_symtab): Define.
7801         * targets.c (BFD_JUMP_TABLE_DYNAMIC): Add
7802         NAME##_get_synthetic_symtab.
7803         (struct bfd_target): Add _bfd_get_synthetic_symtab.
7804         * libbfd-in.h (_bfd_nodynamic_get_synthetic_symtab): Define.
7805         * elf-bfd.h (struct elf_backend_data): Add plt_sym_val and
7806         relplt_name fields.
7807         (_bfd_elf_get_synthetic_symtab): New prototype.
7808         * elfcode.h (elf_get_synthetic_symtab): Define.
7809         * elf.c (_bfd_elf_get_synthetic_symtab): New function.
7810         * elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Define.
7811         (elf_backend_plt_sym_val, elf_backend_relplt_name): Define.
7812         (elfNN_bed): Add elf_backend_plt_sym_val and elf_backend_relplt_name.
7813         * bfd-in2.h: Rebuilt.
7814         * libbfd.h: Rebuilt.
7815         * elf32-i386.c (elf_i386_plt_sym_val): New function.
7816         (elf_backend_plt_sym_val): Define.
7817         * elf64-x86-64.c (elf64_x86_64_plt_sym_val): New function.
7818         (elf_backend_plt_sym_val): Define.
7819         * elf32-s390.c (elf_s390_plt_sym_val): New function.
7820         (elf_backend_plt_sym_val): Define.
7821         * elf64-s390.c (elf_s390_plt_sym_val): New function.
7822         (elf_backend_plt_sym_val): Define.
7823         * elf32-sparc (elf32_sparc_plt_sym_val): New function.
7824         (elf_backend_plt_sym_val): Define.
7825         * elf64-sparc.c (sparc64_elf_plt_sym_val): New function.
7826         (elf_backend_plt_sym_val): Define.
7827         * elf32-ppc.c (ppc_elf_plt_sym_val): New function.
7828         (elf_backend_plt_sym_val): Define.
7829         * aout-target.h (MY_get_synthetic_symtab): Define.
7830         * aout-tic30.c (MY_get_synthetic_symtab): Define.
7831         * coff-rs6000.c (rs6000coff_vec): Add
7832         _bfd_nodynamic_get_synthetic_symtab.
7833         (pmac_xcoff_vec): Likewise.
7834         * coff64-rs6000.c (rs6000coff64_vec): Add
7835         _bfd_nodynamic_get_synthetic_symtab.
7836         (aix5coff64_vec): Likewise.
7837         * sunos.c (MY_get_synthetic_symtab): Define.
7838         * vms.c (vms_get_synthetic_symtab): Define.
7840 2004-04-22  Nick Clifton  <nickc@redhat.com>
7842         * bfd.c (bfd_archive_filename): Return NULL on NULL input.
7844 2004-04-22  Peter Barada <peter@the-baradas.com>
7846         * archures.c: Add bfd_mach_mcfv4e to bfd_architecture.
7847         * bfd2-in.h: Regenerate.
7848         * cpu-m68k.c: Add 'm68k:mcfv4e' to arch_info_struct[].
7850 2004-04-21  Chris Demetriou  <cgd@broadcom.com>
7852         * coff-mips.c (bfd_mips_ecoff_create_embedded_relocs): Remove.
7853         * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Remove.
7854         * bfd-in.h (bfd_mips_ecoff_create_embedded_relocs)
7855         (bfd_mips_elf32_create_embedded_relocs): Remove prototypes
7856         * bfd-in2.h: Regenerate.
7858 2004-04-21  Bob Wilson  <bob.wilson@acm.org>
7860         * elf32-xtensa.c (is_same_value): Add final_static_link argument and
7861         require relocations against a weak symbol to reference the same
7862         symbol hash entry if not a final, static link.
7863         (get_cached_value, add_value_map): Add final_static_link argument.
7864         (remove_literals): Pass final_static_link argument as needed.
7866 2004-04-21  Andrew Cagney  <cagney@redhat.com>
7868         * opncls.c (_bfd_new_bfd_contained_in): Copy "iovec".
7869         (struct opncls, opncls_btell, opncls_bseek, opncls_bread)
7870         (opncls_bwrite, opncls_bclose, opncls_bflush)
7871         (opncls_bstat, opncls_iovec, bfd_openr_iovec): Implement a
7872         bfd iovec that uses function callbacks.
7873         (bfd_close): Use the iovec's bclose.
7874         * cache.c (cache_btell, cache_bseek, cache_bread, cache_bwrite)
7875         (cache_bclose, cache_bflush, cache_bstat)
7876         (cache_iovec): New functions and global variable, implement a
7877         cache "iovec", where applicable set bfd_error.
7878         (bfd_cache_init, bfd_cache_close): Set/test the bfd's iovec.
7879         * bfdio.c (struct bfd_iovec): Define.
7880         (real_read): Delete function.
7881         (bfd_bread, bfd_bread, bfd_bwrite, bfd_tell, bfd_flush, bfd_stat)
7882         (bfd_seek, bfd_get_mtime, bfd_get_size): Use the bfd's "iovec",
7883         assume that bread and bwrite set bfd_error.
7884         * bfd.c (struct bfd): Add "iovec", update comments.
7885         * bfd-in2.h, libbfd.h: Re-generate.
7887 2004-04-21  Andrew Cagney  <cagney@redhat.com>
7889         * libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
7891 2004-04-21  Eric Botcazou  <ebotcazou@act-europe.fr>
7893         * elflink.c (elf_gc_mark_dynamic_ref_symbol): New function.
7894         (bfd_elf_gc_sections): Fail if a shared object is being created.
7895         Do not fail if dynamic sections have been created.  Instead call
7896         elf_gc_mark_dynamic_ref_symbol to mark sections that contain
7897         dynamically referenced symbols.  Do not mark the whole graph
7898         rooted at .eh_frame, only the section proper.
7900 2004-04-20  DJ Delorie  <dj@redhat.com>
7902         * reloc.c: Add BFD_RELOC_32_SECREL.
7903         * bfd-in2.h: Regenerate.
7904         * libbfd.h: Likewise.
7905         * coff-i386.c (howto_table) [COFF_WITH_PE]: Add R_SECREL32.
7906         (coff_i386_rtype_to_howto) [COFF_WITH_PE]: Handle it.
7907         (coff_i386_reloc_type_lookup) [COFF_WITH_PE]: Likewise.
7909 2004-04-19  Jakub Jelinek  <jakub@redhat.com>
7911         * elf32-sparc.c (elf32_sparc_relocate_section): Handle
7912         relocs against hidden/protected undefweak symbols properly.
7913         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7915 2004-04-18  Mark Kettenis  <kettenis@gnu.org>
7917         * libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
7918         * netbsd-core.c (netbsd_core_file_p): Set architecture for PowerPC
7919         core files.
7921 2004-04-17  Brian Ford  <ford@vss.fsi.com>
7923         * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Use the first non-zero
7924         filepos for the SizeOfHeaders field.
7925         (_bfd_XXi_swap_scnhdr_out): Correct section flags lossage on reloc
7926         overflow.
7927         (_bfd_XXi_swap_sym_in): Remove redundant section flags assignment.
7929 2004-04-16  Alan Modra  <amodra@bigpond.net.au>
7931         * simple.c (bfd_simple_get_relocated_section_contents): Don't
7932         change reloc_done.  Set and restore _cooked_size.
7933         (RETURN): Delete.
7935 2004-04-15  Mark Kettenis  <kettenis@gnu.org>
7937         * netbsd-core.c (netbsd_core_file_p): Set architecture for VAX
7938         core files.
7940 2004-04-15  Nick Clifton  <nickc@redhat.com>
7942         * bfd.c (bfd_archive_filename): Catch NULL bfd pointers.
7944 2004-04-15  Alan Modra  <amodra@bigpond.net.au>
7946         * elf64-sparc.c (sparc64_elf_check_relocs): Fix thinko last change.
7948 2004-04-15  H.J. Lu  <hongjiu.lu@intel.com>
7950         * elflink.c (_bfd_elf_merge_symbol): Treat weak as strong only
7951         when it is a definition.
7953 2004-04-14  Alan Modra  <amodra@bigpond.net.au>
7955         * elf32-sparc.c (elf32_sparc_relocate_section): Don't abort
7956         when statically linking PIC code.
7957         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7959 2004-04-11  Thiemo Seufer  <seufer@csv.ica.uni-stuttgart.de>
7961         * config.bfd: Remove mips*-*-mach3* and mips*-dec-mach3* targets.
7962         * configure.in: Remove mips-dec-bsd*, mips-dec-mach3*, mips-*-mach3*
7963         targets amd aout_mips_big_vec, aout_mips_little_vec target vectors.
7964         * configure: Regenerate.
7966 2004-04-08  Richard Sandiford  <rsandifo@redhat.com>
7968         * elflink.c: Include libiberty.h.
7969         * Makefile.am (elflink.lo): Depend on libiberty.h.
7970         * Makefile.in: Regenerate.
7972 2004-04-06  Daniel Jacobowitz  <drow@mvista.com>
7974         * elfxx-mips.c (MIPS_ELF_STUB_SECTION_NAME): Always use
7975         ".MIPS.stubs".
7977 2004-04-05  H.J. Lu  <hongjiu.lu@intel.com>
7979         * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Always
7980         reserve the memory for dynamic linker
7982 2004-04-05  Mark Kettenis  <kettenis@gnu.org>
7984         * netbsd-core.c (CORE_WCOOKIE_OFFSET): New define.
7985         (netbsd_core_file_p): Create a .wcookie section for OpenBSD/sparc.
7987 2004-04-02  H.J. Lu  <hongjiu.lu@intel.com>
7989         * elf32-cr16c.c (elf32_cr16c_relocate_section): Use
7990         RELOC_FOR_GLOBAL_SYMBOL.
7991         (elf32_cr16c_add_symbol_hook): Remove const from Elf_Internal_Sym.
7993 2004-04-02  H.J. Lu  <hongjiu.lu@intel.com>
7995         * elf32-arm.h (elf32_arm_final_link_relocate): Handle
7996         R_ARM_ALU* only if OLD_ARM_ABI is not defined.
7998 2004-04-01  Paul Brook  <paul@codesourcery.com>
8000         * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update.
8001         * elf32-arm.h (struct elf32_elf_section_map): New.
8002         (struct _arm_elf_section_data): New.
8003         (elf32_arm_section_data): Define.
8004         (struct elf32_arm_link_hash_table): Add byteswap_code.
8005         (elf32_arm_link_hash_table_create): Initialize byteswap_code.
8006         (bfd_elf32_arm_process_before_allocation): Add byteswap_code.
8007         (elf32_arm_post_process_headers): Set EF_ARM_BE8.
8008         (elf32_arm_output_symbol_hook, elf32_arm_new_section_hook,
8009         elf32_arm_compare_mapping, elf32_arm_write_section): New functions.
8010         (bfd_elf32_new_section_hook, elf_backend_write_section,
8011         elf_backend_link_output_symbol_hook): Define.
8013 2004-04-01  Andy Chittenden  <achittenden@bluearc.com>
8015         * stabs.c (struct stab_link_includes_totals): Add field 'symb'
8016         that keeps the characters in a B_INCL..B_EINCL range.
8017         (_bfd_link_section_stabs): When computing the sum of the
8018         characters in a B_INCL..B_EINCL range also keep a copy of those
8019         characters.  Use this information to distinguish between
8020         include sections that have the same sum and the same length
8021         but which are nevertheless unique.
8023 2004-03-31  Paul Brook  <paul@codesourcery.com>
8025         * elf32-arm.h (elf32_arm_final_link_relocate): Add R_ARM_ALU*.
8026         * elfarm-nabi.c (elf32_arm_howto_table): Ditto.
8028 2004-03-31  Andy Chittenden <achittenden@bluearc.com>
8030         * stabs.c (struct stab_link_includes_totals): Rename field 'total'
8031         to 'sum_chars' and add field 'num_chars'.
8032         (_bfd_link_section_stabs): When computing the sum of the
8033         characters in a B_INCL..B_EINCL range also keep a count of the
8034         number of characters.  Use this information to help distinguish
8035         between include sections when have the same sum but which
8036         nevertheless are still unique.
8038 2004-03-31  Mattias EngdegÃ¥rd  <mattias@virtutech.se>
8040         * stabs.c (_bfd_link_section_stabs): Do not skip N_EXCL stabs.
8042 2004-03-30  Galit Heller  <Galit.Heller@nsc.com>
8043             Tomer Levi    <Tomer.Levi@nsc.com>
8045         * Makefile.am (ALL_MACHINES): Add cpu-cr16c.lo.
8046         (ALL_MACHINES_CFILES): Add cpu-cr16c.c.
8047         (BFD32_BACKENDS): Add elf32-cr16c.lo.
8048         (BFD32_BACKENDS_CFILES): Add elf32-cr16c.c.
8049         (cpu-cr16c.lo): New target.
8050         (elf32-cr16c.lo): Likewise.
8051         * Makefile.in: Regenerate.
8052         * archures.c (bfd_architecture): Add bfd_{arch,mach}_cr16c.
8053         (bfd_archures_list): Add bfd_cr16c_arch.
8054         * config.bfd: Handle cr16c-*-elf*.
8055         * configure.in: Handle bfd_elf32_cr16c_vec.
8056         * configure: Regenerate.
8057         * reloc.c: Add BFD_RELOC_16C_NUM08, BFD_RELOC_16C_NUM08_C,
8058         BFD_RELOC_16C_NUM16, BFD_RELOC_16C_NUM16_C,
8059         BFD_RELOC_16C_NUM32, BFD_RELOC_16C_NUM32_C,
8060         BFD_RELOC_16C_DISP04, BFD_RELOC_16C_DISP04_C,
8061         BFD_RELOC_16C_DISP08, BFD_RELOC_16C_DISP08_C,
8062         BFD_RELOC_16C_DISP16, BFD_RELOC_16C_DISP16_C,
8063         BFD_RELOC_16C_DISP24, BFD_RELOC_16C_DISP24_C,
8064         BFD_RELOC_16C_DISP24a, BFD_RELOC_16C_DISP24a_C,
8065         BFD_RELOC_16C_REG04, BFD_RELOC_16C_REG04_C,
8066         BFD_RELOC_16C_REG04a, BFD_RELOC_16C_REG04a_C,
8067         BFD_RELOC_16C_REG14, BFD_RELOC_16C_REG14_C,
8068         BFD_RELOC_16C_REG16, BFD_RELOC_16C_REG16_C,
8069         BFD_RELOC_16C_REG20, BFD_RELOC_16C_REG20_C,
8070         BFD_RELOC_16C_ABS20, BFD_RELOC_16C_ABS20_C,
8071         BFD_RELOC_16C_ABS24, BFD_RELOC_16C_ABS24_C,
8072         BFD_RELOC_16C_IMM04, BFD_RELOC_16C_IMM04_C,
8073         BFD_RELOC_16C_IMM16, BFD_RELOC_16C_IMM16_C,
8074         BFD_RELOC_16C_IMM20, BFD_RELOC_16C_IMM20_C,
8075         BFD_RELOC_16C_IMM24, BFD_RELOC_16C_IMM24_C,
8076         BFD_RELOC_16C_IMM32, BFD_RELOC_16C_IMM32_C.
8077         * targets.c (bfd_elf32_cr16c_vec): Declare.
8078         (bfd_target_vector): Add bfd_elf32_cr16c_vec.
8079         * cpu-cr16c.c: New file.
8080         * elf32-cr16c.c: Likewise.
8081         * libbfd.h: Regenerate.
8082         * bfd-in2.h: Likewise.
8084 2004-03-30  Jakub Jelinek  <jakub@redhat.com>
8086         * elf.c (map_sections_to_segments): Fix handling of .tbss.
8088 2004-03-27  Alan Modra  <amodra@bigpond.net.au>
8090         * Makefile.am: Remove all mention of elflink.h.
8091         * Makefile.in: Regenerate.
8092         * bfd-in.h (bfd_elf_discard_info): Declare.
8093         (bfd_elf32_discard_info, bfd_elf64_discard_info): Delete.
8094         * bfd-in2.h: Regenerate.
8095         * elf-bfd.h (bfd_elf32_print_symbol, bfd_elf64_print_symbol,
8096         bfd_elf32_link_record_dynamic_symbol,
8097         bfd_elf64_link_record_dynamic_symbol,
8098         _bfd_elf_link_record_dynamic_symbol, bfd_elf32_bfd_final_link,
8099         bfd_elf64_bfd_final_link, elf_link_record_local_dynamic_symbol,
8100         _bfd_elf32_link_record_local_dynamic_symbol,
8101         _bfd_elf64_link_record_local_dynamic_symbol,
8102         _bfd_elf32_gc_sections, _bfd_elf32_gc_common_finalize_got_offsets,
8103         _bfd_elf32_gc_common_final_link, _bfd_elf64_gc_common_final_link,
8104         _bfd_elf32_gc_record_vtinherit, _bfd_elf32_gc_record_vtentry,
8105         _bfd_elf64_gc_sections, _bfd_elf64_gc_common_finalize_got_offsets,
8106         _bfd_elf64_gc_record_vtinherit, _bfd_elf64_gc_record_vtentry,
8107         _bfd_elf32_reloc_symbol_deleted_p,
8108         _bfd_elf64_reloc_symbol_deleted_p): Delete.
8109         (bfd_elf_link_record_dynamic_symbol,
8110         bfd_elf_link_record_local_dynamic_symbol,
8111         bfd_elf_final_link, bfd_elf_gc_sections,
8112         bfd_elf_gc_record_vtinherit, bfd_elf_gc_record_vtentry,
8113         bfd_elf_gc_common_finalize_got_offsets, bfd_elf_gc_common_final_link,
8114         bfd_elf_reloc_symbol_deleted_p): Declare.
8115         (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
8116         * elf32-arm.h: Update for changed function names.  Remove local
8117         WILL_CALL_FINISH_DYNAMIC_SECTION define.
8118         * elf-hppa.h, elf-m10300.c, elf32-cris.c, elf32-d10v.c, elf32-dlx.c,
8119         * elf32-fr30.c, elf32-frv.c, elf32-h8300.c, elf32-hppa.c, elf32-i386.c,
8120         * elf32-iq2000.c, elf32-m32r.c, elf32-m68hc1x.c, elf32-m68k.c,
8121         * elf32-mcore.c, elf32-openrisc.c, elf32-ppc.c, elf32-s390.c,
8122         * elf32-sh.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
8123         * elf32-xstormy16.c, elf32-xtensa.c, elf64-alpha.c, elf64-hppa.c,
8124         * elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c, elf64-sparc.c,
8125         * elf64-x86-64.c, elfxx-ia64.c, elfxx-mips.c, elfxx-target.h: Likewise.
8126         * elfxx-target.h (bfd_elfNN_bfd_final_link): Define.
8127         (bfd_elfNN_print_symbol): Define.
8128         * elfcode.h: Don't include elflink.h.
8129         (elf_bfd_discard_info, elf_reloc_symbol_deleted_p,
8130         elf_link_record_dynamic_symbol, elf_bfd_final_link, elf_gc_sections,
8131         elf_gc_common_finalize_got_offsets, elf_gc_common_final_link,
8132         elf_gc_record_vtinherit, elf_gc_record_vtentry,
8133         elf_link_record_local_dynamic_symbol): Don't define.
8134         * elflink.c: Update for changed function names.  Move elflink.h
8135         code here.
8136         * elflink.h: Delete file.
8137         * po/SRC-POTFILES.in: Regenerate.
8138         * po/bfd.pot: Regenerate.
8140 2004-03-27  Alan Modra  <amodra@bigpond.net.au>
8142         * elf64-mmix.c (mmix_elf_relocate_section): Restore code setting
8143         "name" for global syms accidentally removed in 2004-03-20 change.
8145 2004-03-27  Alan Modra  <amodra@bigpond.net.au>
8147         * elf-bfd.h (struct elf_reloc_cookie): Add r_sym_shift field.
8148         * elflink.h: Replace all occurrences of sizeof (Elf_External_*)
8149         where Elf_External_* is different for 64 and 32 bit, with
8150         corresponding elf_size_info field.
8151         (struct elf_final_link_info): Use "bfd_byte *" instead
8152         of "Elf_External_Sym *" for external_syms and symbuf.
8153         (elf_link_adjust_relocs): Set up r_type_mask and r_sym_shift local
8154         vars and use instead of ELF_R_INFO and ELF_R_TYPE macros.
8155         (struct elf_link_sort_rela): Add "sym_mask" alias for "offset".
8156         (elf_link_sort_cmp1): Use sym_mask field instead of ELF_R_SYM.
8157         (elf_link_sort_cmp2): Adjust.
8158         (elf_link_sort_relocs): Set up r_sym_mask local var instead of
8159         using ELF_R_SYM macro.  Set u.sym_mask.
8160         (elf_bfd_final_link): Call _bfd_elf_stringtab_init instead of macro
8161         version, elf_stringtab_init.  Ditto for bfd_section_from_elf_index
8162         vs. section_from_elf_index.  Adjust Elf_External_Sym pointer
8163         arithmetic.  Pass bed to elf_link_flush_output_syms.  Adjust
8164         Elf_External_Dyn pointer arithmentic.  Use bed swap_dyn_in and
8165         swap_syn_out functions.  Rearrange dyn swap in/out switch.
8166         (elf_link_output_sym): Adjust Elf_External_Sym pointer arithmentic.
8167         Pass bed to elf_link_flush_output_syms.  Use bed swap_symbol_out.
8168         (elf_link_flush_output_syms): Add elf_backend_data arg.
8169         (elf_link_check_versioned_symbol): Likewise.
8170         (elf_link_output_extsym): Pass bed to elf_link_check_versioned_symbol.
8171         Adjust Elf_External_Sym pointer arithmetic.  Use bed swap_symbol_out.
8172         (elf_link_input_bfd): Use bfd_section_from_elf_index.  Set up
8173         r_type_mask and r_sym_shift local vars and use instead of ELF_R_SYM,
8174         ELF_R_TYPE and ELF_R_INFO macros.
8175         (elf_reloc_link_order): Select ELF32_R_INFO or ELF64_R_INFO invocation
8176         based on size rather than using ELF_R_INFO.
8177         (elf_gc_mark): Set up r_sym_shift local var and use instead of
8178         ELF_R_SYM macro.
8179         (struct alloc_got_off_arg): New.
8180         (elf_gc_common_finalize_got_offsets): Use elf_size_info instead of
8181         ARCH_SIZE.  Pass get entry size down to elf_gc_allocate_got_offsets.
8182         (elf_gc_allocate_got_offsets): Adjust.
8183         (elf_reloc_symbol_deleted_p): Usee cookie.r_sym_shift instead of
8184         ELF_R_SYM.  Use bfd_section_from_elf_index.
8185         (elf_bfd_discard_info): Set cookie.r_sym_shift.
8186         * elfcode.h (elf_stringtab_init, section_from_elf_index): Delete.
8187         (elf_slurp_symbol_table): Use bfd_section_from_elf_index.
8189 2004-03-26  Stan Shebs  <shebs@apple.com>
8191         Remove MPW support, no longer used.
8192         * config.bfd (powerpc-*-mpw*): Remove configuration.
8193         * mpw-config.in, mpw-make.sed: Remove files.
8194         * ecoffswap.h [MPW_C]: Remove MPW-C-friendly version of code.
8196 2004-03-26  Alan Modra  <amodra@bigpond.net.au>
8198         * elf64-ppc.c (elf_backend_add_symbol_hook): Define.
8199         (ppc64_elf_add_symbol_hook): New function.
8200         * elf-bfd.h (struct elf_backend_data <elf_add_symbol_hook>): Remove
8201         const from Elf_Internal_Sym param.
8202         * elflink.c (elf_link_add_object_symbols): Adjust.
8203         * elf-hppa.h (elf_hppa_add_symbol_hook): Adjust.
8204         * elf32-frv.c (elf32_frv_add_symbol_hook): Adjust.
8205         * elf32-i370.c (elf_backend_add_symbol_hook): Adjust.
8206         * elf32-m32r.c (m32r_elf_add_symbol_hook): Adjust.
8207         * elf32-m68hc1x.c (elf32_m68hc11_add_symbol_hook): Adjust.
8208         * elf32-m68hc1x.h (elf32_m68hc11_add_symbol_hook): Adjust.
8209         * elf32-ppc.c (ppc_elf_add_symbol_hook): Adjust.
8210         * elf32-sh64.c (sh64_elf_add_symbol_hook): Adjust.
8211         * elf32-v850.c (v850_elf_add_symbol_hook): Adjust.
8212         * elf64-alpha.c (elf64_alpha_add_symbol_hook): Adjust.
8213         * elf64-mmix.c (mmix_elf_add_symbol_hook): Adjust.
8214         * elf64-sh64.c (sh64_elf64_add_symbol_hook): Adjust.
8215         * elf64-sparc.c (sparc64_elf_add_symbol_hook): Adjust.
8216         * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Adjust.
8217         * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Adjust.
8218         * elfxx-mips.h (_bfd_mips_elf_add_symbol_hook): Adjust.
8220 2004-03-26  Alan Modra  <amodra@bigpond.net.au>
8222         * elfxx-target.h (bfd_elfNN_bfd_link_add_symbols): Define.
8223         * elf-bfd.h (_bfd_elf_link_add_archive_symbols): Delete.
8224         (_bfd_elf_sort_symbol, _bfd_elf_add_dt_needed_tag): Delete.
8225         (_bfd_elf_finalize_dynstr, bfd_elf32_bfd_link_add_symbols): Delete.
8226         (bfd_elf64_bfd_link_add_symbols): Delete.
8227         (bfd_elf_link_add_symbols): Declare.
8228         * elfcode.h (elf_bfd_link_add_symbols): Delete.
8229         * elflink.c: Include safe-ctype.h.
8230         (elf_add_dt_needed_tag): Rename from _bfd_elf_add_dt_needed_tag,
8231         make static.
8232         (elf_sort_symbol): Rename from _bfd_elf_sort_symbol, make static.
8233         (elf_finalize_dynstr): Rename from _bfd_elf_finalize_dynstr, make
8234         static.
8235         (elf_link_add_archive_symbols): Rename from
8236         _bfd_elf_link_add_archive_symbols, make static.
8237         (elf_link_add_object_symbols): New function.  Corresponding
8238         elflink.h function converted to use elf_size_info.
8239         (bfd_elf_link_add_symbols): Likewise.
8240         (bfd_elf_size_dynamic_sections): Adjust.
8241         * elflink.h (elf_bfd_link_add_symbols): Delete.
8242         (elf_link_add_object_symbols): Delete.
8243         * elf32-gen.c (elf32_generic_link_add_symbols): Call
8244         bfd_elf_link_add_symbols.
8245         * elf64-gen.c (elf64_generic_link_add_symbols): Likewise.
8247 2004-03-25  Alan Modra  <amodra@bigpond.net.au>
8249         * elflink.h (elf_link_add_object_symbols): Add DT_NEEDED for as-needed
8250         and chained shared libs only if dynsym.  Clear dynsym on forced-local.
8252         * elf-bfd.h (_bfd_elf_add_dynamic_entry): Declare.
8253         (bfd_elf32_add_dynamic_entry, bfd_elf64_add_dynamic_entry): Delete.
8254         (_bfd_elf_add_dt_needed_tag): Declare.
8255         (_bfd_elf_sort_symbol): Declare.
8256         (_bfd_elf_finalize_dynstr): Declare.
8257         (RELOC_FOR_GLOBAL_SYM): Formatting.
8258         * elfcode.h (elf_add_dynamic_entry): Delete.
8259         * elflink.c (_bfd_elf_add_dynamic_entry): New function.  Corresponding
8260         elflink.h function converted to use elf_size_info.
8261         (_bfd_elf_add_dt_needed_tag): Likewise.
8262         (_bfd_elf_sort_symbol): Likewise.
8263         (_bfd_elf_finalize_dynstr): Likewise.
8264         (compute_bucket_count): Likewise.
8265         (bfd_elf_size_dynamic_sections): Likewise.  Check result of
8266         _bfd_elf_strtab_add before calling _bfd_elf_strtab_addref.
8267         (elf_adjust_dynstr_offsets, elf_collect_hash_codes): Moved from..
8268         * elflink.h: ..here.
8269         (sort_symbol, add_dt_needed_tag): Delete.
8270         (elf_add_dynamic_entry, elf_finalize_dynstr): Delete.
8271         (compute_bucket_count, NAME(bfd_elf,size_dynamic_sections)): Delete.
8272         Update all users.
8273         * elf32-arm.h (add_dynamic_entry): Update.  Remove casts.
8274         * elf32-cris.c (add_dynamic_entry): Likewise.
8275         * elf32-hppa.c (add_dynamic_entry): Likewise.
8276         * elf32-i370.c (add_dynamic_entry): Likewise.
8277         * elf32-i386.c (add_dynamic_entry): Likewise.
8278         * elf32-m32r.c (add_dynamic_entry): Likewise.
8279         * elf32-m68k.c (add_dynamic_entry): Likewise.
8280         * elf32-ppc.c (add_dynamic_entry): Likewise.
8281         * elf32-s390.c (add_dynamic_entry): Likewise.
8282         * elf32-sh.c (add_dynamic_entry): Likewise.
8283         * elf32-sparc.c (add_dynamic_entry): Likewise.
8284         * elf32-vax.c (add_dynamic_entry): Likewise.
8285         * elf32-xtensa.c (add_dynamic_entry): Likewise.
8286         * elf64-alpha.c (add_dynamic_entry): Likewise.
8287         * elf64-hppa.c (add_dynamic_entry): Likewise.
8288         * elf64-ppc.c (add_dynamic_entry): Likewise.
8289         * elf64-s390.c (add_dynamic_entry): Likewise.
8290         * elf64-sparc.c (add_dynamic_entry): Likewise.
8291         * elf64-x86-64.c (add_dynamic_entry): Likewise.
8292         * elfxx-ia64.c (add_dynamic_entry): Likewise.
8293         * elfxx-mips.c (MIPS_ELF_ADD_DYNAMIC_ENTRY): Likewise.
8294         * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
8295         * elf32-frv.c (elf32_frv_size_dynamic_sections): Likewise.
8296         * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
8298 2004-03-23  Paul Brook  <paul@codesourcery.com>
8300         * elf32-arm.h (arm_print_private_bfd_data): Add EABI v3.
8302 2004-03-22  Bob Wilson  <bob.wilson@acm.org>
8304         * elf32-xtensa.c (elf_xtensa_check_relocs): Remove code to read
8305         literal tables and check for relocs outside of literal pools.
8306         (elf_xtensa_make_sym_local): Don't clear ELF_LINK_NON_GOT_REF flag.
8307         (elf_xtensa_fix_refcounts): Don't check ELF_LINK_NON_GOT_REF or
8308         set DF_TEXTREL.
8309         (elf_xtensa_size_dynamic_sections): Don't add DT_TEXTREL entry.
8310         (elf_xtensa_relocate_section): Read literal tables and check for
8311         dynamic relocations in read-only sections and not in literal pools.
8313 2004-03-23  Alan Modra  <amodra@bigpond.net.au>
8315         PR 51.
8316         * linker.c (bfd_wrapped_link_hash_lookup): Handle info->wrap_char.
8318 2004-03-22  Hans-Peter Nilsson  <hp@axis.com>
8320         * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOTPLT,
8321         R_CRIS_16_GOTPLT>: Also error if there's no PLT for a symbol
8322         not defined by the executable, or defined in a DSO.
8323         <eliding run-time relocation of .got>: Initialize GOT entry for a
8324         function symbol or ELF_LINK_HASH_NEEDS_PLT statically in an
8325         executable.
8326         (cris_elf_gc_sweep_hook): Improve fallthrough marking.
8327         (elf_cris_try_fold_plt_to_got): Improve head comment.  Do not fold
8328         a PLT reloc to GOT for an executable.
8329         (elf_cris_adjust_dynamic_symbol): Only fold a .got.plt entry with
8330         .got for a DSO and explain why.
8331         (elf_cris_discard_excess_program_dynamics): Also lose GOT-relocs
8332         and unreferenced symbols for which a PLT is defined.  Adjust
8333         dynamic-symbol pruning correspondingly, to make sure we don't lose
8334         a dynamic symbol also defined by a DSO.
8336 2004-03-22  Alan Modra  <amodra@bigpond.net.au>
8338         * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Add input_bfd, input_section
8339         and rel args.  Group input and output args.  Wrap to 80 columns.
8340         * elf-m10200.c, elf-m10300.c, elf32-arm.h, elf32-avr.c,
8341         elf32-cris.c, elf32-d10v.c, elf32-fr30.c, elf32-h8300.c,
8342         elf32-hppa.c, elf32-i386.c, elf32-i860.c, elf32-ip2k.c,
8343         elf32-iq2000.c, elf32-m68hc1x.c, elf32-m68k.c, elf32-mcore.c,
8344         elf32-msp430.c, elf32-openrisc.c, elf32-ppc.c, elf32-s390.c,
8345         elf32-sparc.c, elf32-v850.c, elf32-vax.c, elf32-xstormy16.c,
8346         elf32-xtensa.c, elf64-alpha.c, elf64-mmix.c, elf64-ppc.c,
8347         elf64-s390.c, elf64-sparc.c, elf64-x86-64.c, elfxx-ia64.c: Update
8348         RELOC_FOR_GLOBAL_SYMBOL invocation.
8350 2004-03-20  H.J. Lu  <hongjiu.lu@intel.com>
8352         * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Report error if
8353         unresolved symbols in objects aren't allowed.
8355         * elf-hppa.h (elf_hppa_relocate_section): Properly handle
8356         unresolved symbols.
8357         (elf_hppa_remark_useless_dynamic_symbols): Likewise.
8358         (elf_hppa_unmark_useless_dynamic_symbols):
8359         * elf32-frv.c (elf32_frv_relocate_section): Likewise.
8360         * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
8361         (elf32_hppa_relocate_section): Likewise.
8362         * elf32-i370.c (i370_elf_relocate_section): Likewise.
8363         * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
8364         * elf32-sh.c (sh_elf_relocate_section): Likewise.
8365         * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
8366         * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
8368         * elf-m10200.c (mn10200_elf_relocate_section): Use
8369         RELOC_FOR_GLOBAL_SYMBOL.
8370         * elf32-avr.c (elf32_avr_relocate_section): Likewise.
8371         * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
8372         * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
8373         * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
8374         * elf32-i860.c (elf32_i860_relocate_section): Likewise.
8375         * elf32-m68hc1x.c (m68hc11_get_relocation_value): Likewise.
8376         * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
8377         * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
8378         * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
8379         * elf32-v850.c (v850_elf_relocate_section): Likewise.
8380         * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
8381         * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
8383 2004-03-19  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
8385         * elf32-hppa.c (elf32_hppa_check_relocs): Handle R_PARISC_PCREL32.
8386         (final_link_relocate): Likewise.
8387         * elf-hppa.h (elf_hppa_reloc_final_type): Handle selectors for
8388         R_PARISC_PCREL32 and R_PARISC_PCREL64 relocations.
8390 2004-03-19  Alan Modra  <amodra@bigpond.net.au>
8392         * Makefile.am: Run "make dep-am".
8393         * Makefile.in: Regenerate.
8394         * aclocal.m4: Regenerate.
8395         * config.in: Regenerate.
8396         * po/bfd.pot: Regenerate.
8398 2004-03-19  Alan Modra  <amodra@bigpond.net.au>
8399             H.J. Lu  <hongjiu.lu@intel.com>
8401         * elflink.c (_bfd_elf_merge_symbol): Revert last change.  Move
8402         type and size change code to where it was previously.  Remove
8403         dt_needed param.  Treat old weak syms as strong if new sym is
8404         from a shared lib, even when old sym is from another shared
8405         lib.  Remove unnecessary tests of oldweak and newweak.  Correct
8406         comments.
8407         (_bfd_elf_add_default_symbol): Remove dt_needed param.  Update
8408         _bfd_elf_merge_symbol calls.
8409         * elflink.h (elf_link_add_object_symbols): Update calls.  Remove
8410         dt_needed local var.  Update comments.
8411         * elf-bfd.h (_bfd_elf_merge_symbol): Update prototype.
8412         (_bfd_elf_add_default_symbol): Likewise.
8414         * elflink.c (_bfd_elf_merge_symbol): Reinstate code to handle
8415         strong syms in one shared object overriding weak syms in another.
8417 2004-03-18  Alan Modra  <amodra@bigpond.net.au>
8419         * elf-bfd.h (struct elf_obj_tdata): Delete dt_soname field.  Add
8420         dyn_lib_class field.  Rearrange for better packing.
8421         (elf_dt_soname): Delete.
8422         (elf_dyn_lib_class): Define.
8423         * elf.c (bfd_elf_set_dt_needed_name): Update comment.
8424         (bfd_elf_set_dt_needed_soname): Delete.
8425         (bfd_elf_set_dyn_lib_class): New function.
8426         * elflink.h (add_dt_needed_tag): New function.  Split out from..
8427         (elf_link_add_object_symbols): ..here.  Rename "name" to "soname".
8428         Use elf_dyn_lib_class to set dt_needed and add_needed.  Move fallback
8429         initialization of soname.
8430         (elf_link_check_versioned_symbol): Test elf_dyn_lib_class instead of
8431         elf_dt_soname.
8432         * bfd-in.h (enum dynamic_lib_link_class): New.
8433         (bfd_elf_set_dt_needed_soname): Delete.
8434         (bfd_elf_set_dyn_lib_class): Declare.
8435         * bfd-in2.h: Regenerate.
8437         * elflink.c (_bfd_elf_merge_symbol): Rewrite weak symbol handling.
8438         (_bfd_elf_add_default_symbol): Remove indirect BFD_ASSERTs.
8439         * elflink.h (elf_link_add_object_symbols): Don't clear dt_needed in
8440         symbol loop.  Instead use add_needed to flag tag as written.
8442 2004-03-17  Nathan Sidwell  <nathan@codesourcery.com>
8444         * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Correct
8445         logic for null_input_bfd detection.
8447 2004-03-17  Ralf Corsepius <corsepiu@faw.uni-ulm.de>
8449         * config.bfd: Switch sh-*-rtems* to ELF.  Add sh-*-rtemscoff*.
8451 2004-03-16  Mark Kettenis  <kettenis@gnu.org>
8453         * netbsd-core.c (netbsd_core_file_p) [CORE_FPU_OFFSET]: Remove
8454         code.
8456 2004-03-16  Alan Modra  <amodra@bigpond.net.au>
8458         * elflink.c (elf_link_read_relocs_from_section): Don't use
8459         NUM_SHDR_ENTRIES in end of reloc calc.  Move NULL shdr check..
8460         (_bfd_elf_link_read_relocs): ..to here.
8461         * elf32-ppc.c (ppc_elf_relax_section): Formatting.
8463 2004-03-16  Alan Modra  <amodra@bigpond.net.au>
8465         * configure.in (HOST_64BIT_TYPE, HOST_U_64BIT_TYPE): Don't override
8466         values selected in configure.host.  Require both to be defined
8467         before setting BFD_HOST_64_BIT_DEFINED.  Protect assignment to
8468         corresponding BFD_HOST vars with quotes.
8469         <${host64}-${target64}-${want64} in *true*>: Don't exempt gcc;
8470         Always require BFD_HOST_64_BIT_DEFINED.
8471         <file_ptr type>: Find off_t size before emitting message.  Combine
8472         off_t and ftello64 conditional.
8473         * configure: Regenerate.
8475 2004-03-16  Alan Modra  <amodra@bigpond.net.au>
8477         * elf32-m32r.c (m32r_elf_create_dynamic_sections): Fix pointer
8478         aliasing warning.  Remove trailing whitespace throughout file.
8480 2004-03-15  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
8482         * elf-hppa.h (elf_hppa_relocate_section): Pass input_bfd instead of
8483         input_section in calls to get_dyn_name.
8484         * elf64-hppa.c (get_dyn_name): Change type of first argument to "bfd *".        Use section id of first section in input BFD to build dynamic name for
8485         local symbols.
8486         (elf64_hppa_check_relocs): Pass abfd in call to get_dyn_name.
8488 2004-03-15  Alan Modra  <amodra@bigpond.net.au>
8490         * bfd-in.h (bfd_int64_t, bfd_uint64_t): New types.
8491         (BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Don't define here.
8492         (bfd_getb64, bfd_getl64, bfd_get_bits): Return bfd_uint64_t.
8493         (bfd_getb_signed_64, bfd_getl_signed_64): Return bfd_int64_t.
8494         (bfd_putb64, bfd_putl64, bfd_put_bits): Accept bfd_uint64_t.
8495         * configure.in (HOST_U_64BIT_TYPE): Set when sizeof long is 8.
8496         (BFD_HOST_64_BIT_DEFINED, BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Set
8497         when using long.
8498         * libbfd.c (EIGHT_GAZILLION, COERCE64): Use bfd_int64_t.
8499         (bfd_getb64): Return bfd_uint64_t.  Enable when BFD_HOST_64_BIT.
8500         (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
8501         (bfd_putb64): Accept bfd_uint64_t.  Enable when BFD_HOST_64_BIT.
8502         (bfd_putl64, bfd_put_bits, bfd_get_bits): Likewise.
8503         * dwarf2.c (struct attribute): Use bfd_int64_t and bfd_uint64_t.
8504         (read_8_bytes, read_indirect_string, read_address): Likewise.
8505         (read_abbrevs, parse_comp_unit): Likewise.
8506         * targets.c (struct bfd_target): Likewise.
8507         * aix386-core.c (NO_GET64, NO_PUT64, NO_GETS64): Define and use.
8508         * hppabsd-core.c: Likewise.  Formatting.
8509         * hpux-core.c: Likewise.
8510         * irix-core.c: Likewise.
8511         * netbsd-core.c: Likewise.
8512         * osf-core.c: Likewise.
8513         * ptrace-core.c: Likewise.
8514         * sco5-core.c: Likewise.
8515         * trad-core.c: Likewise.
8516         * configure: Regenerate.
8517         * bfd-in2.h: Regenerate.
8519 2004-03-15  Alan Modra  <amodra@bigpond.net.au>
8521         * bfd-in.h (bfd_getb64, bfd_getl64): Replace bfd_byte* with void*.
8522         (bfd_getb32, bfd_getl32, bfd_getb16, bfd_getl16): Likewise.
8523         (bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
8524         (bfd_getb_signed_32, bfd_getl_signed_32): Likewise.
8525         (bfd_getb_signed_16, bfd_getl_signed_16): Likewise.
8526         (bfd_putb64, bfd_putl64, bfd_putb32, bfd_putl32): Likewise.
8527         (bfd_putb16, bfd_putl16, bfd_get_bits, bfd_put_bits): Likewise.
8528         * libbfd.c: Likewise in function definitions.
8529         (bfd_put_8): Mask with 0xff rather than casting to char.
8530         (bfd_putb16, bfd_putl16, bfd_putb32, bfd_putl32): Likewise.
8531         (bfd_putb64, bfd_putl64, bfd_put_bits): Likewise.
8532         (H_PUT_64, H_PUT_32, H_PUT_16, H_PUT_8): Remove casts, simplify.
8533         (H_PUT_S64, H_PUT_S32, H_PUT_S16, H_PUT_S8): Likewise.
8534         (H_GET_64, H_GET_32, H_GET_16, H_GET_8): Likewise.
8535         (H_GET_S64, H_GET_S32, H_GET_S16, H_GET_S8): Likewise.
8536         * libaout.h (H_PUT_64 H_PUT_32, H_PUT_16): Remove casts, simplify.
8537         (H_PUT_S64, H_PUT_S32, H_PUT_S16): Likewise.
8538         (H_GET_64, H_GET_32, H_GET_16): Likewise.
8539         (H_GET_S64, H_GET_S32, H_GET_S16): Likewise.
8540         * archive.c (do_slurp_coff_armap): Update swap prototype.
8541         * coff-tic54x.c (tic54x_getl32): Replace bfd_byte* with void*.
8542         (tic54x_getl_signed_32): Likewise.
8543         (tic54x_putl32): Likewise.  Mask with 0xff rather than casting to char.
8544         * mach-o.c (bfd_mach_o_read_header): Update get32 prototype.
8545         * pdp11.c (bfd_getp32): Make static, replace bfd_byte* with void*.
8546         (bfd_getp_signed_32, bfd_putp32): Likewise.
8547         * targets.c (struct bfd_target): Use void* in place of bfd_byte* for
8548         bfd_getx64, bfd_getx_signed_64, bfd_putx64, bfd_getx32,
8549         bfd_getx_signed_32, bfd_putx32, bfd_getx16, bfd_getx_signed_16,
8550         bfd_putx16, bfd_h_getx64, bfd_h_getx_signed_64, bfd_h_putx64,
8551         bfd_h_getx32, bfd_h_getx_signed_32, bfd_h_putx32, bfd_h_getx16,
8552         bfd_h_getx_signed_16, bfd_h_putx16.
8553         * aix386-core.c (NO_GET, NO_GETS, NO_PUT): Update prototypes.
8554         * hppabsd-core.c: Similarly.  Rename NO_SIGNED_GET to NO_GETS.
8555         * hpux-core.c: Likewise.
8556         * irix-core.c: Likewise.
8557         * netbsd-core.c: Likewise.
8558         * osf-core.c: Likewise.
8559         * ptrace-core.c: Likewise.
8560         * sco5-core.c: Likewise.
8561         * trad-core.c: Likewise.
8562         * bfd-in2.h: Regenerate.
8564 2004-03-15  Matt Thomas  <matt@3am-software.com>
8566         * config.bfd: Add x86-64 vector to NetBSD/i386 if 64bit BFD is
8567         selected.
8569 2004-03-13  Mark Kettenis  <kettenis@gnu.org>
8571         * config.bfd: Add x86_64-*-openbsd*.
8572         * configure.in (x86_64-*-openbsd*): Set COREFILE to
8573         netbsd-core.lo.
8574         * configure: Regenerate.
8576 2004-03-12  Nick Clifton  <nickc@redhat.com>
8577             Dave Murphy  <wintermute2k4@ntlworld.com>
8579         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Skip most checks
8580         if the input bfd does not contain any code.
8582 2004-03-09  Steve Ellcey  <sje@cup.hp.com>
8584         * elfxx-ia64.c (plt_full_entry): Change ld8 to ld8.acq.
8586 2004-03-05  Fred Fish  <fnf@redhat.com>
8588         * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Just force
8589         mips16 symbols to be even rather than testing first for even/odd.
8590         (_bfd_mips_elf_link_output_symbol_hook): Ditto.
8592 2004-03-05  Nathan Sidwell  <nathan@codesourcery.com>
8594         * elf.c (map_sections_to_segments): Ignore .tbss sections for
8595         layout purposes.
8597 2004-03-03  Alexandre Oliva  <aoliva@redhat.com>
8599         * elflink.c (bfd_elf_record_link_assignment): Mark undefweak and
8600         undefined symbols as hash_new.
8602 2003-03-03  Andrew Stubbs  <andrew.stubbs@superh.com>
8604         * archures.c: Add bfd_mach_sh4_nommu_nofpu.
8605         * cpu-sh.c: Ditto.
8606         * elf32-sh.c: Ditto.
8607         * bfd-in2.h: Regenerate.
8609 2004-03-02  Alexandre Oliva  <aoliva@redhat.com>
8611         * elf32-frv.c (struct frv_pic_relocs_info): Added fixups and
8612         dynrelocs.
8613         (_frv_count_got_plt_entries): Initialize them.
8614         (frv_pic_relocs_info_find): Add insert argument.  Adjust all
8615         callers.
8616         (frv_pic_relocs_info_for_global): Likewise.
8617         (frv_pic_relocs_info_for_local): Likewise.
8618         (frv_pic_merge_early_relocs_info): New.
8619         (_frv_resolve_final_relocs_info): Use it in case one entry maps to
8620         another.
8621         (_frv_add_dyn_reloc): Add entry argument.  Adjust all callers.
8622         Check that we don't exceed the allocated count for entry.
8623         (_frv_add_rofixup): Likewise.
8624         (_frv_emit_got_relocs_plt_entries): Adjust for coding standards.
8625         (elf32_frv_finish_dynamic_sections): Improve error message in case
8626         we emit too few rofixup entries.
8628 2004-03-01  Richard Sandiford  <rsandifo@redhat.com>
8630         * archures.c (bfd_mach_fr450): New.
8631         * bfd-in2.h: Regenerate.
8632         * cpu-frv.c (arch_info_450): New bfd_arch_info_type.
8633         (arch_info_500): Link to it.
8634         * elf32-frv.c (elf32_frv_machine, frv_elf_merge_private_bfd_data)
8635         (frv_elf_print_private_bfd_data): Handle fr405 and fr450 header flags.
8636         (frv_elf_arch_extension_p): New function.
8637         (frv_elf_merge_private_bfd_data): Use it.
8639 2004-02-28  H.J. Lu  <hongjiu.lu@intel.com>
8641         * elf-bfd.h (_bfd_elf_link_add_archive_symbols): New prototype.
8643         * elflink.h (is_global_data_symbol_definition): Moved to
8644         elflink.c.
8645         (elf_link_is_defined_archive_symbol): Likewise.
8646         (elf_link_add_archive_symbols): Likewise. Renamed to
8647         _bfd_elf_link_add_archive_symbols.
8649         * elflink.c (elf_link_is_defined_archive_symbol): Get the size
8650         of ELF symbol table entry from backend.
8651         (_bfd_elf_link_add_archive_symbols): Call bfd_link_add_symbols
8652         instead of elf_link_add_object_symbols.
8654 2004-02-27  Alexandre Oliva  <aoliva@redhat.com>
8656         * elf-bfd.h (struct elf_backend_data): Added
8657         elf_backend_can_make_relative_eh_frame,
8658         elf_backend_can_make_lsda_relative_eh_frame and
8659         elf_backend_encode_eh_address.
8660         (_bfd_elf_encode_eh_address): Declare.
8661         (_bfd_elf_can_make_relative): Declare.
8662         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use new
8663         hooks to decide whether to attempt to make_relative and
8664         make_lsda_relative.
8665         (_bfd_elf_write_section_eh_frame_hdr): Call encode_eh_address.
8666         (_bfd_elf_can_make_relative): New.
8667         (_bfd_elf_encode_eh_address): New.
8668         * elf32-frv.c (frv_elf_use_relative_eh_frame): New.
8669         (frv_elf_encode_eh_address): New.
8670         (elf_backend_can_make_relative_eh_frame): Define.
8671         (elf_backend_can_make_lsda_relative_eh_frame): Define.
8672         (elf_backend_encode_eh_address): Define.
8673         * elfxx-target.h
8674         (elf_backend_can_make_relative_eh_frame): Define.
8675         (elf_backend_can_make_lsda_relative_eh_frame): Define.
8676         (elf_backend_encode_eh_address): Define.
8677         (elfNN_bed): Add them.
8679 2004-02-27  Alexandre Oliva  <aoliva@redhat.com>
8681         * elf32-frv.c (elf32_frv_howto_table) <R_FRV_LABEL16>: Set
8682         complain_on_overflow to signed.
8684 2004-02-27  H.J. Lu  <hongjiu.lu@intel.com>
8686         * elflink.h (sort_symbol): New.
8687         (elf_link_add_object_symbols): Use a sorted symbol array for
8688         weakdef.
8690 2004-02-27  Jakub Jelinek  <jakub@redhat.com>
8692         * elf32-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
8693         for pc relative relocs.
8694         (elf_s390_relocate_section): Likewise.
8695         * elf64-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
8696         for pc relative relocs.
8697         (elf_s390_relocate_section): Likewise.
8699 2004-02-26  H.J. Lu  <hongjiu.lu@intel.com>
8701         * elfxx-ia64.c (elfNN_ia64_check_relocs): Fix call to
8702         count_dyn_reloc.
8704 2004-02-25  H.J. Lu  <hongjiu.lu@intel.com>
8706         * elfxx-ia64.c (elfNN_ia64_dyn_reloc_entry): Add the reltext.
8707         field to track if a relocation is against readonly section.
8708         (count_dyn_reloc): Take a new argument for rent->reltext.
8709         (elfNN_ia64_check_relocs): Adjust call to count_dyn_reloc.
8710         (get_reloc_section): Don't set ia64_info->reltext here.
8711         (allocate_dynrel_entries): Set ia64_info->reltext here.
8713 2004-02-24  Alexandre Oliva  <aoliva@redhat.com>
8715         * elf32-frv.c (FRV_SYM_LOCAL): Weak undefined doesn't imply local.
8716         (_frv_emit_got_relocs_plt_entries): Decay relocation to protected
8717         function's descriptor to symbol+offset, and map local undefweak
8718         symbol to NULL function descriptor.
8719         (elf32_frv_relocate_section): Likewise.
8721 2004-02-23  Mark Kettenis  <kettenis@gnu.org>
8723         * libaout.h (enum machine_type): Add M_SPARC64_NETBSD and
8724         M_X86_64_NETBSD.
8725         * netbsd-core.c (M_SPARC64_OPENBSD): Define.
8726         (netbsd_core_file_p): Set architecture from machine ID for
8727         selected machines.
8729 2004-02-23  Jakub Jelinek  <jakub@redhat.com>
8731         * elflink.h (size_dynamic_sections): If not adding DT_FLAGS and
8732         DF_BIND_NOW is set in info->flags, create DT_BIND_NOW dynamic entry.
8734 2004-02-21  H.J. Lu  <hongjiu.lu@intel.com>
8736         * elflink.c (_bfd_elf_merge_symbol): Properly handle undefined
8737         symbols with non-default visibility.
8739 2004-02-21  Danny Smith  <daanysmith@users.sourceforge.net>
8741         * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Clear
8742         IMAGE_SCN_MEM_WRITE on known sections only.
8744 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
8746         * elf32-ppc.c (allocate_dynrelocs): Create dynsym for undef weak
8747         symbols used in PIE relocs.
8749 2004-02-19  Jakub Jelinek  <jakub@redhat.com>
8751         * elf32-sparc.c (elf32_sparc_finish_dynamic_sections): Clear
8752         .plt sh_entsize.
8754 2004-02-18  Daniel Jacobowitz  <drow@mvista.com>
8756         * configure.in: Update version to 2.15.90.
8757         * configure: Regenerate.
8759 2004-02-17  Daniel Jacobowitz  <drow@mvista.com>
8760             Richard Sandiford  <rsandifo@redhat.com>
8762         * elfxx-mips.c (mips_elf_calculate_relocation): Use
8763         _bfd_elf_symbol_refs_local_p to decide whether to decay
8764         a GOT_PAGE/GOT_OFST pair to GOT_DISP/addend.
8765         (_bfd_mips_elf_check_relocs): Add a global GOT entry for GOT_PAGE
8766         relocs if the symbol wasn't defined by a regular object file.
8767         Don't check the symbol's dynindx.
8769 2004-02-16  Andrew Cagney  <cagney@redhat.com>
8771         * bfd-in.h (file_ptr, ufile_ptr): Configure type using
8772         @bfd_file_ptr@.
8773         * bfd-in2.h: Re-generate.
8775 2004-02-14  Andrew Cagney  <cagney@redhat.com>
8777         * configure.host (HDEFINES): When hppa*-*-hpux*, define
8778         _LARGEFILE64_SOURCE.
8780 2004-02-13  Andrew Cagney  <cagney@redhat.com>
8782         * elf.c (vma_page_aligned_bias): New function.
8783         (assign_file_positions_except_relocs)
8784         (assign_file_positions_for_segments): Replace broken modulo
8785         arithmetic with call to vma_page_aligned_bias.
8787 2004-02-11  Andrew Cagney  <cagney@redhat.com>
8789         * bfd-in.h: Update copyright.
8790         (bfd_tell): Change return type to file_ptr.
8791         * bfd-in2.h: Re-generate.
8792         * cache.c: Update copyright.
8793         (bfd_cache_lookup_worker): Use real_fseek, do not cast offset
8794         parameter.
8795         (close_one): Use real_ftell.
8796         * bfdio.c: Update copyright.
8797         (real_ftell, real_fseek): New functions.
8798         (bfd_tell): Use real_fseek and real_ftell, change return type to
8799         file_ptr.
8800         (bfd_seek): Use real_ftell and real_fseek, change type of
8801         file_position to a file_ptr.
8802         * libbfd-in.h: Update copyright.
8803         (real_ftell, real_fseek): Declare.
8804         * libbfd.h: Re-generate.
8806         * configure.in (AC_CHECK_FUNCS): Check for ftello, ftello64,
8807         fseeko and fseeko64.  Determine bfd_file_ptr.
8808         * configure: Re-generate.
8809         * config.in: Re-generate.
8811 2004-02-09  Anil Paranjpe  <anilp1@KPITCummins.com>
8813         * coff-h8300.c: Added comments about relaxation for ldc.w and stc.w.
8814         * elf32-h8300.c: Likewise.
8816 2004-02-09  Christian Vogel <vogelchr@vogel.cx>
8817             Nick Clifton  <nickc@redhat.com>
8819         * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Catch
8820         GOT entries with no associated GOT subsection.
8822 2004-02-09  Richard Sandiford  <rsandifo@redhat.com>
8824         * bfd-elf.h (elf_backend_name_local_section_symbols): New hook.
8825         * elf.c (swap_out_syms): Use it to decide whether local section
8826         symbols should be named.
8827         * elfxx-target.h (elf_backend_name_local_section_symbols): New macro.
8828         * elfxx-mips.h (_bfd_mips_elf_name_local_section_symbols): Declare.
8829         (elf_backend_name_local_section_symbols): Define.
8830         * elfxx-mips.c (_bfd_mips_elf_name_local_section_symbols): New.
8832 2004-01-30  H.J. Lu  <hongjiu.lu@intel.com>
8834         * elfxx-ia64.c (elfNN_ia64_relax_brl): New function.
8835         (elfNN_ia64_relax_section): Optimize brl to br during the relax
8836         finalize pass.
8838 2004-01-30  Alexandre Oliva  <aoliva@redhat.com>
8840         * elf32-frv.c (elf32_frv_always_size_sections): Initialize pointer
8841         to bfd_link_hash_entry passed by reference to
8842         _bfd_generic_link_add_one_symbol.
8844 2004-01-25  H.J. Lu  <hongjiu.lu@intel.com>
8846         * elfxx-ia64.c (elfNN_ia64_relocate_section): Disallow imm
8847         relocations against dynamic symbols.
8849 2004-01-23  Daniel Jacobowitz  <drow@mvista.com>
8851         * elf32-arm.h (elf32_arm_check_relocs): Revert part of 2004-01-13
8852         change.
8854 2004-01-21  Tom Rix  <tcrix@worldnet.att.net>
8856         * reloc.c: New 5 bit reloc, BFD_RELOC_M68HC12_5B, for m68hc12 movb/movw.
8857         * bfd-in2.h, libbfd.h: Rebuilt.
8859 2004-01-20  Danny Smith  <dannysmith@users.sourceforge.net>
8861         * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Don't remove
8862         IMAGE_SCN_MEM_WRITE flag from .text section if WP_TEXT
8863         flag has been cleared.
8865 2004-01-19  Kazu Hirata  <kazu@cs.umass.edu>
8867         * coff-h8300.c: Add and adjust comments about relaxation.
8868         * elf32-h8300.c: Likewise.
8870 2004-01-16  Kazu Hirata  <kazu@cs.umass.edu>
8872         * coff-h8300.c: Fix comment typos.
8873         * elf32-h8300.c: Likewise.
8875 2004-01-16  Kazu Hirata  <kazu@cs.umass.edu>
8877         * coff-h8300.c: Add comments about relaxation.
8878         * elf32-h8300.c: Likewise.
8880 2004-01-14  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
8882         * acinclude.m4: Quote names of macros to be defined by AC_DEFUN
8883         throughout.
8884         * aclocal.m4: Regenerate.
8885         * configure: Regenerate.
8887 2004-01-13  Ian Lance Taylor  <ian@wasabisystems.com>
8889         * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Call
8890         mips_elf64_rtype_to_howto instead of using howto_table.
8892 2004-01-13  Daniel Jacobowitz  <drow@mvista.com>
8894         * elf32-arm.h (elf32_arm_final_link_relocate): Check that we created
8895         the .plt section.
8896         (elf32_arm_check_relocs): Don't increment the PLT refcount for
8897         relocs which would not use the PLT.
8899 2004-01-13  Alan Modra  <amodra@bigpond.net.au>
8901         * elf64-ppc.c (ppc64_elf_check_relocs): Ignore !SEC_ALLOC relocs.
8902         (ppc64_elf_gc_sweep_hook): Likewise.
8903         (ppc64_elf_size_dynamic_sections): Test for .plt directly.
8905 2004-01-12  Anil Paranjpe  <anilp1@KPITCummins.com>
8907         Adds linker relaxation support for bit manipulation insns like
8908         band, bclr, biand, bild, bior, bist, bixor, bld, bnot, bor, bset,
8909         bst, btst, bxor.
8910         * elf32-h8300.c: Opcode for bit manipulation insn is checked in
8911         elf32_h8_relax_section function while relxation for aa:16 and aa:32.
8912         * coff-h8300.c: Opcode for bit manipulation insn is checked in
8913         h8300_reloc16_extra_cases function while relxation for aa:16 and aa:32.
8915 2004-01-12  Alan Modra  <amodra@bigpond.net.au>
8917         * dwarf2.c: Convert to C90, remove unneeded casts and prototypes.
8919 2004-01-11  Kazu Hirata  <kazu@cs.umass.edu>
8921         * elf32-h8300.c: Fix formatting.
8923 2004-01-11  Kazu Hirata  <kazu@cs.umass.edu>
8925         * elf32-cris.c (cris_elf_gc_sweep_hook): Return early if no
8926         dynamic object is present.  Declare r_symndx and h in an inner
8927         scope.
8928         * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
8930 2004-01-09  Daniel Jacobowitz  <drow@mvista.com>
8932         * elf32-arm.h (struct elf32_arm_relocs_copied): Remove pc_count.
8933         (elf32_arm_copy_indirect_symbol): Don't copy pc_count.
8934         (elf32_arm_final_link_relocate): Handle PLT32 and PC24 relocs
8935         identically.  Do not emit PC24 relocations for shared libraries.
8936         (elf32_arm_gc_sweep_hook): Handle PLT32 and PC24 relocs
8937         identically.  Don't adjust pc_count.
8938         (elf32_arm_check_relocs): Handle PLT32 and PC24 relocs identically.
8939         Set ELF_LINK_HASH_NEEDS_PLT for both.  Don't adjust pc_count; don't
8940         adjust count for branch relocations.
8941         (allocate_dynrelocs): Correct typo in call to
8942         WILL_CALL_FINISH_DYNAMIC_SYMBOL.  Never allocate space for
8943         PC24 or PLT32 relocs when linking.
8945 2004-01-09  Dmitry Semyonov  <Dmitry.Semyonov@oktet.ru>
8947         * coff-arm.c (aoutarm_std_reloc_howto): [ARM_WINCE] Synchronize ARM_26D
8948         relocation howto with ARM_26 one for consistency.
8949         (coff_arm_relocate_section): Set partial_inplace for ARM_26 relocations
8950         that will be converted to ARM_26D ones, since we always want 'done'
8951         relocations to be reflected in section's data.
8952         (coff_arm_relocate_section): [ARM_WINCE] Quick fix for BL instruction
8953         offset.
8954         (_bfd_final_link_relocate): Do not modify "inplace" data, if not
8955         requested.
8957 2004-01-08  Dmitry Semyonov  <Dmitry.Semyonov@oktet.ru>
8959         * coff-arm.c (coff_arm_relocate_section): Do not alter relocs that
8960         are not partial_inplace during a relocatable link.
8962 2004-01-08  Kazu Hirata  <kazu@cs.umass.edu>
8964         * elf32-m68k.c (elf_m68k_gc_sweep_hook): Return early
8965         if no dynamic object is present.  Declare r_symndx and h in an
8966         inner scope.
8968 2004-01-07  H.J. Lu  <hongjiu.lu@intel.com>
8970         * elfxx-ia64.c (elfNN_ia64_relax_section): Don't install
8971         trampoline if it is known out of range.
8973 2004-01-06  Alexandre Oliva  <aoliva@redhat.com>
8975         2003-12-17  Alexandre Oliva  <aoliva@redhat.com>
8976         * elf32-frv.c (_frv_osec_readonly_p): New.
8977         (_frv_emit_got_relocs_plt_entries): Don't emit rofixup for
8978         undefweak symbol.
8979         (_frv_count_got_plt_entries): Adjust expected count accordingly.
8980         (elf32_frv_relocate_section): Likewise.  Error out if attempting
8981         to emit rofixups or dynamic relocs in read-only segments.  Use
8982         _bfd_elf_section_offset to adjust r_offsets in rofixups and
8983         dynamic relocations.
8984         2003-12-12  Alexandre Oliva  <aoliva@redhat.com>
8985         * elf32-frv.c (elf32_frv_relocate_section): Compute dynamic
8986         relocations or fixups involving merged sections correctly.  Avoid
8987         crash when undefined symbol is referenced by R_FRV_32 or
8988         R_FRV_FUNCDESC_VALUE.
8989         2003-12-02  Alexandre Oliva  <aoliva@redhat.com>
8990         * elf32-frv.c (elf32_frv_relocate_section): Add output_offset of
8991         input section holding local symbol to addend of R_FRV_32 or
8992         R_FRV_FUNCDESC_VALUE dynamic relocation.
8993         2003-11-27  Alexandre Oliva  <aoliva@redhat.com>
8994         * elf32-frv.c (elf32_frv_modify_segment_map): Add link info arg.
8995         (elf32_frv_always_size_sections): Don't store pointer to
8996         __stacksize symbol in sec_info.
8997         (elf32_frv_modify_segment_map): Look it up here.
8998         2003-11-26  Alexandre Oliva  <aoliva@redhat.com>
8999         * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Emit the address
9000         of the lazy PLT entry, not only its offset, as the low word of a
9001         function descriptor.
9002         2003-11-10  Alexandre Oliva  <aoliva@redhat.com>
9003         * elf32-frv.c (elf32_frv_always_size_sections): Define __stacksize
9004         if a hash table entry already exists but is not a definition.
9005         2003-11-05  Alexandre Oliva  <aoliva@redhat.com>
9006         * elf32-frv.c (frv_elf_link_hash_table_create): Use bfd_zalloc.
9007         (_frv_add_rofixup): Don't inline.
9008         (_frv_emit_got_relocs_plt_entries): Use NULL as funcdesc address
9009         for undefweak symbols.
9010         (elf32_frv_relocate_section): Avoid crash while computing
9011         relocation when linking with shared library.  Only emit rofixups
9012         and dynamic relocations for alloc&load sections.  Mark binaries
9013         with inter-segment relocations for relocation as a unit.
9014         (_frv_create_got_section): Rename .rofixup.got to .rofixup.
9015         (DEFAULT_STACK_SIZE): New.
9016         (_frv_count_got_plt_entries): Fix thinko in deciding whether to
9017         emit rofixups or dynamic relocs when linking dynamic non-PIE
9018         executables.
9019         (elf32_frv_size_dynamic_sections): Generate rofixup on PIEs and
9020         shared libs too.  Reserve the last entry for the GOT pointer.
9021         (elf32_frv_finish_dynamic_sections): Emit it.
9022         (elf32_frv_always_size_sections): New.
9023         (elf32_frv_modify_segment_map): New.
9024         (elf32_frv_check_relocs): Reserve relocs32 space only in ALLOC
9025         sections.
9026         (frv_elf_merge_private_bfd_data): Clear PIC bit if FDPIC is set.
9027         (frv_elf_print_private_bfd_data): Handle FDPIC and LIBPIC.
9028         (elf_backend_always_size_sections): New.
9029         (elf_backend_modify_segment_map): New.
9030         2003-10-31  Alexandre Oliva  <aoliva@redhat.com>
9031         * config.bfd: Added frv-*-*linux*.
9032         * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Use idx 0 for
9033         ABS section, instead of crashing.
9034         (elf32_frv_relocate_section): Don't crash before warning about
9035         different segments in non-PIC relocation.
9036         2003-10-17  Alexandre Oliva  <aoliva@redhat.com>
9037         * elf32-frv.c (elf32_frv_relocate_section): Don't warn on LABEL24
9038         relocs to undefweak symbols.
9039         (elf32_frv_relocate_section): Ditto for undefined symbols.
9040         2003-10-06  Alexandre Oliva  <aoliva@redhat.com>
9041         * elf32-frv.c (elf32_frv_create_dynamic_sections): Make sure
9042         gotfixup section was created.
9043         2003-09-30  Alexandre Oliva  <aoliva@redhat.com>
9044         * elf32-frv.c (elf32_frv_howto_table): Change GOT12,
9045         FUNCDESC_GOT12, GOTOFF12 and FUNCDESC_GOTOFF12 to
9046         complain_overflow_signed.
9047         * elf32-frv.c (_frv_add_rofixup): Do not error out if contents
9048         have not been allocated.
9049         (_frv_emit_got_relocs_plt_entries): Return non-void.  Assert
9050         privfd only if dynamic sections were created.
9051         (elf32_frv_relocate_section): Compute gprel_segment, and use it
9052         for GPREL relocs.  When linking relocatable FDPIC executables,
9053         emit warnings for relocations that would be illegal on PIE or
9054         shared libraries.  Emit rofixup for R_FRV_32 only if input object
9055         is not FDPIC.
9056         (_frv_create_got_section): Define _gp symbol in the rofixup
9057         section.
9058         (elf32_frv_finish_dynamic_sections): If rofixups needed but
9059         dynamic sections missing, error out requesting -melf32frvfd.
9060         2003-09-19  Alexandre Oliva  <aoliva@redhat.com>
9061         * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Rearrange
9062         computation of addends from section and global or local symbol
9063         value.  Change return type to bfd_boolean, and return a failure if
9064         a dynamic FUNCDESC or FUNCDESC_VALUE relocation that requires a
9065         nonzero addend is required.
9066         (elf32_frv_relocate_section): Likewise.  Print error for
9067         unsupported nonzero addends.
9068         2003-09-18  Alexandre Oliva  <aoliva@redhat.com>
9069         * elf32-frv.c (FRV_SYM_LOCAL): In the absence of dynamic sections,
9070         force everything local.
9071         (_frv_emit_got_relocs_plt_entries): Cope with NULL sec.
9072         * elf32-frv.c (struct frv_elf_link_hash_table): Added sgotfixup.
9073         (frv_gotfixup_section): New.
9074         (FRV_SYM_LOCAL): Accept undefweak and local common symbols.
9075         (struct frv_pic_relocs_info): Split relocs into relocs32, relocsfd
9076         and relocsfdv.
9077         (_frv_add_rofixup): New.
9078         (_frv_emit_got_relocs_plt_entries): Generate fixups for non-PIE
9079         fdpic executables.  Use FRV_SYM_LOCAL more widely to simplify and
9080         improve some ugly conditions.
9081         (elf32_frv_relocate_section): Likewise.  Reject inter-segment
9082         relocations in fdpic.
9083         (_frv_create_got_section): Create .rofixup.got section.
9084         (struct _frv_dynamic_got_info): Added fixups.
9085         (_frv_count_got_plt_entries): Account in-GOT relocations into
9086         relocs32, relocsfd and relocsfdv.  Account them into relocs or
9087         fixups, as appropriate.
9088         (elf32_frv_size_dynamic_sections): Size rofixup section.  Simplify
9089         sizing of gotrel.
9090         (elf32_frv_finish_dynamic_sections): Verify that the right number
9091         of relocations and fixups was generated.
9092         (elf32_frv_check_relocs): Compute relocs32, relocsfd and
9093         relocsfdv.
9094         * elf32-frv.c (FRV_SYM_LOCAL): New macro, used instead of
9095         SYMBOL_CALLS_LOCAL and SYMBOL_REFERENCES_LOCAL.
9096         (FRV_FUNCDESC_LOCAL): New macro, used to decide whether a function
9097         descriptor of a (formerly-)global symbol is local.
9098         (struct frv_pic_relocs_info): Adjust comments.
9099         (_frv_emit_got_relocs_plt_entries): Adjust.
9100         (elf32_frv_relocate_section): Likewise.
9101         (_frv_count_got_plt_entries): Likewise.
9102         * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Don't add global
9103         symbol's value to addend in the common preamble.  Decay dynamic
9104         symbols to section+offset if they bind or call locally, for GOT
9105         and FUNCDESC_VALUE, respectively.
9106         (elf32_frv_relocate_section): Likewise.
9107         (elf32_frv_check_relocs): Don't register as dynamic symbols of
9108         internal or hidden visibility.
9109         2003-09-17  Alexandre Oliva  <aoliva@redhat.com>
9110         * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Get addend as
9111         argument, so as to not call _bfd_elf_rel_local_sym to compute it.
9112         (elf32_frv_relocate_section): Pass relocation addend in.  Use
9113         original relocation addend to look up the got relocs/plt entries
9114         table.  Do not call _bfd_elf_rel_local_sym.  Don't error out when
9115         processing relocations that reference .scommon symbols.
9116         2003-09-15  Alexandre Oliva  <aoliva@redhat.com>
9117         Introduce support for dynamic linking.
9118         * elf32-frv.c (R_FRV_FUNCDESC_VALUE): Mark it as 64 bits.
9119         (elf32_frv_rel_32_howto, elf32_frv_rel_funcdesc_howto,
9120         elf32_frv_rel_funcdesc_value_howto): New REL descriptors.
9121         (frv_reloc_type_lookup): Return REL howtos for executables and
9122         dynamic libraries.
9123         (frv_info_to_howto_rel): New.
9124         (struct frv_elf_link_hash_table): New.
9125         (frv_hash_table, frv_got_section, frv_gotrel_section,
9126         frv_plt_section, frv_pltrel_section, frv_relocs_info,
9127         frv_got_initial_offset, frv_plt_initial_offset): New macros.
9128         (frv_elf_link_hash_table_create): New.
9129         (struct frv_pic_relocs_info): New.
9130         (frv_pic_relocs_info_hash, frv_pic_relocs_info_eq): New.
9131         (frv_pic_relocs_info_find): New.
9132         (frv_pic_relocs_info_for_global, frv_pic_relocs_info_for_local):
9133         New.
9134         (FRV_LZPLT_BLOCK_SIZE, FRV_LZPLT_RESOLVE_LOC): New.
9135         (_frv_add_dyn_reloc, _frv_osec_to_segment): New.
9136         (_frv_emit_got_relocs_plt_entries): New.
9137         (elf32_frv_relocate_section): Add support for dynamic linking.
9138         Handle new relocations.
9139         (_frv_create_got_section): New.
9140         (elf32_frv_create_dynamic_sections): New.
9141         (ELF_DYNAMIC_INTERPRETER): New.
9142         (struct _frv_dynamic_got_info): New.
9143         (_frv_count_got_plt_entries): New.
9144         (struct _frv_dynamic_got_plt_info): New.
9145         (_frv_compute_got_alloc_data): New.
9146         (_frv_get_got_entry, _frv_get_fd_entry): New.
9147         (_frv_assign_got_entries, _frv_assign_plt_entries): New.
9148         (_frv_resolve_final_relocs_info): New.
9149         (elf32_frv_size_dynamic_sections): New.
9150         (elf32_frv_finish_dynamic_sections): New.
9151         (elf32_frv_adjust_dynamic_symbol): New.
9152         (elf32_frv_finish_dynamic_symbol): New.
9153         (elf32_frv_check_relocs): Handle new relocs.  Explain how the
9154         whole thing works.
9155         (elf_info_to_howto_rel): Define.
9156         (bfd_elf32_bfd_link_hash_table_create): Define.
9157         (elf_backend_create_dynamic_sections): Define.
9158         (elf_backend_adjust_dynamic_symbol): Define.
9159         (elf_backend_size_dynamic_sections): Define.
9160         (elf_backend_finish_dynamic_symbol): Define.
9161         (elf_backend_finish_dynamic_sections): Define.
9162         (elf_backend_want_got_sym): Define.
9163         (elf_backend_got_header_size): Define.
9164         (elf_backend_want_got_plt): Define.
9165         (elf_backend_plt_readonly): Define.
9166         (elf_backend_want_plt_sym): Define.
9167         (elf_backend_plt_header_size): Define.
9168         (elf_backend_may_use_rel_p): Define.
9169         (elf_backend_may_use_rela_p): Define.
9170         (elf_backend_default_use_rela_p): Define.
9171         2003-08-08  Alexandre Oliva  <aoliva@redhat.com>
9172         * elf32-frv.c (R_FRV_FUNCDESC_VALUE, R_FRV_FUNCDESC_GOTOFF12,
9173         R_FRV_FUNCDESC_GOTOFFHI, R_FRV_FUNCDESC_GOTOFFLO, R_FRV_GOTOFF12,
9174         R_FRV_GOTOFFHI, R_FRV_GOTOFFLO): New.
9175         (frv_reloc_map): Map the corresponding BFD relocs to them.
9176         (frv_reloc_type_lookup): ... and back to BFD relocs.
9177         * reloc.c: New relocs.
9178         * bfd-in2.h, libbfd.h: Rebuilt.
9179         2003-08-04  Alexandre Oliva  <aoliva@redhat.com>
9180         * elf32-frv.c (R_FRV_GOT12, R_FRV_GOTHI, R_FRV_GOTLO,
9181         R_FRV_FUNCDESC, R_FRV_FUNCDESC_GOT12, R_FRV_FUNCDESC_GOTHI,
9182         R_FRV_FUNCDESC_GOTLO): New.
9183         (frv_reloc_map): Map the corresponding BFD relocs to them.
9184         (frv_reloc_type_lookup): ... and back to BFD relocs.
9185         * reloc.c: New relocs.
9186         * bfd-in2.h, libbfd.h: Rebuilt.
9188 2004-01-05  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
9190         * elf32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
9191         targets to support pages of up to 64kB.
9192         (elf32_bed): Redefine to get a separate backend data structure for
9193         traditional targets.
9194         * elf64-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
9195         targets to support pages of up to 64kB.
9196         (elf64_bed): Redefine to get a separate backend data structure for
9197         traditional targets.
9198         * elfn32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
9199         targets to support pages of up to 64kB.
9200         (elf32_bed): Redefine to get a separate backend data structure for
9201         traditional targets.
9203 2004-01-04  Mark Kettenis  <kettenis@gnu.org>
9205         * elf32-sparc.c (elf32_sparc_grok_psinfo): New function.
9207 2004-01-02  Mark Kettenis  <kettenis@gnu.org>
9209         * elf32-i386.c (elf_i386_grok_prstatus): Add support for FreeBSD.
9210         (elf_i386_grok_psinfo): Likewise.
9212 2004-01-02  Bernardo Innocenti  <bernie@develer.com>
9214         * config.bfd: Add m68k-uClinux target.
9216 2004-01-01  Grant Edwards <grante@visi.com>
9218         * elflink.h (elf_gc_sections): Warn when gc-sections option is ignored.
9219         * elf32-h8300.c (elf32_h8_gc_mark_hook): New function.
9220         (elf32_h8_gc_sweep_hook): New function.
9221         (elf_backend_gc_mark_hook): Define.
9222         (elf_backend_gc_sweep_hook): Define.
9223         (elf_backend_can_gc_sections): Define.
9225 For older changes see ChangeLog-0203
9227 Local Variables:
9228 mode: change-log
9229 left-margin: 8
9230 fill-column: 74
9231 version-control: never
9232 End: