cf6669947b8787863801fb2a648df59e43000b30
[external/binutils.git] / bfd / ChangeLog
1 2007-06-18  H.J. Lu  <hongjiu.lu@intel.com>
2
3         * libpei.h (_bfd_XXi_final_link_postscript): Remove
4         duplication.
5         (bfd_target_pei_p): New.
6         (bfd_target_pei_arch): New
7         (bfd_target_efi_p): Likewise.
8         (bfd_target_efi_arch): New
9         (bfd_pe_executable_p): Use bfd_target_pei_p and
10         bfd_target_efi_p.
11
12         * peicode.h (arch_type): New enum.
13         (pe_arch): New function.
14         (pe_bfd_object_p): Don't match PE/EFI target with EFI/PE file
15         if there is an EFI/PE target.
16
17 2007-06-14  H.J. Lu  <hongjiu.lu@intel.com>
18
19         * Makefile.am (ACLOCAL_AMFLAGS): Add -I . -I ../config.
20
21         * acinclude.m4: Don't include m4 files. Remove libtool
22         kludge.
23
24         * Makefile.in: Regenerated.
25         * aclocal.m4: Likewise.
26         * configure: Likewise.
27
28 2007-06-11  Sterling Augustine  <sterling@tensilica.com>
29             Bob Wilson  <bob.wilson@acm.org>
30         
31         * elf32-xtensa.c (extend_ebb_bounds_forward): Use renamed
32         XTENSA_PROP_NO_TRANSFORM flag instead of XTENSA_PROP_INSN_NO_TRANSFORM.
33         (extend_ebb_bounds_backward, compute_text_actions): Likewise.
34         (compute_ebb_proposed_actions, coalesce_shared_literal): Likewise.
35         (xtensa_get_property_predef_flags): Likewise.
36         (compute_removed_literals): Pass new arguments to is_removable_literal.
37         (is_removable_literal): Add sec, prop_table and ptblsize arguments.
38         Do not remove literal if the NO_TRANSFORM property flag is set.
39         
40 2007-05-31  Richard Sandiford  <rsandifo@nildram.co.uk>
41
42         * elfxx-mips.c (mips_elf_initialize_tls_index): When processing a
43         type (3) single-GOT entry, read tls_type from the hash table entry
44         rather than the GOT entry.
45
46 2007-06-01  Alan Modra  <amodra@bigpond.net.au>
47
48         * simple.c (bfd_simple_get_relocated_section_contents): Init
49         input_bfds_tail.
50
51 2007-05-30  Alan Modra  <amodra@bigpond.net.au>
52
53         * elf.c (elf_fake_sections): Adjust test for SHT_NOBITS sections
54         created by objcopy --only-keep-debug.
55         (_bfd_elf_init_private_section_data): Only change elf_section_type
56         if it is SHT_NULL.
57
58         * elf.c (assign_file_positions_for_load_sections): Correct sh_type
59         to SHT_NOBITS earlier.  Base actions in rest of function on sh_type
60         and sh_flags instead of bfd section flags.  Delete voff and code
61         keeping nobits segments aligned.
62
63 2007-05-25  Eric Christopher  <echristo@apple.com>
64
65         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame):
66         Check that sym_sec isn't NULL before accessing.
67
68 2007-05-24  Steve Ellcey  <sje@cup.hp.com>
69
70         * Makefile.in: Regnerate.
71         * configure: Regenerate.
72         * aclocal.m4: Regenerate.
73         * doc/Makefile.in: Regenerate.
74
75 2007-05-22  Paul Brook  <paul@codesourcery.com>
76
77         * elf32-arm.c (output_arch_syminfo): Replace plt_shndx and plt_offset
78         with sec and sec_shndx.
79         (elf32_arm_ouput_plt_map_sym): Use them.
80         (elf32_arm_output_arch_local_syms): Output mapping symbols for
81         interworking glue.
82
83 2007-05-18  Paul Brook  <paul@codesourcery.com>
84
85         * elf32-arm.c (ARM2THUMB_V5_STATIC_GLUE_SIZE): Define.
86         (a2t1v5_ldr_insn, a2t1v5_ldr_insn): New.
87         (record_arm_to_thumb_glue): Add v5t non-pic glue.
88         (elf32_arm_create_thumb_stub): Ditto.
89
90 2007-05-16  H.J. Lu  <hongjiu.lu@intel.com>
91             Alan Modra  <amodra@bigpond.net.au>
92
93         * elflink.c (_bfd_elf_adjust_dynamic_copy): Align dynamic bss
94         section to the minimum alignment.
95
96 2007-05-15  H.J. Lu  <hongjiu.lu@intel.com>
97             Alan Modra  <amodra@bigpond.net.au>
98
99         PR ld/4504
100         * elf-bfd.h (_bfd_elf_adjust_dynamic_copy): New.
101         * elflink.c (_bfd_elf_adjust_dynamic_copy): New.
102
103         * elf-m10300.c (_bfd_mn10300_elf_adjust_dynamic_symbol): Call
104         _bfd_elf_adjust_dynamic_copy to adjust for the copy in dynamic
105         bss section.
106         * elf32-arm.c (elf32_arm_adjust_dynamic_symbol): Likewise.
107         * elf32-cris.c (elf_cris_adjust_dynamic_symbol): Likewise.
108         * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Likewise.
109         * elf32-i370.c (i370_elf_adjust_dynamic_symbol): Likewise.
110         * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Likewise.
111         * elf32-m32r.c (m32r_elf_adjust_dynamic_symbol): Likewise.
112         * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Likewise.
113         * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise.
114         * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
115         * elf32-sh.c (sh_elf_adjust_dynamic_symbol): Likewise.
116         * elf32-vax.c (elf_vax_adjust_dynamic_symbol): Likewise.
117         * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
118         * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
119         * elf64-sh64.c (sh64_elf64_adjust_dynamic_symbol): Likewise.
120         * elf64-x86-64.c (elf64_x86_64_adjust_dynamic_symbol): Likewise.
121         * elfxx-mips.c (_bfd_mips_vxworks_adjust_dynamic_symbol): Likewise.
122         * elfxx-sparc.c (_bfd_sparc_elf_adjust_dynamic_symbol): Likewise.
123
124 2007-05-15  Richard Sandiford  <richard@codesourcery.com>
125
126         * elfxx-mips.c (mips_elf_create_local_got_entry): Remove
127         input_section argument.  Create .rela.dyn relocations against
128         symbol 0 rather than the section symbol.
129         (mips_elf_local_got_index): Remove input_section argument.
130         Update call to mips_elf_create_local_got_entry.
131         (mips_elf_got_page, mips_elf_got16_entry): Likewise.
132         (mips_elf_calculate_relocation): Update calls to
133         mips_elf_local_got_index, mips_elf_got16_entry and mips_elf_got_page.
134
135 2007-05-15  Mark Shinwell  <shinwell@codesourcery.com>
136
137         * elf32-arm.c (elf32_arm_final_link_relocate): Correctly
138         handle the Thumb-2 JUMP19 relocation.
139
140 2007-05-15  Alan Modra  <amodra@bigpond.net.au>
141
142         PR 4479
143         * elf.c (elf_fake_sections): Don't allow backend to change
144         SHT_NOBITS if called for strip/objcopy --only-keep-debug.
145         * elfxx-mips.c (_bfd_mips_elf_fake_sections): Remove similar
146         fix from here.
147
148 2007-05-14  Alan Modra  <amodra@bigpond.net.au>
149
150         * elf.c (bfd_elf_string_from_elf_section): Return NULL on
151         invalid shstrndx.
152         (bfd_elf_get_str_section): Likewise.
153
154 2007-05-12  Alan Modra  <amodra@bigpond.net.au>
155
156         PR 4497
157         * elf-eh-frame.c (struct cie): Add "local_personality".  Make
158         "personality" a union.
159         (cie_eq): Compare local_personality too.  Adjust personality
160         comparison.
161         (_bfd_elf_discard_section_eh_frame): Check binding on personality
162         reloc sym to allow for bad symtab.  Use stashed local syms rather
163         than reading personality local sym.  Handle discarded sections.
164
165 2007-05-12  Alan Modra  <amodra@bigpond.net.au>
166
167         * elf32-spu.c (elf_howto_table): Add howto for R_SPU_ADDR16X.
168
169 2007-05-11  Alan Modra  <amodra@bigpond.net.au>
170
171         * elf32-ppc.h (ppc_elf_select_plt_layout): Update prototype.
172         (enum ppc_elf_plt_type): Move from..
173         * elf32-ppc.c: ..here.
174         (struct ppc_elf_obj_tdata): Add makes_plt_call and has_rel16.
175         (struct ppc_elf_link_hash_table): Reorder.  Add old_bfd.  Delete
176         can_use_new_plt.  Make is_vxworks a bitfield.
177         (ppc_elf_link_hash_table_create): Don't clear is_vxworks (again).
178         (ppc_elf_check_relocs): Update setting of reloc flags.  Set old_bfd.
179         (ppc_elf_select_plt_layout): Modify parameters.  Use bfd reloc
180         flags to better detect object files needing old bss-style plt.
181         Allow secure plt to be used without rel16 relocs being detected.
182         Warn if secure plt request cannot be allowed.
183
184 2007-05-11  Alan Modra  <amodra@bigpond.net.au>
185
186         * reloc.c (BFD_RELOC_SPU_PPU32, BFD_RELOC_SPU_PPU64): Define.
187         * elf-bfd.h (struct elf_backend_data): Change return type of
188         elf_backend_relocate_section to int.
189         * elf32-spu.c (elf_howto_table): Add howtos for R_SPU_PPU32 and
190         R_SPU_PPU64.
191         (spu_elf_bfd_to_reloc_type): Convert new relocs.
192         (spu_elf_count_relocs): New function.
193         (elf_backend_count_relocs): Define.
194         (spu_elf_relocate_section): Arrange to emit R_SPU_PPU32 and
195         R_SPU_PPU64 relocs.
196         * elflink.c (elf_link_input_bfd): Emit relocs if relocate_section
197         returns 2.
198         * bfd-in2.h: Regenerate.
199         * libbfd.h: Regenerate.
200
201 2007-05-10  Richard Sandiford  <richard@codesourcery.com>
202
203         * elf32-arm.c (elf32_arm_check_relocs): Don't create PLT entries
204         for R_ARM_ABS12 relocs.
205         (elf32_arm_finish_dynamic_symbol): Fix the loop that creates
206         non-shared VxWorks PLT entries.
207
208 2007-05-11  Alan Modra  <amodra@bigpond.net.au>
209
210         PR 4454
211         * elf-eh-frame.c (struct cie): Make "personality" a bfd_vma.
212         (_bfd_elf_discard_section_eh_frame): Handle local syms on
213         personality relocation.
214
215 2007-05-10  Richard Sandiford  <richard@codesourcery.com>
216
217         * elf.c (assign_file_positions_for_load_sections): Use p_memsz
218         rather than p_filesz to calculate the LMA of the end of a segment.
219
220 2007-05-10  Jakub Jelinek  <jakub@redhat.com>
221
222         * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Don't do copyreloc
223         processing if symbol is defined in the executable.
224
225 2007-05-10  Alexandre Oliva  <aoliva@redhat.com>
226
227         * elf32-frv.c (_frvfdpic_check_discarded_relocs): New.
228         (frvfdpic_elf_discard_info): New.
229         (elf_backend_discard_info): Define for FDPIC.
230
231 2007-05-09  Mark Shinwell  <shinwell@codesourcery.com>
232
233         * elf32-arm.c (bfd_elf32_arm_vfp11_erratum_scan): Don't
234         attempt to scan if the bfd doesn't correspond to an ELF image.
235         (bfd_elf32_arm_vfp11_fix_veneer_locations): Likewise.
236
237 2007-05-08  Alexandre Oliva  <aoliva@redhat.com>
238
239         * elf32-frv.c (elf32_frv_relocate_section): Discard dynamic relocs
240         for which _bfd_elf_section_offset returns -1.
241
242 2007-05-08  Alan Modra  <amodra@bigpond.net.au>
243
244         * elf32-spu.c (spu_elf_size_stubs): Use "void *" for psyms.
245         (mark_functions_via_relocs): Likewise.
246
247 2007-05-07  Alan Modra  <amodra@bigpond.net.au>
248
249         * elflink.c (bfd_elf_final_link): Correct reloc handling for
250         elf_backend_count_relocs.
251         (bfd_elf_discard_info): Print an error if we can't read syms.
252
253 2007-05-07  Alan Modra  <amodra@bigpond.net.au>
254
255         * elf32-spu.c (spu_elf_reloc_type_lookup): Return NULL on
256         invalid reloc code.
257         (spu_elf_gc_mark_hook, spu_elf_section_processing): Delete functions.
258         (elf_backend_gc_mark_hook, elf_backend_section_processing): Don't
259         define.
260
261 2007-05-07  Alan Modra  <amodra@bigpond.net.au>
262
263         * elf.c (assign_file_positions_for_load_sections): Don't check
264         core segment.
265
266 2007-05-04  H.J. Lu  <hongjiu.lu@intel.com>
267
268         * elflink.c (elf_link_sort_relocs): Return if both .rela.dyn
269         and .rel.dyn aren't present.
270
271 2007-05-04  Nick Clifton  <nickc@redhat.com>
272
273         * elflink.c (elf_link_sort_relocs): If both .rela.dyn and .rel.dyn
274         sections are present examine the indirect sections in an attempt
275         to compute the correct relocation size.  If there is any
276         ambiguity, produce an error and refuse to sort.
277
278 2007-05-03  Sandra Loosemore  <sandra@codesourcery.com>
279
280         * elf32-arm.c (allocate_dynrelocs): Fix typo in comment.
281
282 2007-05-03  Vincent Riviere  <vincent.riviere@freesbee.fr>
283             Nick Clifton  <nickc@redhat.com>
284
285         PR gas/3041
286         * aoutx.h (swap_std_reloc_out): Treat relocs against weak symbols
287         in the same way as relocs against external symbols.
288
289 2007-05-02  Alan Modra  <amodra@bigpond.net.au>
290
291         * elf.c (assign_file_positions_for_load_sections): Set sh_offset
292         here.  Set sh_type to SHT_NOBITS if we won't be allocating
293         file space.  Don't bump p_memsz for non-alloc sections.  Adjust
294         section-in-segment check.
295         (assign_file_positions_for_non_load_sections): Don't set sh_offset
296         here for sections that have already been handled above.
297
298 2007-04-30  Alan Modra  <amodra@bigpond.net.au>
299
300         * elf32-spu.c (struct spu_link_hash_table): Add stack_analysis
301         and emit_stack_syms bitfields.
302         (get_sym_h): Read all symbols if stack analysis will be done.
303         (spu_elf_create_sections): Add stack_analysis and emit_stack_syms
304         params, and stash in hash table.
305         (is_hint): Split off from..
306         (is_branch): ..here.  Adjust callers.
307         (spu_elf_size_stubs): Add stack_analysis param.  Arrange to read
308         and keep all syms.
309         (write_one_stub): Fix mem leak.
310         (find_function_stack_adjust): New function.
311         (sort_syms_syms, sort_syms_psecs): New vars.
312         (sort_syms): New function.
313         (struct call_info, struct function_info): New.
314         (struct spu_elf_stack_info): New.
315         (alloc_stack_info, maybe_insert_function, func_name): New functions.
316         (is_nop, insns_at_end, check_function_ranges): Likewise.
317         (find_function, insert_callee, mark_functions_via_relocs): Likewise.
318         (pasted_function, interesting_section, discover_functions): Likewise.
319         (mark_non_root, call_graph_traverse, build_call_tree): Likewise.
320         (sum_stack, spu_elf_stack_analysis, spu_elf_final_link): Likewise.
321         (bfd_elf32_bfd_final_link): Define.
322         * elf32-spu.h (struct _spu_elf_section_data): Add stack_info field.
323         (spu_elf_create_sections, spu_elf_size_stubs): Update prototypes.
324
325 2007-04-28  Sergey Rogozhkin  <rogozhkin@niisi.msk.ru>
326
327         * elfxx-mips.c (mips_elf_create_dynamic_relocation): Don't access
328         memory which we might not own.
329
330 2007-04-27  Bob Wilson  <bob.wilson@acm.org>
331
332         * elf32-xtensa.c (elf_xtensa_make_sym_local): Restore deleted function.
333         (elf_xtensa_hide_symbol, elf_backend_hide_symbol): Likewise.
334         (elf_xtensa_allocate_dynrelocs): Use elf_xtensa_make_sym_local.
335
336 2007-04-27  Bob Wilson  <bob.wilson@acm.org>
337
338         * elf32-xtensa.c (xtensa_read_table_entries): Step through table
339         contents and relocs in parallel.
340
341 2007-04-27  Bob Wilson  <bob.wilson@acm.org>
342
343         * elf32-xtensa.c (relax_property_section): Remove extra irel increment.
344
345 2007-04-27  Alan Modra  <amodra@bigpond.net.au>
346
347         * cpu-rs6000.c: Write Mimi's name in ASCII.
348         * coff-rs6000.c: Likewise.
349         * rs6000-core.c: Likewise.
350
351 2007-04-27  Alan Modra  <amodra@bigpond.net.au>
352
353         * sysdep.h: Include config.h first.
354         Many files: Include sysdep.h before bfd.h.
355         * Makefile.am: Run "make dep-am".
356         * Makefile.in: Regenerate.
357
358 2007-04-25  Alan Modra  <amodra@bigpond.net.au>
359
360         * sysdep.h: Revert last change.
361
362 2007-04-24  Nick Clifton  <nickc@redhat.com>
363
364         * coffcode.h (coff_slurp_reloc_table): Initialise dst.r_offset.
365         * coff-m68k.c (m68kcoff_rtype_to_howto): Initialize relent.howto.
366
367 2007-04-24  Alan Modra  <amodra@bigpond.net.au>
368
369         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Warn if
370         eh_frame_hdr table won't be created.
371
372 2007-04-24  Alan Modra  <amodra@bigpond.net.au>
373
374         * acinclude.m4: Include config/stdint.m4.
375         * configure.in: Invoke GCC_HEADER_STDINT.
376         * sysdep.h: Don't include ansidecl.h here.
377         * configure: Regenerate.
378         * config.in: Regenerate.
379         * Makefile.in: Regenerate.
380
381 2007-04-23  Nathan Sidwell  <nathan@codesourcery.com>
382
383         * archures.c (bfd_mach_mcf_isa_c, bfd_mach_mcf_isa_c_mac,
384         bfd_mach_mcf_isa_c_emac): New.
385         * elf32-m68k.c (ISAC_PLT_ENTRY_SIZE, elf_isac_plt0_entry,
386         elf_isac_plt_entry, elf_isac_plt_info): New.
387         (elf32_m68k_object_p): Add ISA_C.
388         (elf32_m68k_print_private_bfd_data): Print ISA_C.
389         (elf32_m68k_get_plt_info): Detect ISA_C.
390         * cpu-m68k.c (arch_info): Add ISAC.
391         (m68k_arch_features): Likewise,
392         (bfd_m68k_compatible): ISAs B & C are not compatible.
393
394 2007-04-21  Nick Clifton  <nickc@redhat.com>
395
396         * ecoff.c (_bfd_ecoff_write_armap): Initialise rehash.
397         (ecoff_link_add_archive_symbols): Likewise.
398         * coff-m68k.c (m68kcoff_common_addend_rtype_to_howto): Initialise
399         relent.howto.
400         * ieee.c (parse_int): Initialise x.
401         (must_parse_int): Initialise result.
402         (ieee_slurp_external_symbols): Initialise value.
403
404 2007-04-21  Alan Modra  <amodra@bigpond.net.au>
405
406         * config.bfd (spu-*-elf): Delete targ_selvecs.
407
408 2007-04-19  Nick Clifton  <nickc@redhat.com>
409
410         * coffcode.h (coff_rtype_to_howto): Initialise genrel.howto.
411
412 2007-04-19  Alan Modra  <amodra@bigpond.net.au>
413
414         * bfd.c (bfd_demangle): New function.
415         * Makefile.am: Run "make dep-am".
416         * Makefile.in: Regenerate.
417         * bfd-in2.h: Regenerate.
418
419 2007-04-18  Matthias Klose  <doko@ubuntu.com>
420
421         * Makefile.am (libbfd_la_LDFLAGS): Use bfd soversion.
422         (bfdver.h): Use the date in non-release builds for the soversion.
423         * Makefile.in: Regenerate.
424
425 2007-04-17  Paul Brook  <paul@codesourcery.com>
426
427         * elf.c (_bfd_elf_is_function_type): New function.
428         * elflink.c (_bfd_elf_merge_symbol): Use bed->is_function_type.
429         (_bfd_elf_dynamic_symbol_p, _bfd_elf_symbol_refs_local_p,
430         is_global_data_symbol_definition, elf_link_add_object_symbols): Ditto.
431         * elf-bfd.h (elf_backend_data): Add is_function_type.
432         (_bfd_elf_is_function_type): Add prototype.
433         * elfxx-target.h (elf_backend_is_function_type): Add default
434         definition.
435         (elfNN_bed): Add elf_backend_is_function_type.
436         * elf32-arm.c (elf32_arm_is_function_type): New function.
437         (elf_backend_is_function_type): Define.
438
439 2007-04-17  Daniel Jacobowitz  <dan@codesourcery.com>
440
441         * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Put
442         DT_MIPS_RLD_MAP before DT_DEBUG again.
443
444 2007-04-14  Steve Ellcey  <sje@cup.hp.com>
445
446         * Makefile.am: Add ACLOCAL_AMFLAGS.
447         * configure.in: Change macro call order.
448         * Makefile.in: Regnerate.
449         * doc/Makefile.in: Regenerate.
450         * configure: Regenerate.
451
452 2007-04-14  Jakub Jelinek  <jakub@redhat.com>
453
454         * elflink.c (bfd_elf_final_link): Don't free symbuf for
455         non-elf input bfds.
456         (bfd_elf_size_dynamic_sections): Don't access elf_section_data
457         for non-elf input bfds.
458
459 2007-04-12  Richard Sandiford  <richard@codesourcery.com>
460
461         * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Don't add
462         DT_MIPS_RTLD_MAP for PIEs.
463
464 2007-04-12  Richard Sandiford  <richard@codesourcery.com>
465
466         * elfxx-mips.c (mips_elf_calculate_relocation): Set DT_TEXTREL
467         when creating a __GOTT_BASE__ or __GOTT_INDEX__ relocation
468         in a read-only section.
469         (_bfd_mips_elf_check_relocs): Likewise.
470
471 2007-04-12  Bob Wilson  <bob.wilson@acm.org>
472
473         * elf32-xtensa.c (xtensa_is_insntable_section): New.
474         (xtensa_is_proptable_section): New.
475         (elf_xtensa_discard_info_for_section): Handle "full" .xt.prop property
476         tables with 12-byte entries, as well as tables with 8-byte entries.
477         Sort the relocations before examining them.
478         (relax_property_section): Use xtensa_is_proptable_section and
479         xtensa_is_littable_section.  Rewrite code for combining table entries
480         to be more robust in case of unexpected relocations.  Do not set offset
481         of unused relocations to less than zero.
482         (xtensa_is_property_section): Use other functions instead of
483         duplicating section name comparisons.
484         (xtensa_is_littable_section): Use CONST_STRNEQ for ".gnu.linkonce.p.".
485         (xtensa_get_property_predef_flags): Use xtensa_is_insntable_section.
486
487 2007-04-12  Bob Wilson  <bob.wilson@acm.org>
488
489         * elf32-xtensa.c (elf_xtensa_gc_mark_hook): Don't follow references
490         from Xtensa property sections.
491
492 2007-04-12  Alan Modra  <amodra@bigpond.net.au>
493
494         * elf32-spu.c (needs_ovl_stub): Test that spu_elf_section_data
495         is non-NULL before dereferencing.
496
497 2007-04-11  Nathan Sidwell  <nathan@codesourcery.com>
498
499         * elf-vxworks.c (elf_vxworks_emit_relocs): Remap weakdef PLT slot
500         relocs too.
501
502 2007-04-10  Richard Henderson  <rth@redhat.com>
503
504         * elf64-alpha.c (struct alpha_elf_link_hash_table): Add relax_trip.
505         (elf64_alpha_size_got_sections): Remove unused something_changed local.
506         (elf64_alpha_size_plt_section): Return void.
507         (elf64_alpha_size_rela_got_section): Likewise.
508         (elf64_alpha_relax_section): Only regenerate got+plt if the
509         relax_trip counter has changed.
510
511 2007-04-09  Daniel Jacobowitz  <dan@codesourcery.com>
512
513         * Makefile.am (bfdver.h): Do not generate doc/bfdver.texi.
514         * doc/Makefile.am (DOCFILES): Add bfdver.texi.
515         (bfdver.texi): New rule.
516         * Makefile.in, doc/Makefile.in: Regenerated.
517
518 2007-04-03  Matt Thomas  <matt@netbsd.org>
519
520         * elf32-vax.c (elf_vax_relocate_section): Do not emit a PCREL reloc
521         in a shared object if it is not in a CODE section or if it is against
522         a section symbol.  This allows DWARF2 to use pcrel format.
523
524 2007-04-05  H.J. Lu  <hongjiu.lu@intel.com>
525
526         PR ld/4304
527         * elflink.c (bfd_elf_final_link): Call einfo callback in
528         bfd_link_info instead of _bfd_error_handler for DT_TEXTREL
529         warning.
530
531 2007-04-05  Alan Modra  <amodra@bigpond.net.au>
532
533         * elf32-spu.c (spu_elf_output_symbol_hook): New function.
534         (elf_backend_link_output_symbol_hook): Define.
535
536 2007-04-02  Nick Clifton  <nickc@redhat.com>
537
538         PR binutils/4292
539         * bfd.c (bfd_fprintf_vma): Do not print addresses of 32-bit
540         targets as 64-bit values, even if running on a 64-bit host.
541         * coffgen.c (coff_print_symbol): Likewise.
542
543 2007-03-29  Nick Clifton  <nickc@redhat.com>
544
545         PR binutils/4110
546         * elf.c (IS_VALID_GROUP_SECTION_HEADER): New macro.
547         (setup_group): Use it.  Report corrupt group section headers.
548         (bfd_section_from_shdr): Use new macro.  Replace constant 4 with
549         GRP_ENTRY_SIZE.  Cope with NULLs in the group section table.
550         (elf_fake_section): Replace constant 4 with GRP_ENTRY_SIZE.
551
552 2007-03-29  Alan Modra  <amodra@bigpond.net.au>
553
554         PR ld/4267
555         * elflink.c (evaluate_complex_relocation_symbols): Use bfd_vma
556         for rel->r_info values.
557         (bfd_elf_perform_complex_relocation): Likewise.
558         * elf32-ppc.c (allocate_dynrelocs): Set plt.offset to -1 for
559         unused entries.  Don't clear plt.plist in loop.
560
561 2007-03-28  Richard Sandiford  <richard@codesourcery.com>
562
563         * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Remove append_rela.
564         * elfxx-sparc.c (sparc_elf_append_rela_64, sparc_elf_append_rela_32):
565         Merge into...
566         (sparc_elf_append_rela): ...this new function.
567         (SPARC_ELF_APPEND_RELA): Delete.
568         (_bfd_sparc_elf_link_hash_table_create): Don't initialize
569         the deleted append_rela field.
570         (_bfd_sparc_elf_relocate_section): Use sparc_elf_append_rela
571         instead of SPARC_ELF_APPEND_RELA.
572         (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.  Use the
573         elf_size_info structure to find the size of a RELA entry and
574         the associated swap-out function.
575         (sparc64_finish_dyn, sparc64_finish_dyn): Merge into...
576         (sparc_finish_dyn): ...this new function.
577         (_bfd_sparc_elf_finish_dynamic_sections): Update calls accordingly.
578
579 2007-03-28  Richard Sandiford  <richard@codesourcery.com>
580             Phil Edwards  <phil@codesourcery.com>
581
582         * doc/bfd.texinfo: Put the contents after the title page rather
583         than at the end of the document.
584
585 2007-03-27  Andreas Schwab  <schwab@suse.de>
586
587         * elfxx-ia64.c (elf_backend_default_execstack): Define to 0.
588
589 2007-03-26  H.J. Lu  <hongjiu.lu@intel.com>
590
591         * configure: Regenerated.
592
593 2007-03-26  Alan Modra  <amodra@bigpond.net.au>
594
595         * elf32-spu.c (struct stubarr): Add stub_hash_table and err fields.
596         (allocate_spuear_stubs): New function.
597         (spu_elf_size_stubs): Call allocate_spuear_stubs.
598
599 2007-03-26  Alan Modra  <amodra@bigpond.net.au>
600
601         * aout-adobe.c (aout_32_bfd_reloc_name_lookup): Define.
602         * aout-arm.c (MY_bfd_reloc_name_lookup): Define.
603         (MY (bfd_reloc_name_lookup)): New function.
604         * aout-ns32k.c (MY (bfd_reloc_name_lookup)): New function.
605         * aout-target.h (NAME (aout, reloc_name_lookup)): Declare.
606         (MY_bfd_reloc_name_lookup): Define.
607         * aout-tic30.c (tic30_aout_reloc_name_lookup): New function.
608         (MY_bfd_reloc_name_lookup): Define.
609         * aoutx.h (NAME (aout, reloc_type_lookup)): Don't declare.
610         (NAME (aout, reloc_name_lookup)): New function.
611         * bout.c (b_out_bfd_reloc_name_lookup): New function.
612         * coff-alpha.c (alpha_bfd_reloc_name_lookup): New function.
613         (_bfd_ecoff_bfd_reloc_name_lookup): Define.
614         * coff-arm.c (coff_arm_reloc_name_lookup): New function.
615         (coff_bfd_reloc_name_lookup): Define.
616         * coff-i386.c (coff_bfd_reloc_name_lookup): Define.
617         (coff_i386_reloc_name_lookup): New function.
618         * coff-i860.c (coff_i860_reloc_name_lookup): New function.
619         (coff_bfd_reloc_name_lookup): Define.
620         * coff-i960.c (coff_i960_reloc_name_lookup): New function.
621         (coff_bfd_reloc_name_lookup): Define.
622         * coff-m68k.c (m68k_reloc_name_lookup): New function.
623         (coff_bfd_reloc_name_lookup): Define.
624         * coff-maxq.c (maxq_reloc_name_lookup): New function.
625         (coff_bfd_reloc_name_lookup): Define.
626         * coff-mcore.c (mcore_coff_reloc_name_lookup): New function.
627         (coff_bfd_reloc_name_lookup): Define.
628         * coff-mips.c (mips_bfd_reloc_name_lookup): New function.
629         (_bfd_ecoff_bfd_reloc_name_lookup): Define.
630         * coff-ppc.c (ppc_coff_reloc_name_lookup): New function.
631         (coff_bfd_reloc_name_lookup): Define.
632         * coff-rs6000.c (coff_bfd_reloc_name_lookup): Define.
633         (_bfd_xcoff_reloc_name_lookup): New function.
634         (rs6000coff_vec, pmac_xcoff_vec): Init new field.
635         * coff-sh.c (coff_bfd_reloc_name_lookup): Define.
636         (sh_coff_reloc_name_lookup): New function.
637         * coff-sparc.c (coff_sparc_reloc_name_lookup): New function.
638         (coff_bfd_reloc_name_lookup): Define.
639         * coff-tic30.c (coff_bfd_reloc_name_lookup): Define.
640         (tic30_coff_reloc_name_lookup): New function.
641         * coff-tic4x.c (coff_bfd_reloc_name_lookup): Define.
642         (tic4x_coff_reloc_name_lookup): New function.
643         * coff-tic54x.c (coff_bfd_reloc_name_lookup): Define.
644         (tic54x_coff_reloc_name_lookup): New function.
645         * coff-x86_64.c (coff_bfd_reloc_name_lookup): Define.
646         (coff_amd64_reloc_name_lookup): New function.
647         * coff-z80.c (coff_z80_reloc_name_lookup): New function.
648         (coff_bfd_reloc_name_lookup): Define.
649         * coff-z8k.c (coff_z8k_reloc_name_lookup): New function.
650         (coff_bfd_reloc_name_lookup): Define.
651         * coff64-rs6000.c (coff_bfd_reloc_name_lookup): Define.
652         (xcoff64_reloc_name_lookup): New function.
653         (rs6000coff64_vec, aix5coff64_vec): Init new field.
654         * coffcode.h (coff_bfd_reloc_name_lookup): Define.
655         * elf-hppa.h (elf_hppa_reloc_name_lookup): New function.
656         * elf-m10200.c (bfd_elf32_bfd_reloc_name_lookup): New function.
657         * elf-m10300.c (bfd_elf32_bfd_reloc_name_lookup): New function.
658         * elf32-arc.c (bfd_elf32_bfd_reloc_name_lookup): New function.
659         * elf32-arm.c (elf32_arm_reloc_name_lookup): New function.
660         (bfd_elf32_bfd_reloc_name_lookup): Define.
661         * elf32-avr.c (bfd_elf32_bfd_reloc_name_lookup): New function.
662         * elf32-bfin.c (bfin_bfd_reloc_name_lookup): New function.
663         (bfd_elf32_bfd_reloc_name_lookup): Define.
664         * elf32-cr16c.c (elf_cr16c_reloc_name_lookup): New function.
665         (bfd_elf32_bfd_reloc_name_lookup): Define.
666         * elf32-cris.c (cris_reloc_name_lookup): New function.
667         (bfd_elf32_bfd_reloc_name_lookup): Define.
668         * elf32-crx.c (elf_crx_reloc_name_lookup): New function.
669         (bfd_elf32_bfd_reloc_name_lookup): Define.
670         * elf32-d10v.c (bfd_elf32_bfd_reloc_name_lookup): New function.
671         * elf32-d30v.c (bfd_elf32_bfd_reloc_name_lookup): New function.
672         * elf32-dlx.c (elf32_dlx_reloc_name_lookup): New function.
673         (bfd_elf32_bfd_reloc_name_lookup): Define.
674         * elf32-fr30.c (fr30_reloc_name_lookup): New function.
675         (bfd_elf32_bfd_reloc_name_lookup): Define.
676         * elf32-frv.c (frv_reloc_name_lookup): New function.
677         (bfd_elf32_bfd_reloc_name_lookup): Define.
678         * elf32-gen.c (bfd_elf32_bfd_reloc_name_lookup): Define.
679         * elf32-h8300.c (elf32_h8_reloc_name_lookup): New function.
680         (bfd_elf32_bfd_reloc_name_lookup): Define.
681         * elf32-hppa.c (bfd_elf32_bfd_reloc_name_lookup): Define.
682         * elf32-i370.c (i370_elf_reloc_name_lookup): New function.
683         (bfd_elf32_bfd_reloc_name_lookup): Define.
684         * elf32-i386.c (elf_i386_reloc_name_lookup): New function.
685         (bfd_elf32_bfd_reloc_name_lookup): Define.
686         * elf32-i860.c (elf32_i860_reloc_name_lookup): New function.
687         (bfd_elf32_bfd_reloc_name_lookup): Define.
688         * elf32-i960.c (elf32_i960_reloc_name_lookup): New function.
689         (bfd_elf32_bfd_reloc_name_lookup): Define.
690         * elf32-ip2k.c (ip2k_reloc_name_lookup): New function.
691         (bfd_elf32_bfd_reloc_name_lookup): Define.
692         * elf32-iq2000.c (iq2000_reloc_name_lookup): New function.
693         (bfd_elf32_bfd_reloc_name_lookup): Define.
694         * elf32-m32c.c (m32c_reloc_name_lookup): New function.
695         (bfd_elf32_bfd_reloc_name_lookup): Define.
696         * elf32-m32r.c (bfd_elf32_bfd_reloc_name_lookup): New function.
697         * elf32-m68hc11.c (bfd_elf32_bfd_reloc_name_lookup): New function.
698         * elf32-m68hc12.c (bfd_elf32_bfd_reloc_name_lookup): New function.
699         * elf32-m68k.c (reloc_name_lookup): New function.
700         (bfd_elf32_bfd_reloc_name_lookup): Define.
701         * elf32-m88k.c (bfd_elf32_bfd_reloc_name_lookup): Define.
702         * elf32-mcore.c (mcore_elf_reloc_name_lookup): New function.
703         (bfd_elf32_bfd_reloc_name_lookup): Define.
704         * elf32-mep.c (mep_reloc_name_lookup): New function.
705         (bfd_elf32_bfd_reloc_name_lookup): Define.
706         * elf32-mips.c (bfd_elf32_bfd_reloc_name_lookup): New function.
707         (mips_vxworks_bfd_reloc_name_lookup): Likewise.
708         (bfd_elf32_bfd_reloc_name_lookup): Define.
709         * elf32-msp430.c (bfd_elf32_bfd_reloc_name_lookup): New function.
710         * elf32-mt.c (mt_reloc_name_lookup): New function.
711         (bfd_elf32_bfd_reloc_name_lookup): Define.
712         * elf32-openrisc.c (openrisc_reloc_name_lookup): New function.
713         (bfd_elf32_bfd_reloc_name_lookup): Define.
714         * elf32-or32.c (bfd_elf32_bfd_reloc_name_lookup): New function.
715         * elf32-pj.c (pj_elf_reloc_name_lookup): New function.
716         (bfd_elf32_bfd_reloc_name_lookup): Define.
717         * elf32-ppc.c (ppc_elf_reloc_name_lookup): New function.
718         (bfd_elf32_bfd_reloc_name_lookup): Define.
719         * elf32-s390.c (elf_s390_reloc_name_lookup): New function.
720         (bfd_elf32_bfd_reloc_name_lookup): Define.
721         * elf32-score.c (elf32_score_reloc_name_lookup): New function.
722         (bfd_elf32_bfd_reloc_name_lookup): Define.
723         * elf32-sh.c (sh_elf_reloc_name_lookup): New function.
724         (bfd_elf32_bfd_reloc_name_lookup): Define.
725         * elf32-sparc.c (bfd_elf32_bfd_reloc_name_lookup): Define.
726         * elf32-spu.c (spu_elf_reloc_name_lookup): New function.
727         (bfd_elf32_bfd_reloc_name_lookup): Define.
728         * elf32-v850.c (v850_elf_reloc_name_lookup): New function.
729         (bfd_elf32_bfd_reloc_name_lookup): Define.
730         * elf32-vax.c (reloc_name_lookup): New function.
731         (bfd_elf32_bfd_reloc_name_lookup): Define.
732         * elf32-xc16x.c (xc16x_reloc_name_lookup): New function.
733         (bfd_elf32_bfd_reloc_name_lookup): Define.
734         * elf32-xstormy16.c (xstormy16_reloc_name_lookup): New function.
735         (bfd_elf32_bfd_reloc_name_lookup): Define.
736         * elf32-xtensa.c (elf_xtensa_reloc_name_lookup): New function.
737         (bfd_elf32_bfd_reloc_name_lookup): Define.
738         * elf64-alpha.c (elf64_alpha_bfd_reloc_name_lookup): New function.
739         (bfd_elf64_bfd_reloc_name_lookup): Define.
740         * elf64-gen.c (bfd_elf64_bfd_reloc_name_lookup): Define.
741         * elf64-hppa.c (bfd_elf64_bfd_reloc_name_lookup): Define.
742         * elf64-mips.c (bfd_elf64_bfd_reloc_name_lookup): New function.
743         * elf64-mmix.c (bfd_elf64_bfd_reloc_name_lookup): New function.
744         * elf64-ppc.c (ppc64_elf_reloc_name_lookup): New function.
745         (bfd_elf64_bfd_reloc_name_lookup): Define.
746         * elf64-s390.c (elf_s390_reloc_name_lookup): New function.
747         (bfd_elf64_bfd_reloc_name_lookup): Define.
748         * elf64-sh64.c (sh_elf64_reloc_name_lookup): New function.
749         (bfd_elf64_bfd_reloc_name_lookup): Define.
750         * elf64-sparc.c (bfd_elf64_bfd_reloc_name_lookup): Define.
751         * elf64-x86-64.c (elf64_x86_64_reloc_name_lookup): New function.
752         (bfd_elf64_bfd_reloc_name_lookup): Define.
753         * elfn32-mips.c (bfd_elf32_bfd_reloc_name_lookup): New function.
754         * elfxx-ia64.c (elfNN_ia64_reloc_name_lookup): New function.
755         (bfd_elfNN_bfd_reloc_name_lookup): Define.
756         * elfxx-sparc.c (_bfd_sparc_elf_reloc_name_lookup): New function.
757         * elfxx-sparc.h (_bfd_sparc_elf_reloc_name_lookup): Declare.
758         * i386msdos.c (msdos_bfd_reloc_name_lookup): Define.
759         * i386os9k.c (aout_32_bfd_reloc_name_lookup): Define.
760         * ieee.c (ieee_bfd_reloc_name_lookup): Define.
761         * libaout.h (NAME (aout, reloc_name_lookup)): Declare.
762         * libbfd-in.h (_bfd_norelocs_bfd_reloc_name_lookup): Declare.
763         * mipsbsd.c (MY_bfd_reloc_name_lookup): Define.
764         (MY(reloc_type_lookup)): Rename from MY(reloc_howto_type_lookup).
765         (MY(reloc_name_lookup)): New function.
766         * nlm-target.h (nlm_bfd_reloc_name_lookup): Define.
767         * oasys.c (oasys_bfd_reloc_name_lookup): Define.
768         * pdp11.c (NAME (aout, reloc_name_lookup)): New function.
769         * pe-mips.c (coff_mips_reloc_name_lookup): New function.
770         (coff_bfd_reloc_name_lookup): Define.
771         * reloc.c (bfd_reloc_name_lookup): New function.
772         * riscix.c (riscix_reloc_name_lookup): New function.
773         (MY_bfd_reloc_name_lookup): Define.
774         * som.c (som_bfd_reloc_name_lookup): New function.
775         * targets.c (struct bfd_target): Add reloc_name_lookup.
776         (BFD_JUMP_TABLE_RELOCS): Add NAME##_bfd_reloc_name_lookup.
777         * versados.c (versados_bfd_reloc_name_lookup): Define.
778         * vms.c (vms_bfd_reloc_name_lookup): New function.
779         * bfd-in2.h: Regenerate.
780         * libbfd.h: Regenerate.
781
782 2007-03-26  Thiemo Seufer  <ths@mips.com>
783
784         PR ld/4208
785         * elfxx-mips.c (mips_elf_next_relocation): Don't signal an error if no
786         matching relocation is found.
787         (_bfd_mips_elf_relocate_section): Only warn about missing relocations.
788
789 2007-03-23  H.J. Lu  <hongjiu.lu@intel.com>
790
791         * configure: Regenerated.
792
793 2007-03-23  Joseph Myers  <joseph@codesourcery.com>
794
795         * configure.in: Use ACX_PKGVERSION and ACX_BUGURL.
796         * configure: Regenerate.
797
798 2007-03-23  Alan Modra  <amodra@bigpond.net.au>
799
800         * elf32-spu.c (spu_stub_name): Don't put input section in stub name.
801         Remove input_sec param.  Adjust all calls.
802         (write_one_stub): Adjust stub symbol.
803         (needs_ovl_stub): New function, extracted from..
804         (spu_elf_size_stubs): ..here.
805         (spu_elf_relocate_section): Use needs_ovl_stub.
806
807 2007-03-22  Joseph Myers  <joseph@codesourcery.com>
808
809         * Makefile.am (bfdver.h): Only set VERSION_PACKAGE in bfdver.texi
810         if nonempty.
811         * configure.in (REPORT_BUGS_TO): Do not use "URL:" prefix.
812         * Makefile.in, configure, doc/Makefile.in: Regenerate.
813
814 2007-03-22  H.J. Lu  <hongjiu.lu@intel.com>
815
816         PR ld/4210
817         * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Use the virtual
818         address and virtual size of the last section for the image
819         size.
820
821 2007-03-22  H.J. Lu  <hongjiu.lu@intel.com>
822
823         PR ld/4007
824         * elf.c (assign_file_positions_for_load_sections): Check if
825         all sections are in the segment.
826
827 2007-03-20  H.J. Lu  <hongjiu.lu@intel.com>
828
829         PR ld/4208
830         * elfxx-mips.c (_bfd_mips_elf_relocate_section): Report missing
831         matching LO16 relocation for HI16 relocation.
832
833 2007-03-20  Paul Brook  <paul@codesourcery.com>
834
835         * bfd-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
836         * bfd-in2.h: Regenerate.
837         * elf32-arm.c (elf32_arm_link_hash_table): Add pic_veneer.
838         (record_arm_to_thumb_glue): Use globals->pic_veneer.
839         (elf32_arm_create_thumb_stub): Ditto.
840         (bfd_elf32_arm_set_target_relocs): Set globals->pic_veneer.
841
842 2007-03-18  Mark Shinwell  <shinwell@codesourcery.com>
843
844         * bfd-in.h (bfd_elf32_arm_set_target_relocs): Add "bfd *"
845         argument and extra last argument.
846         * bfd-in2.h: Regenerate.
847         * elf32-arm.c (elf32_arm_obj_tdata): Add no_enum_size_warning
848         member.
849         (bfd_elf32_arm_set_target_relocs): Add "bfd *" argument and
850         extra last argument.  Set no_enum_size_warning appropriately.
851         (elf32_arm_merge_eabi_attributes): Improve enum sizes
852         diagnostic, suppressing it when no_enum_size_warning dictates.
853
854 2007-03-20  Nick Clifton  <nickc@redhat.com>
855
856         PR binutils/3535
857         * elf.c (copy_private_bfd_data): Widen the scope of Solaris
858         specific conditions that need the program headers to be
859         rewritten.
860
861 2007-03-19  H.J. Lu  <hongjiu.lu@intel.com>
862
863         * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Store Magic,
864         MajorLinkerVersion, MinorLinkerVersion, SizeOfCode,
865         SizeOfInitializedData, SizeOfUninitializedData,
866         AddressOfEntryPoint, BaseOfCode and BaseOfData in internal
867         extra PE a.out header.
868         (IMAGE_NT_OPTIONAL_HDR_MAGIC): Defined as 0x10b if not defined.
869         (IMAGE_NT_OPTIONAL_HDR64_MAGIC): Defined as 0x20b if not
870         defined.
871         (IMAGE_NT_OPTIONAL_HDRROM_MAGIC): Defined as 0x107 if not
872         defined.
873         (_bfd_XX_print_private_bfd_data_common): Also print Magic,
874         MajorLinkerVersion, MinorLinkerVersion, SizeOfCode,
875         SizeOfInitializedData, SizeOfUninitializedData,
876         AddressOfEntryPoint, BaseOfCode and BaseOfData from internal
877         extra PE a.out header.
878
879 2007-03-18  H.J. Lu  <hongjiu.lu@intel.com>
880
881         * targets.c (_bfd_target_vector): Add bfd_efi_app_x86_64_vec
882         only if BFD64 is defined.
883
884 2007-03-17  Alan Modra  <amodra@bigpond.net.au>
885
886         * elf32-spu.c (spu_elf_size_stubs): Always use an overlay stub
887         on setjmp calls.
888
889 2007-03-15  H.J. Lu  <hongjiu.lu@intel.com>
890
891         * doc/Makefile.in: Regenerated.
892
893 2007-03-15  H.J. Lu  <hongjiu.lu@intel.com>
894
895         * Makefile.am (bfdver.h): Substitute report_bugs_to.  Also
896         create doc/bfdver.texi.
897         * Makefile.in: Regenerated.
898
899         * configure.in (--with-bugurl): New option.
900         * configure: Regenerated.
901
902         * version.h (REPORT_BUGS_TO): New.
903
904 2007-03-13  H.J. Lu  <hongjiu.lu@intel.com>
905
906         PR binutils/3826
907         * elf-bfd.h (elf_backend_data): Add elf_osabi.
908         (_bfd_elf_set_osabi): New.
909
910         * elf.c (_bfd_elf_set_osabi): New.
911
912         * elf32-hppa.c (elf32_hppa_post_process_headers): Removed.
913         (elf_backend_post_process_headers): Defined with
914         _bfd_elf_set_osabi.
915         (ELF_OSABI): Properly defined for each target.
916
917         * elf32-i370.c (i370_elf_post_process_headers): Removed.
918         (ELF_OSABI): Defined.
919         (elf_backend_post_process_headers): Defined with
920         _bfd_elf_set_osabi.
921
922         * elf32-i386.c (ELF_OSABI): Defined to ELFOSABI_FREEBSD for
923         freebsd.
924         (elf_i386_post_process_headers): Set EI_OSABI with elf_osabi.
925
926         * elf32-msp430.c (elf32_msp430_post_process_headers): Removed.
927         (ELF_OSABI): Defined.
928         (elf_backend_post_process_headers): Defined with
929         _bfd_elf_set_osabi.
930
931         * elf64-alpha.c (ELF_OSABI): Defined to ELFOSABI_FREEBSD for
932         freebsd.
933         (elf64_alpha_fbsd_post_process_headers): Set EI_OSABI with
934         elf_osabi.
935
936         * elf64-hppa.c (elf64_hppa_post_process_headers): Set EI_OSABI
937         with elf_osabi.
938         (ELF_OSABI): Properly defined for each target.
939         (elf_backend_post_process_headers): Defined with
940         _bfd_elf_set_osabi for Linux.
941
942         * elf64-sparc.c (elf64_sparc_fbsd_post_process_headers): Removed.
943         (ELF_OSABI): Defined to ELFOSABI_FREEBSD for freebsd.
944         (elf_backend_post_process_headers): Defined with
945         _bfd_elf_set_osabi.
946
947         * elf64-x86-64.c (elf64_x86_64_fbsd_post_process_headers): Removed.
948         (ELF_OSABI): Defined to ELFOSABI_FREEBSD for freebsd.
949         (elf_backend_post_process_headers): Defined with
950         _bfd_elf_set_osabi.
951
952         * elfcode.h (elf_object_p): Match the ELFOSABI_NONE ELF target
953         with any ELF target of the compatible machine for which we do not
954         have a specific backend.
955
956         * elfxx-ia64.c (elfNN_hpux_post_process_headers): Set EI_OSABI
957         with elf_osabi.
958
959         * elfxx-target.h (ELF_OSABI): Default to ELFOSABI_NONE.
960         (elfNN_bed): Initialize elf_osabi with ELF_OSABI.
961
962 2007-03-08  Alan Modra  <amodra@bigpond.net.au>
963
964         * elf32-v850.c (v850_elf_link_output_symbol_hook): Clean out
965         V850_OTHER_* bits.
966
967 2007-03-08  Alan Modra  <amodra@bigpond.net.au>
968
969         * Makefile.am (BFD64_BACKENDS): Add efi-app-x86_64.lo.
970         (BFD64_BACKENDS_CFILES): Add efi-app-x86_64.c.
971         Run "make dep-am".
972         * Makefile.in: Regenerate.
973         * po/SRC-POTFILES.in: Regenerate.
974
975 2007-03-07  H.J. Lu  <hongjiu.lu@intel.com>
976
977         * config.bfd (x86_64-*-freebsd*): Add bfd_efi_app_x86_64_vec.
978         (x86_64-*-kfreebsd*-gnu): Likewise.
979         (x86_64-*-netbsd*): Likewise.
980         (x86_64-*-openbsd*): Likewise.
981         (x86_64-*-linux-*): Likewise.
982
983         * configure.in: Support bfd_efi_app_x86_64_vec.
984         * configure: Regenerated.
985
986         * efi-app-x86_64.c: New file.
987
988         * targets.c (bfd_efi_app_x86_64_vec): New.
989         (_bfd_target_vector): Add bfd_efi_app_x86_64_vec.
990
991 2007-03-07  Kai Tietz   <kai.tietz@onevision.com>
992
993         * reloc.c (bfd_generic_get_relocated_section_contents): Remove
994         const for type reloc_howto_type.
995
996 2007-03-07  Alan Modra  <amodra@bigpond.net.au>
997
998         PR 3958
999         * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): No error on relocatable link.
1000         (elf_discarded_section): Move..
1001         * bfd-in.h: ..to here.
1002         * bfd-in2.h: Regenerate.
1003         * elflink.c (elf_link_input_bfd): Don't zap relocs against symbols
1004         from discarded sections before relocate_section has done its job.
1005         * reloc.c (bfd_generic_get_relocated_section_contents): Handle
1006         relocs against symbols from discarded sections.
1007         * elf-hppa.h (elf_hppa_howto_table): Set size.  Set dst_mask on
1008         SECREL32.
1009         (elf_hppa_relocate_section): Handle relocatable link after setting
1010         sec, sym, h etc. for final link.  Squash error messages for
1011         relocatable link.  Clear section contents for relocs against
1012         symbols in discarded sections, and zero reloc.  Remove existing
1013         zero r_symndx code.
1014         * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
1015         * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
1016         * elf32-arm.c (elf32_arm_relocate_section): Likewise.
1017         * elf32-avr.c (elf32_avr_relocate_section): Likewise.
1018         * elf32-bfin.c (bfinfdpic_relocate_section): Likewise.
1019         (bfin_relocate_section): Likewise.
1020         * elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise.
1021         * elf32-cris.c (cris_elf_relocate_section): Likewise.
1022         * elf32-crx.c (elf32_crx_relocate_section): Likewise.
1023         * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
1024         * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
1025         * elf32-frv.c (elf32_frv_relocate_section): Likewise.
1026         * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
1027         * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
1028         * elf32-i370.c (i370_elf_relocate_section): Likewise.
1029         * elf32-i386.c (elf_i386_relocate_section): Likewise.
1030         * elf32-i860.c (elf32_i860_relocate_section): Likewise.
1031         * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
1032         * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
1033         * elf32-m32c.c (m32c_elf_relocate_section): Likewise.
1034         * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
1035         * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
1036         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1037         * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
1038         * elf32-mep.c (mep_elf_relocate_section): Likewise.
1039         * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
1040         * elf32-mt.c (mt_elf_relocate_section): Likewise.
1041         * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
1042         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1043         * elf32-s390.c (elf_s390_relocate_section): Likewise.
1044         * elf32-score.c (_bfd_score_elf_relocate_section): Likewise.
1045         * elf32-sh.c (sh_elf_relocate_section): Likewise.
1046         * elf32-spu.c (spu_elf_relocate_section): Likewise.
1047         * elf32-v850.c (v850_elf_relocate_section): Likewise.
1048         * elf32-vax.c (elf_vax_relocate_section): Likewise.
1049         * elf32-xc16x.c (elf32_xc16x_relocate_section): Likewise.
1050         * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
1051         * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
1052         * elf64-alpha.c (elf64_alpha_relocate_section_r): Likewise.
1053         (elf64_alpha_relocate_section): Likewise.
1054         * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
1055         * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1056         * elf64-s390.c (elf_s390_relocate_section): Likewise.
1057         * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
1058         * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1059         * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
1060         * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
1061         * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
1062
1063         * elf32-arm.c (elf32_arm_relocate_section): Always adjust section
1064         symbols for relocatable link.  Don't use always-zero st_value.
1065         (elf_backend_rela_normal): Don't define.
1066         * elf32-bfin.c (bfinfdpic_relocate_section): Use
1067         RELOC_FOR_GLOBAL_SYMBOL.
1068         * elf32-frv.c (elf32_frv_relocate_section): Likewise.
1069         * elf32-d10v.c (elf32_d10v_relocate_section): Combine SEC_MERGE
1070         section symbol adjustments with same for relocatable link.
1071         * elf32-i386.c (elf_i386_relocate_section): Likewise.
1072         * elf32-m68hc1x.c (m68hc11_get_relocation_value): Move..
1073         (elf32_m68hc11_check_relocs): ..to here.
1074         * elf32-score.c (score_elf_final_link_relocate): Remove zero
1075         r_symndx code.
1076         * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
1077
1078 2007-03-07  Alan Modra  <amodra@bigpond.net.au>
1079
1080         PR 4144
1081         * elf.c (assign_file_positions_for_load_sections): Don't
1082         adjust p_memsz for !SEC_LOAD section vma modulo page size.
1083         Instead, use the same lma based adjustment for SEC_LOAD
1084         sections.
1085
1086 2007-03-01  Bob Wilson  <bob.wilson@acm.org>
1087
1088         * elf32-xtensa.c (analyze_relocations): Zero src_count if not relaxing.
1089         (find_relaxable_sections): Do not increment src_count for unknown
1090         opcodes.  Decode only once instead of calling is_l32r_relocation.
1091         (compute_text_actions): Remove unused no_insn_move flag.  Assert that
1092         src_next matches src_count in relax_info.
1093
1094 2007-03-01  Joseph Myers  <joseph@codesourcery.com>
1095
1096         * Makefile.am (bfdver.h): Use "." not " " between version number
1097         and date.
1098         * Makefile.in: Regenerate.
1099         * configure.in (PKGVERSION): Default to "(GNU Binutils) ".
1100         * configure: Regenerate.
1101
1102 2007-02-28  Nathan Sidwell  <nathan@codesourcery.com>
1103
1104         * config.bfd (sh-*-uclinux, sh[12]-*-uclinux): New stanza.
1105
1106 2007-02-27  Alan Modra  <amodra@bigpond.net.au>
1107
1108         * elf32-spu.h (struct _ovl_stream): Make "start" and "end" const.
1109         * elf32-spu.c (ovl_mgr_pread): Add const to casts.
1110
1111 2007-02-23  Carlos O'Donell  <carlos@codesourcery.com>
1112
1113         * dwarf2.c (_bfd_dwarf2_find_nearest_line): Assume 32-bit
1114         DWARF even with 64-bit addresses.
1115         (_bfd_dwarf2_find_nearest_line): Likewise.
1116
1117 2007-02-23  Nick Clifton  <nickc@redhat.com>
1118
1119         PR binutils/3535
1120         * elf.c (copy_private_bfd_data): Always rewrite the program
1121         headers when a Solaris interpreter segment is involved.
1122
1123 2007-02-22  Paul Brook  <paul@codesourcery.com>
1124
1125         * elflink.c (gc_mark_hook_fn): Remove.
1126         (_bfd_elf_gc_mark): Rename gc_mark_hook_fn to elf_gc_mark_hook_fn.
1127         (bfd_elf_gc_sections): Ditto.  Call gc_mark_extra_sections.
1128         * elf-bfd.h (elf_gc_mark_hook_fn): Define.
1129         (elf_backend_data): Add gc_mark_extra_sections.
1130         * elfxx-target.h (elf_backend_gc_mark_extra_sections): Provide default
1131         definition.
1132         (elfNN_bed): Add elf_backend_gc_mark_extra_sections.
1133         * elf32-arm.c (elf32_arm_gc_mark_extra_sections): New function.
1134         (elf_backend_gc_mark_extra_sections): Define.
1135
1136 2007-02-21  Nick Clifton  <nickc@redhat.com>
1137
1138         * elf.c (_bfd_elf_map_sections_to_segments): If the
1139         override_segment_assignment callback is defined then call it.
1140
1141 2007-02-21  Alan Modra  <amodra@bigpond.net.au>
1142
1143         * elf32-spu.c (spu_elf_size_stubs): Correct order of warning args.
1144
1145 2007-02-19  Thiemo Seufer  <ths@mips.com>
1146
1147         * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): Remove
1148         translation marker from untranslatable strings.
1149
1150 2007-02-19  Alan Modra  <amodra@bigpond.net.au>
1151
1152         * elf-bfd.h (struct elf_backend_data): Add default_execstack.
1153         * elflink.c (bfd_elf_size_dynamic_sections): Heed default_execstack.
1154         * elfxx-target.h (elf_backend_default_execstack): Define to 1.
1155         (elfNN_bed): Init new field.
1156         * elf64-ppc.c (elf_backend_default_execstack): Define to 0.
1157
1158 2007-02-17  Mark Mitchell  <mark@codesourcery.com>
1159             Nathan Sidwell  <nathan@codesourcery.com>
1160             Vladimir Prus  <vladimir@codesourcery.com
1161             Joseph Myers  <joseph@codesourcery.com>
1162
1163         * configure.in (--with-pkgversion): New option.
1164         * configure: Regenerate.
1165         * Makefile.am (bfdver.h): Substitute for @bfd_version_package@.
1166         * Makefile.in: Regenerate.
1167         * version.h (BFD_VERSION_STRING): Define using
1168         @bfd_version_package@.
1169
1170 2007-02-16  Carlos O'Donell  <carlos@codesourcery.com>
1171
1172         * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data):
1173         Print EF_MIPS_NOREORDER, EF_MIPS_PIC, EF_MIPS_CPIC, EF_MIPS_XGOT
1174         and EF_MIPS_UCODE.
1175
1176 2007-02-15  Alan Modra  <amodra@bigpond.net.au>
1177
1178         * libbfd-in.h (_bfd_norelocs_get_reloc_upper_bound): Don't define,
1179         declare.
1180         (_bfd_norelocs_canonicalize_reloc): Likewise.
1181         * libbfd.h: Regenerate.
1182         * libbfd.c (_bfd_norelocs_get_reloc_upper_bound): New function.
1183         (_bfd_norelocs_canonicalize_reloc): Likewise.
1184         * binary.c (binary_bfd_reloc_type_lookup): Don't define.
1185         (binary_get_reloc_upper_bound, binary_canonicalize_reloc): Likewise.
1186         (binary_vec): Use _bfd_norelocs in BFD_JUMP_TABLE_RELOCS.
1187         * ihex.c: Similarly.
1188         * mach-o-target.c: Similarly.
1189         * mach-o.c: Similarly.
1190         * mmo.c: Similarly.
1191         * pef.c: Similarly.
1192         * ppcboot.c: Similarly.
1193         * srec.c: Similarly.
1194         * xsym.c: Similarly.
1195
1196 2007-02-14  H.J. Lu  <hongjiu.lu@intel.com>
1197
1198         PR ld/3953
1199         * elflink.c (_bfd_elf_add_default_symbol): Check warning symbol
1200         when adding default symbol.
1201
1202 2007-02-13  Alan Modra  <amodra@bigpond.net.au>
1203
1204         * elf64-ppc.c (create_linkage_sections): Use section ".branch_lt"
1205         for branch lookup table.
1206
1207 2007-02-12  Alan Modra  <amodra@bigpond.net.au>
1208
1209         * elf64-ppc.c (create_linkage_sections): Don't create
1210         .rela.rodata.brlt for --emit-relocs.
1211         (ppc_build_one_stub): Create relocs for brlt --emit-relocs here.
1212         (ppc_size_one_stub): Count them.  Simplify test of stub type
1213         when counting stub relocs.  Set SEC_RELOC too.
1214         (ppc64_elf_size_stubs): Clear reloc_count and SEC_RELOC.
1215         (ppc64_elf_finish_dynamic_sections): Output brlt relocs.
1216
1217 2007-02-12  Alan Modra  <amodra@bigpond.net.au>
1218
1219         * elflink.c (evaluate_complex_relocation_symbols): Ignore relocs
1220         with a zero symbol index.
1221
1222 2007-02-12  Alan Modra  <amodra@bigpond.net.au>
1223
1224         * elflink.c (bfd_elf_discard_info): Tidy setting of "eh".
1225
1226 2007-02-05  Dave Brolley  <brolley@redhat.com>
1227             Stan Cox  <scox@redhat.com>
1228
1229         PR ld/3972
1230         * elflink.c (elf_link_input_bfd): Always setup finfo->internal_syms.
1231
1232 2007-02-05  Dave Brolley  <brolley@redhat.com>
1233             Richard Sandiford  <rsandifo@redhat.com>
1234             Stan Cox  <scox@redhat.com>
1235             Nick Clifton  <nickc@redhat.com>
1236             DJ Delorie  <dj@redhat.com>
1237             Frank Ch. Eigler  <fche@redhat.com>
1238             Ben Elliston  <bje@redhat.com>
1239             Richard Henderson  <rth@redhat.com>
1240
1241         * Makefile.am (ALL_MACHINES): Add cpu-mep.lo.
1242         (ALL_MACHINES_CFILES): Add CPU_MEP.c.
1243         (BFD32_BACKENDS): Add elf32-mep.lo.
1244         (BFD32_BACKENDS_CFILES): Add elf32-mep.c.
1245         (cpu-mep.lo,elf32-mep.lo): New targets.
1246         * archures.c (bfd_arch_mep): New enumerator.
1247         (bfd_mach_mep, bfd_mach_mep_h1): New macros.
1248         (bfd_mep_arch): New external variable.
1249         (bfd_archures_list): Add bfd_mep_arch.
1250         * config.bfd: Support mep-*-elf.
1251         * configure.in: Support bfd_elf32_mep_vec and bfd_elf32_mep_little_vec.
1252         * reloc.c (BFD_RELOC_MEP_*): New relocation numbers.
1253         * targets.c (bfd_elf32_mep_vec,bfd_elf32_mep_little_vec): New extern
1254         declarations.
1255         (_bfd_target_vector): Add bfd_elf32_mep_vec and
1256         bfd_elf32_mep_little_vec.
1257         * mep-relocs.pl: New file.
1258         * cpu-mep.c: New file.
1259         * elf32-mep.c: New file.
1260         * bfd-in2.h: Regenerate.
1261         * po/POTFILES.in: Regenerate.
1262         * libbfd.h: Regenerate.
1263         * Makefile.in: Regenerate.
1264         * configure: Regenerate.
1265
1266 2007-02-05  Dave Brolley  <brolley@redhat.com>
1267
1268         * elflink.c (evaluate_complex_relocation_symbols): Check for
1269         STT_SRELC for global symbols.
1270         (perform_complex_relocations): Renamed to
1271         perform_complex_relocation and now examines only one relocation.
1272         (elf_link_input_bfd): Don't call perform_complex_relocations.
1273         * elf-bfd.h (bfd_elf_perform_complex_relocation_: New prototype.
1274         * elf32-mep.c (mep_elf_howto_table): Add R_RELC.
1275         (OD,OS,OU): #undefs corrected to N, S and U repectively.
1276         (mep_reloc_type_lookup): Handle BFD_RELOC_RELC.
1277         (complex_reloc_installation_howto): Removed.
1278         (mep_info_to_howto_rela): Remove special case for r_type==0xff.
1279         (mep_elf_relocate_section): Call bfd_elf_perform_complex_relocation.
1280
1281 2007-02-05  Dave Brolley  <brolley@redhat.com>
1282             Richard Sandiford  <rsandifo@redhat.com>
1283             DJ Delorie  <dj@redhat.com>
1284             Graydon Hoare  <graydon@redhat.com>
1285             Nick Clifton  <nickc@cambridge.redhat.com>
1286             Jeff Holcomb  <jeffh@redhat.com>
1287             Frank Ch. Eigler  <fche@redhat.com>
1288
1289         * elf-bfd.h (bfd_elf_perform_complex_relocations): New prototype.
1290         * elf.c (swap_out_syms): Handle BSF_RELC and BSF_SRELC.
1291         * elfcode.h (elf_slurp_symbol_table): Handle STT_RELC and STT_SRELC.
1292         * elflink.c (set_symbolValue): New static function.
1293         (resolve_symbol): Likewise.
1294         (resolve_section): Likewise.
1295         (undefined_reference): Likewise.
1296         (eval_symbol): Likewise.
1297         (evaluate_complex_relocation_symbols): Likewise.
1298         (put_value): Likewise.
1299         (get_value): Likewise.
1300         (decode_complex_addend):
1301         (bfd_elf_perform_complex_relocation): New function.
1302         (elf_link_input_bfd): Call evaluate_complex_relocation_symbols.
1303         * reloc.c (BFD_RELOC_RELC): New relocation number.
1304         * syms.c (BSF_RELC,BSF_SRELC): New macros.
1305
1306 2007-02-05  Bob Wilson  <bob.wilson@acm.org>
1307
1308         * elf32-xtensa.c (elf_xtensa_make_sym_local): Delete.
1309         (elf_xtensa_hide_symbol, elf_backend_hide_symbol): Delete.
1310         (elf_xtensa_fix_refcounts, elf_xtensa_allocate_plt_size)
1311         (elf_xtensa_allocate_got_size): Replace these with...
1312         (elf_xtensa_allocate_dynrelocs): ...this new function.
1313         (elf_xtensa_size_dynamic_sections): Use it.
1314
1315 2007-02-05  Bob Wilson  <bob.wilson@acm.org>
1316
1317         * elf32-xtensa.c (elf_howto_table) <R_XTENSA_GLOB_DAT>
1318         <R_XTENSA_JMP_SLOT, R_XTENSA_RELATIVE, R_XTENSA_PLT, R_XTENSA_DIFF32>:
1319         Set src_mask to zero.
1320         <R_XTENSA_DIFF8, R_XTENSA_DIFF16>: Likewise.  Also fix dst_mask.
1321         <R_XTENSA_ASM_EXPAND>: Set pcrel_offset to TRUE.
1322
1323 2007-02-02  Bob Wilson  <bob.wilson@acm.org>
1324
1325         * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Renamed to...
1326         (elf_xtensa_dynamic_symbol_p): ...this.
1327
1328 2007-02-02  Bob Wilson  <bob.wilson@acm.org>
1329
1330         * elf32-xtensa.c (plt_reloc_count): Move into link hash table.
1331         (struct elf_xtensa_link_hash_table): New.
1332         (elf_xtensa_hash_table): New.
1333         (elf_xtensa_link_hash_table_create): New.
1334         (elf_xtensa_check_relocs): Update plt_reloc_count references.
1335         Update arguments to add_extra_plt_sections.
1336         (elf_xtensa_create_dynamic_sections): Record new sections in the hash
1337         table.  Update for plt_reloc_count and add_extra_plt_sections.
1338         (add_extra_plt_sections, elf_xtensa_create_plt_entry): Replace dynobj
1339         argument with link info.  Update calls to elf_xtensa_get_plt_section
1340         and elf_xtensa_get_gotplt_section.
1341         (elf_xtensa_allocate_local_got_size, elf_xtensa_size_dynamic_sections)
1342         (elf_xtensa_relocate_section, elf_xtensa_finish_dynamic_sections)
1343         (elf_xtensa_discard_info_for_section, shrink_dynamic_reloc_sections)
1344         (relax_property_section): Get sections from the hash table and update
1345         function calls.
1346         (elf_xtensa_get_plt_section, elf_xtensa_get_gotplt_section): Replace
1347         dynobj argument with link info.  Get sections for first plt chunk from
1348         the hash table.
1349         (bfd_elf32_bfd_link_hash_table_create): Define.
1350
1351 2007-02-02  Jakub Jelinek  <jakub@redhat.com>
1352
1353         * elf-bfd.h (struct elf_obj_tdata): Change symbuf type to void *.
1354         * elf.c (struct elf_symbuf_symbol, struct elf_symbuf_head): New types.
1355         (struct elf_symbol): Change first member into union.
1356         (elf_sort_elf_symbol): Compare pointers to internal syms rather than
1357         internal syms.  Only compare st_shndx fields.
1358         (elf_create_symbuf): New function.
1359         (bfd_elf_match_symbols_in_sections): Use it.  If symbufs are available
1360         for bfds, use a binary search, otherwise don't qsort symbols
1361         unnecessarily only to select which symbols are for the particular
1362         shndx.
1363
1364 2007-02-01  Nick Clifton  <nickc@redhat.com>
1365
1366         PR ld/3852
1367         * elf.c (_bfd_elf_link_hash_table_init): Initialize all the fields
1368         in the elf_link_hash_table structure.
1369
1370 2007-02-01  Alan Modra  <amodra@bigpond.net.au>
1371
1372         * elf-bfd.h (struct elf_backend_data): Add elf_backend_write_core_note.
1373         * elfxx-target.h (elf_backend_write_core_note): Define and use.
1374         * elf.c (elfcore_write_prpsinfo): Call the above.  Add support for
1375         32-bit core note on 64-bit target.
1376         (elfcore_write_prstatus): Likewise.
1377         (elfcore_write_lwpstatus): Make note_name const.
1378         (elfcore_write_prfpreg): Likewise.
1379         (elfcore_write_pstatus): Add support for 32-bit core note on 64-bit
1380         target.
1381         * elf32-ppc.c (ppc_elf_write_core_note): New function.
1382         (elf_backend_write_core_note): Define.
1383         * elf64-ppc.c (ppc64_elf_write_core_note): New function.
1384         (elf_backend_write_core_note): Define.
1385
1386 2007-01-31  H.J. Lu  <hongjiu.lu@intel.com>
1387
1388         * elf32-cris.c (INCLUDED_TARGET_FILE): Removed.
1389         (elf32_bed): Defined for elf32-us-cris.
1390
1391         * elf64-sh64.c (elf64_bed): Defined for Linux.
1392         (INCLUDED_TARGET_FILE): Removed.
1393
1394         * elfxx-target.h (elfNN_bed): Always define. Don't check
1395         INCLUDED_TARGET_FILE.
1396
1397 2007-01-31  DJ Delorie  <dj@redhat.com>
1398
1399         * elf-m10300.c (mn10300_elf_relocate_section): Clarify the warning
1400         message for dangerous relocs, special case the common user error.
1401
1402 2007-01-30  H.J. Lu  <hongjiu.lu@intel.com>
1403
1404         * elf.c (copy_elf_program_header): Start from the first section
1405         in a segment and stop when all sections in a segment are
1406         accounted for.
1407
1408 2007-01-29  Julian Brown  <julian@codesourcery.com>
1409
1410         * bfd-in2.h: Regenerate.
1411         * bfd-in.h (bfd_arm_vfp11_fix): New enum. Specify how VFP11
1412         instruction scanning should be done.
1413         (bfd_elf32_arm_init_maps, bfd_elf32_arm_vfp11_erratum_scan)
1414         (bfd_elf32_arm_vfp11_fix_veneer_locations): Add prototypes.
1415         (bfd_elf32_arm_set_target_relocs): Add vfp11 fix type argument to
1416         prototype.
1417         * elf-bfd.h (elf_backend_write_section): Add struct bfd_link_info
1418         argument.
1419         * elf32-arm.c (VFP11_ERRATUM_VENEER_SECTION_NAME)
1420         (VFP11_ERRATUM_VENEER_ENTRY_NAME): Define macros.
1421         (elf32_vfp11_erratum_type): New enum.
1422         (elf32_vfp11_erratum_list): New struct. List of veneers or jumps to
1423         veneers.
1424         (_arm_elf_section_data): Add mapsize, erratumcount, erratumlist.
1425         (elf32_arm_link_hash_table): Add vfp11_erratum_glue_size,
1426         vfp11_fix and num_vfp11_fixes fields.
1427         (elf32_arm_link_hash_table_create): Initialise vfp11_fix,
1428         vfp11_erratum_glue_size, num_vfp11_fixes fields.
1429         (VFP11_ERRATUM_VENEER_SIZE): Define. Size of an (ARM) veneer.
1430         (bfd_elf32_arm_allocate_interworking_sections): Initialise erratum
1431         glue section.
1432         (elf32_arm_section_map_add): Add an code/data mapping symbol entry
1433         to a section's map.
1434         (record_vfp11_erratum_veneer): Create a single veneer, and its
1435         associated symbols.
1436         (bfd_elf32_arm_add_glue_sections_to_bfd): Add vfp11 erratum glue.
1437         (bfd_elf32_arm_init_maps): Initialise mapping symbol table for input
1438         BFDs.
1439         (bfd_elf32_arm_set_vfp11_fix): Set the type of erratum workaround
1440         required.
1441         (bfd_arm_vfp11_pipe): Define VFP11 instruction pipes.
1442         (bfd_arm_vfp11_regno): Recode a register number from a VFP11 insn.
1443         (bfd_arm_vfp11_write_mask): Update write mask according to coded
1444         register number.
1445         (bfd_arm_vfp11_antidependency): New function.
1446         (bfd_arm_vfp11_insn_decode): Decode a VFP11 insn.
1447         (elf32_arm_compare_mapping): Declare.
1448         (bfd_elf32_arm_vfp11_erratum_scan): Scan the sections of an input
1449         BFD for potential erratum-triggering insns. Record results.
1450         (bfd_elf32_arm_vfp11_fix_veneer_locations): Find out where veneers
1451         and branches to veneers have been placed in virtual memory after
1452         layout.
1453         (bfd_elf32_arm_set_target_relocs): Set vfp11_fix field in global
1454         hash table.
1455         (elf32_arm_output_symbol_hook): Remove.
1456         (elf32_arm_write_section): Output veneers, and branches to veneers.
1457         Use maps from input sections, not output sections, for code
1458         byte-swapping.
1459         * elf32-ppc.c (ppc_elf_write_section): Add dummy link_info argument.
1460         * elf32-score.c (_bfd_score_elf_write_section): Likewise.
1461         * elfxx-mips.c (_bfd_mips_elf_write_section): Likewise.
1462         * elfxx-mips.h (_bfd_mips_elf_write_section): Likewise.
1463
1464 2007-01-27  H.J. Lu  <hongjiu.lu@intel.com>
1465
1466         * elf64-hppa.c (elf64_bed): Defined for HPUX and Linux.
1467         (INCLUDED_TARGET_FILE): Removed.
1468
1469 2007-01-27  Mike Frysinger  <vapier@gentoo.org>
1470
1471         * elf32-hppa.c (elf32_bed): Define for hpux, linux and netbsd.
1472         (INCLUDED_TARGET_FILE): Remove.
1473
1474 2007-01-25  DJ Delorie  <dj@redhat.com>
1475
1476         * elf32-m32c.c (m32c_elf_howto_table): Don't complain about
1477         R_M32C_16 or R_M32C_24 relocs.
1478
1479 2007-01-25  Nick Clifton  <nickc@redhat.com>
1480
1481         PR binutils/3874
1482         * elf32-avr.c (avr_link_hash_table): Check to make sure that the
1483         hash table was created by elf32_avr_link_hash_table_create before
1484         using it.
1485         (elf32_avr_link_hash_newfunc): New function.  Just pass the call
1486         through to _bfd_elf_link_hash_newfunc.
1487         (elf32_avr_link_hash_table_create): Use
1488         elf32_avr_link_hash_newfunc instead of
1489         _bfd_elf_link_hash_newfunc.
1490         (elf32_avr_relocate_section): Check for the hash table pointer
1491         being NULL.
1492         (elf32_avr_relax_section, avr_build_one_stub,
1493         elf32_avr_setup_params, get_local_syms, elf32_avr_size_stubs,
1494         elf32_avr_build_stubs): Likewise.
1495
1496 2007-01-16  H.J. Lu  <hongjiu.lu@intel.com>
1497
1498         PR ld/3831
1499         * elf-bfd.h (bfd_elf_link_mark_dynamic_symbol): Add an
1500         argument, Elf_Internal_Sym *.
1501
1502         * elflink.c (bfd_elf_link_mark_dynamic_symbol): Mark a data
1503         symbol dynamic if info->dynamic_data is TRUE.
1504         (bfd_elf_record_link_assignment): Updated call to
1505         bfd_elf_record_link_assignment.
1506         (_bfd_elf_merge_symbol): Likewise.  Always call
1507         bfd_elf_link_mark_dynamic_symbol.
1508
1509 2007-01-12  H.J. Lu  <hongjiu.lu@intel.com>
1510
1511         * Makefile.am (BFD_LIBS): Removed.
1512         * Makefile.in: Regenerated.
1513
1514 2007-01-11  H.J. Lu  <hongjiu.lu@intel.com>
1515
1516         PR binutils/3631
1517         * Makefile.am (OFILES): Add @bfd64_libs@.
1518         (libbfd_la_SOURCES): Remove $(BFD64_LIBS_CFILES).
1519         * Makefile.in: Regenerated.
1520
1521         * configure.in (bfd_libs): Replaced by ...
1522         (bfd64_libs): This.
1523         * configure: Regenerated.
1524
1525 2007-01-11  Nathan Sidwell  <nathan@codesourcery.com>
1526
1527         * elf.c (assign_file_positions_for_load_sections): We can
1528         require fewer phdrs than expected.
1529
1530 2007-01-08  Kazu Hirata  <kazu@codesourcery.com>
1531
1532         * archures.c (bfd_mach_cpu32_fido): Rename to bfd_mach_fido.
1533         * bfd-in2.h: Regenerate.
1534         * cpu-m68k.c (arch_info_struct): Use bfd_mach_fido instead of
1535         bfd_mach_cpu32_fido.
1536         (m68k_arch_features): Use fido_a instead of cpu32.
1537         (bfd_m68k_compatible): Reject the combination of Fido and
1538         ColdFire.  Accept the combination of CPU32 and Fido with a
1539         warning.
1540         * elf32-m68k.c (elf32_m68k_object_p,
1541         elf32_m68k_merge_private_bfd_data,
1542         elf32_m68k_print_private_bfd_data): Treat Fido as an
1543         architecture by itself.
1544
1545 2007-01-08  Kai Tietz   <kai.tietz@onevision.com>
1546
1547         * config.bfd: Renamed target x86_64-*-mingw64 to x86_64-*-mingw*.
1548
1549 2007-01-05  Jakub Jelinek  <jakub@redhat.com>
1550
1551         * texhex.c (first_phase): Don't fall through into the default
1552         case.
1553         (pass_over): Replace abort () calls with return FALSE.  Fix
1554         buffer overflow.
1555
1556 2007-01-04  Jie Zhang  <jie.zhang@analog.com>
1557
1558         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't set
1559         SEC_EXCLUDE on zero size .eh_frame.
1560
1561 For older changes see ChangeLog-2006
1562 \f
1563 Local Variables:
1564 mode: change-log
1565 left-margin: 8
1566 fill-column: 74
1567 version-control: never
1568 End: