Update copyright year on libbfd-in.h.
[binutils.git] / bfd / ChangeLog
blobea80c1782d2569855329fd705b5663032c87ba11
1 2010-03-24  H.J. Lu  <hongjiu.lu@intel.com>
3         * libbfd-in.h: Update copyright year.
5 2010-03-21  H.J. Lu  <hongjiu.lu@intel.com>
7         PR ld/11413
8         * elflink.c (_bfd_elf_add_default_symbol): Check !executable
9         instead of shared.
11 2010-03-19  Jie Zhang  <jie@codesourcery.com>
13         * elf32-arm.c (struct section_list): Remove.
14         (section_list): Remove typedef.
15         (record_section_with_arm_elf_section_data): Remove.
16         (find_arm_elf_section_entry): Remove.
17         (get_arm_elf_section_data): Use is_arm_elf.
18         (unrecord_section_with_arm_elf_section_data): Remove.
19         (elf32_arm_new_section_hook): Don't call
20         record_section_with_arm_elf_section_data.
21         (elf32_arm_write_section): Set mapcount to -1 when
22         the map has been used. Don't call
23         unrecord_section_with_arm_elf_section_data.
24         (unrecord_section_via_map_over_sections): Remove.
25         (elf32_arm_close_and_cleanup): Remove.
26         (elf32_arm_bfd_free_cached_info): Remove.
27         (bfd_elf32_close_and_cleanup): Don't define.
28         (bfd_elf32_bfd_free_cached_info): Don't define.
30 2010-03-18  H.J. Lu  <hongjiu.lu@intel.com>
32         PR binutils/11396
33         * libcoff-in.h (pe_tdata): Add dont_strip_reloc.
34         * libcoff.h: Regenerated.
36         * peXXigen.c (_bfd_XXi_only_swap_filehdr_out): Clear F_RELFLG
37         if dont_strip_reloc is set.
38         (_bfd_XX_bfd_copy_private_bfd_data_common): Set
39         dont_strip_reloc on output if there is no .reloc and
40         IMAGE_FILE_RELOCS_STRIPPED isn't set in input.
42 2010-03-18  Wei Guozhi  <carrot@google.com>
44         PR gas/11323
45         * elf32-arm.c (elf32_arm_reloc_map): Map BFD_RELOC_ARM_GOT_PREL to
46         R_ARM_GOT_PREL.
47         * reloc.c (BFD_RELOC_ARM_GOT_PREL): New ARM relocation.
48         * bfd-in2.h: Regenerate.
49         * libbfd.h: Regenerate.
51 2010-03-17  H.J. Lu  <hongjiu.lu@intel.com>
53         * reloc.c (BFD_RELOC_SPU_PIC18): Removed.
54         (BFD_RELOC_SPU_STUB): Likewise.
56 2010-03-17  Jie Zhang  <jie@codesourcery.com>
58         * elf.c (assign_file_positions_for_load_sections): Avoid
59         overflow.
61 2010-03-17  Alan Modra  <amodra@gmail.com>
63         * plugin.c (bfd_plugin_object_p): Pass iostream to fileno using
64         proper type.
66 2010-03-17  Alan Modra  <amodra@gmail.com>
68         * elf32-arm.c (cortex_a8_erratum_scan): Warning fix.
70 2010-03-16  Alan Modra  <amodra@gmail.com>
72         * elf64-ppc.c (struct ppc_link_hash_table): Add do_toc_opt.
73         (ppc64_elf_edit_toc): Set it here.
74         (ha_reloc_match): New function.
75         (ppc64_elf_relocate_section): Optimize bigtoc insn sequences.
77 2010-03-15  Alan Modra  <amodra@gmail.com>
79         * elf64-ppc.c (ppc64_elf_has_small_toc_reloc): New function.
80         * elf64-ppc.h (ppc64_elf_has_small_toc_reloc): Declare.
82 2010-03-14  Alan Modra  <amodra@gmail.com>
84         PR ld/11378
85         * elf64-ppc.h (ppc64_elf_check_init_fini): Declare.
86         * elf64-ppc.c (call_check_done): Define.
87         (ppc64_elf_add_symbol_hook): Substitute bfd_get_section_name macro.
88         (ppc64_elf_check_relocs, ppc64_elf_size_dynamic_sections): Likewise.
89         (ppc64_elf_finish_multitoc_partition): Remove unnecessary check.
90         (toc_adjusting_stub_needed): Use call_check_done rather than toc_off.
91         Simplify return logic.  Iterate over all .init and .fini fragments
92         by recursion.  Set makes_toc_func_call here..
93         (ppc64_elf_next_input_section): ..rather than here.
94         (check_pasted_section, ppc64_elf_check_init_fini): New functions.
96 2010-03-13  Alan Modra  <amodra@gmail.com>
98         PR ld/11375
99         * elf64-ppc.c (ppc_type_of_stub): Always set *hash to the
100         function descriptor symbol if there is one, not just for plt stubs.
101         (ppc64_elf_relocate_section): Use fdh on all ppc_get_stub_entry calls.
103 2010-03-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
105         * elflink.c (bfd_elf_size_dynamic_sections): Don't emit base
106         version twice.
107         Skip it when constructing def.vd_next.
109         * elf32-i386.c (TARGET_LITTLE_SYM): Redefine to
110         bfd_elf32_i386_sol2_vec.
111         (TARGET_LITTLE_NAME): Redefine to elf32-i386-sol2.
112         (elf32_bed): Redefine to elf32_i386_sol2_bed.
113         (elf_backend_want_plt_sym): Redefine to 1.
115         * elf64-x86-64.c (TARGET_LITTLE_SYM): Redefine to
116         bfd_elf64_x86_64_sol2_vec.
117         (TARGET_LITTLE_NAME): Redefine to elf64-x86-64-sol2.
118         (elf64_bed): Redefine to elf64_x86_64_sol2_bed.
119         (elf_backend_want_plt_sym): Redefine to 1.
121         * config.bfd (i[3-7]86-*-solaris2*): Set targ_defvec to
122         bfd_elf32_i386_sol2_vec.
123         Replace bfd_elf64_x86_64_vec by bfd_elf64_x86_64_sol2_vec in
124         targ64_selvecs.
125         (x86_64-*-solaris2*): Set targ_defvec to bfd_elf32_i386_sol2_vec.
126         Replace bfd_elf64_x86_64_vec by bfd_elf64_x86_64_sol2_vec in
127         targ_selvecs.
129         * configure.in: Handle bfd_elf32_i386_sol2_vec,
130         bfd_elf64_x86_64_sol2_vec.
131         * configure: Regenerate.
133         * targets.c (bfd_elf32_i386_sol2_vec): Declare.
134         (bfd_elf64_x86_64_sol2_vec): Declare.
135         (_bfd_target_vector): Add bfd_elf32_i386_sol2_vec,
136         bfd_elf64_x86_64_sol2_vec.
138 2010-03-04  Daniel Jacobowitz  <dan@codesourcery.com>
140         * elf32-arm.c (elf32_arm_output_arch_local_syms): Skip non-program
141         sections.
143 2010-03-04  Alan Modra  <amodra@gmail.com>
145         PR 11302
146         * dwarf2.c (read_abbrevs): Return NULL on alloc failures.
147         (read_attribute_value, decode_line_info): Likewise.
148         (add_line_info, read_rangelist): Return FALSE on alloc failures.
149         (arange_add, sort_line_sequences): Likewise.
150         (find_abstract_instance_name): Handle failures from called funcs.
151         (scan_unit_for_symbols, parse_comp_unit, decode_line_info): Likewise.
152         (find_line): Realloc to a temp, and handle alloc fail.
154 2010-03-03  Daniel Jacobowitz  <dan@codesourcery.com>
156         * elf32-arm.c (elf32_arm_output_arch_local_syms): Do not add
157         a mapping symbol to an empty section.
159 2010-03-02  Matthew Gretton-Dann  <matthew.gretton-dann@arm.com>
161         * elf32-arm.c (elf32_arm_merge_eabi_attributes): Add a check of the
162         return value from the call to _bfd_elf_merge_object_attributes.
164 2010-03-02  Christophe Lyon  <christophe.lyon@st.com>
165         Alan Modra  <amodra@gmail.com>
167         * elf32-arm.c (a8_erratum_fix): Add st_type field to record the
168         destination mode of the a8 stub.
169         (elf32_arm_link_hash_table): Add top_id field.
170         (elf32_arm_link_hash_table_create): Initialize top_id.
171         (arm_type_of_stub): Update prototype, st_type can now be updated
172         by this function. Actual destination address in case of PLT is
173         computed here, to help factorizing code.
174         (elf32_arm_stub_name): Update prototype, use stub_type additional
175         parameter to build stub name.
176         (elf32_arm_get_stub_entry): Update prototype, use stub_type
177         additional parameter to build stub entry.
178         (arm_build_one_stub): Use bfd_put_16/bfd_put_32 instead of
179         put_thumb_insn/put_arm_insn as BE8 encoding is now handled later.
180         Call elf32_arm_final_link_relocate to process all in-stub
181         relocations.
182         (elf32_arm_setup_section_lists): Update top_id.
183         (cortex_a8_erratum_scan): Record stub destination mode.
184         (elf32_arm_size_stubs): Update call to arm_type_of_stub according
185         to new prototype.
186         (elf32_arm_final_link_relocate): Enable processing of in-stub
187         REL32 relocations. Rely on arm_type_of_stub to detect if a stub is
188         needed, enabling code factorization.
189         (elf32_arm_final_link): Process stub sections.
190         (elf32_arm_output_map_sym): Add entry to code/data map.
192 2010-03-01  David S. Miller  <davem@davemloft.net>
194         * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): When STT_GNU_IFUNC and
195         h->def_regular, set h->ref_regular.
196         (allocate_dynrelocs): Only force output of STT_GNU_IFUNC plt entries
197         and dynamic relocations if h->ref_regular.
199         * elfxx-sparc.c (struct elf_reloc_map): Delete.
200         (sparc_reloc_map): Delete.
201         (_bfd_sparc_elf_reloc_type_lookup): Explicitly handle each
202         relocation type in switch statements.
204 2010-02-25  Alan Modra  <amodra@gmail.com>
206         PR ld/11304
207         * elf.c (_bfd_elf_init_private_section_data): Rename need_group
208         to final_link and invert.  For final link allow some flags to
209         differ.  Don't specially allow flags to be all zero.
211 2010-02-24  Alan Modra  <amodra@gmail.com>
213         PR binutils/10858
214         * elfxx-mips.c (mips_elf_create_dynamic_relocation): Ise
215         SYMBOL_REFERENCES_LOCAL to exclude entries from the dynamic symbol
216         table.
218 2010-02-23  Andrew Zabolotny  <anpaza@mail.ru>
220         PR binutils/11297
221         * elf32-avr.c (elf_avr_howto_table): Add R_AVR_8.
222         (avr_reloc_map): Map BFD_RELOC_8 to R_AVR_8.
224 2010-02-22  Alan Modra  <amodra@gmail.com>
226         * reloc.c (bfd_check_overflow): When forming addrmask, shift
227         fieldmask left by rightshift.
228         (_bfd_relocate_contents): Likewise.  Use rightshift addrmask in all
229         overflow checks.
231 2010-02-20  H.J. Lu  <hongjiu.lu@intel.com>
233         * elf64-x86-64.c (elf64_x86_64_add_symbol_hook): Don't check
234         STT_GNU_IFUNC on large common symbol.
236 2010-02-18  H.J. Lu  <hongjiu.lu@intel.com>
238         * elf32-i386.c (elf_i386_add_symbol_hook): Don't set
239         has_ifunc_symbols if the symbol comes from a shared library.
240         * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
241         * elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise.
242         * elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise.
243         * elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise.
244         * elf64-x86-64.c (elf64_x86_64_add_symbol_hook): Likewise.
246 2010-02-19  Alan Modra  <amodra@gmail.com>
248         * elf.c (_bfd_elf_fixup_group_sections): New function, split out from..
249         (_bfd_elf_copy_private_header_data): ..here.
250         * elflink.c (_bfd_elf_size_group_sections): New function.
251         (bfd_elf_size_dynamic_sections): Call it.
252         * elf-bfd.h (_bfd_elf_size_group_sections): Declare.
253         (_bfd_elf_fixup_group_sections): Declare.
255 2010-02-18  Matthew Gretton-Dann  <matthew.gretton-dann@arm.com>
257         * elf32-arm.c (elf32_arm_merge_eabi_attributes): Add support for
258         merging Tag_DIV_use, Tag_MPextension_use, and
259         Tag_MPextension_use_legacy tags.
261 2010-02-18  Alan Modra  <amodra@gmail.com>
263         * elf.c (bfd_elf_set_group_contents): Revert accidental 2009-01-15
264         commit.  Don't write zeros for removed group members.
265         (_bfd_elf_copy_private_header_data): Adjust size of group section
266         when group members are removed by objcopy.
268 2010-02-15  Dave Korn  <dave.korn.cygwin@gmail.com>
270         PR binutils/11280
271         * configure.host (*-*-solaris2.11):  Add host define to select
272         valid default code page for windres/windmc on solaris.
274 2010-02-15  Nick Clifton  <nickc@redhat.com>
276         * po/vi.po: Updated Vietnamese translation.
278 2010-02-12  Daniel Gutson  <dgutson@codesourcery.com>
280         * elf32-arm.c (elf32_arm_output_arch_local_syms): add
281         missing mapping symbol to data only sections.
283 2010-02-11  David S. Miller  <davem@davemloft.net>
285         * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): For R_SPARC_GOTDATA_OP_HIX22
286         and R_SPARC_GOTDATA_OP_LOX10, only bump the GOT refcount for global
287         symbols.
288         (_bfd_sparc_elf_gc_sweep_hook): Likewise only decrement the GOT count for
289         these relocs on global symbols.
290         (gdopoff): New.
291         (_bfd_sparc_elf_relocate_section): Perform GOTDATA optimizations on
292         local symbol references which are not STT_GNU_IFUNC.  Handle
293         relocation of them like R_SPARC_HIX22 and R_SPARC_LOX10 respectively,
294         and deal with negative vs. non-negative values properly.
296 2010-02-09  Tristan Gingold  <gingold@adacore.com>
298         * mach-o.c (bfd_mach_o_canonicalize_one_reloc): Adjust addend for
299         non-external relocation.
301 2010-02-09  Alan Modra  <amodra@gmail.com>
303         * elf64-ppc.c (merge_got_entries): Move earlier in file.
304         (allocate_dynrelocs): Merge got entries here if not doing multi-toc.
305         (ppc64_elf_size_dynamic_sections): Similarly merge tlsld_got.
306         (ppc64_elf_layout_multitoc): Don't resize if we have already
307         merged got entries.
309 2010-02-09  Michael Holzheu  <holzheu@de.ibm.com>
311         * elf-bfd.h (elfcore_write_s390_timer, elfcore_write_s390_todcmp,
312         elfcore_write_s390_todpreg, elfcore_write_s390_ctrs,
313         elfcore_write_s390_prefix): New.
314         * elf.c (elfcore_write_s390_timer, elfcore_write_s390_todcmp,
315         elfcore_write_s390_todpreg, elfcore_write_s390_ctrs,
316         elfcore_write_s390_prefix): New.
317         (elfcore_grok_note): Handle NT_S390_TIMER, NT_S390_TODCMP,
318         NT_S390_TODPREG, NT_S390_CTRS and NT_S390_PREFIX.
319         (elfcore_write_register_note): Handle .reg-s390-timer, 
320         .reg-s390-todcmp, .reg-s390-todpreg, .reg-s390-ctrs,
321         .reg-s390-prefix section.
323 2010-02-09  Alan Modra  <amodra@gmail.com>
325         * elf64-ppc.c (struct got_entry): Make tls_type and is_indirect
326         unsigned char.  Update variables and code using them throughout file.
327         (struct ppc_link_hash_entry): Likewise for tls_mask.
329         * elf64-ppc.c (ppc64_elf_layout_multitoc): Don't merge local got ents.
331         * elf64-ppc.c (has_small_toc_reloc): Don't define.
332         (makes_toc_func_call, call_check_in_progress): Shuffle flags.
333         (struct ppc64_elf_obj_tdata): Add has_small_toc_reloc.  Update
334         code setting the flag.
335         (ppc64_elf_next_toc_section): Group big-toc sections in
336         0x80008000 chunks.
338 2010-02-08  David S. Miller  <davem@davemloft.net>
340         * elfxx-sparc.h (struct _bfd_sparc_elf_link_hash_table): Remove sgot,
341         srelgot, splt, srelplt, and sgotplt members in favor of generic copies.
343         * elfxx-sparc.c (create_got_section): Delete.
344         (_bfd_sparc_elf_create_dynamic_sections): Don't call, the dynamic
345         section creator does that work for us.  Use ->elf.foo instead of
346         ->foo where applicable.
347         (_bfd_sparc_elf_check_relocs): Use ->elf.foo instead of ->foo
348         where applicable.
349         (allocate_dynrelocs): Likewise.
350         (_bfd_sparc_elf_size_dynamic_sections): Likewise.
351         (_bfd_sparc_elf_relocate_section): Likewise.
352         (sparc_vxworks_build_plt_entry): Likewise.
353         (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
354         (sparc_finish_dyn): Likewise.
355         (sparc_vxworks_finish_exec_plt): Likewise.
356         (sparc_vxworks_finish_shared_plt): Likewise.
357         (_bfd_sparc_elf_finish_dynamic_sections): Likewise.
359         * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Use the SYMBOL_*
360         macros for visibilty and locality checks.
361         (_bfd_sparc_elf_adjust_dynamic_symbol): Likewise.
362         (allocate_dynrelocs): Likewise.
363         (_bfd_sparc_elf_relocate_section): Likewise.
364         (_bfd_sparc_elf_finish_dynamic_symbol):Likewise.
366         * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove set
367         but never used local var 'dynobj'.
369         * elfxx-sparc.c (_bfd_sparc_elf_adjust_dynamic_symbol): Handle
370         nocopyreloc.
372         * reloc.c (BFD_RELOC_SPARC_JMP_IREL): New.
373         (BFD_RELOC_SPARC_IRELATIVE): Likewise.
374         * bfd-in2.h: Regenerate.
375         * libbfd.h: Regenerate.
377         * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add loc_hash_table
378         and loc_hash_memory.
379         (_bfd_sparc_elf_link_hash_table_free): Declare.
380         * elf32-sparc.c (elf32_sparc_add_symbol_hook): New.
381         (elf_backend_add_symbol_hook, elf_backend_post_process_headers,
382         bfd_elf32_bfd_link_hash_table_free): Define.
383         * elf64-sparc.c (elf64_sparc_add_symbol_hook): Set
384         has_ifunc_symbols if STT_GNU_IFUNC.
385         (bfd_elf64_bfd_link_hash_table_free): Define.
386         (elf_backend_post_process_headers): Define always.
387         * elfxx-sparc.c (sparc_jmp_irel_howto, sparc_irelative_howto): New.
388         (sparc_reloc_map): Add entries for new IFUNC relocs.
389         (_bfd_sparc_elf_reloc_type_lookup): Handle new IFUNC relocs.
390         (_bfd_sparc_elf_info_to_howto_ptr): Likewise.
391         (elf_sparc_local_htab_hash, elf_sparc_local_htab_eq,
392         elf_sparc_get_local_sym_hash): New.
393         (_bfd_sparc_elf_create_dynamic_sections): Move PLT ops initialization
394         from here...
395         (_bfd_sparc_elf_link_hash_table_create): ... to here.  Allocate
396         local hash table.
397         (_bfd_sparc_elf_link_hash_table_free): New.
398         (create_ifunc_sections): New.
399         (_bfd_sparc_elf_check_relocs): Unconditionally assign htab->elf.dynobj
400         and call create_ifunc_sections().  For local STT_GNU_IFUNC symbols
401         cons up a fake local hash table entry for it.  Unconditionally add
402         a PLT refcount for STT_GNU_IFUNC symbols when h->def_regular.  Count
403         dyn relocs for ifunc.
404         (_bfd_sparc_elf_adjust_dynamic_symbol): Handle ifunc.
405         (allocate_dynrelocs):  Unconditionally emit a PLT entry when
406         STT_GNU_IFUNC and h->def_regular.  Count GOT dyn relocs for ifunc.
407         (allocate_local_dynrelocs): New function.
408         (_bfd_sparc_elf_size_dynamic_sections): Invoke it over the local hash
409         table.  Emit dynamic relocs to irelplt when not shared.  Treat iplt
410         like splt.
411         (_bfd_sparc_elf_relocate_section): Handle ifunc relocations by hand.
412         (_bfd_sparc_elf_finish_dynamic_symbol): Adjust for non-dynamic ifunc
413         plt in iplt/irelplt.
415 2010-02-08  Richard Sandiford  <r.sandiford@uk.ibm.com>
417         * xcofflink.c (_bfd_xcoff_bfd_final_link): When calculating
418         max_contents_size, only consider sections whose contents must
419         be swapped in.
421 2010-02-09  Alan Modra  <amodra@gmail.com>
423         * elf64-ppc.c (allocate_dynrelocs): Remove unused got structs here..
424         (ppc64_elf_size_dynamic_sections): ..and here..
425         (merge_got_entries): ..rather than here.
427 2010-02-09  Alan Modra  <amodra@gmail.com>
429         * elf64-ppc.c (struct ppc_link_hash_table): Add do_multi_toc.
430         (has_small_toc_reloc): Define.
431         (ppc64_elf_check_relocs): Set the above flags.
432         (ppc64_elf_edit_opd): Delete obfd param.
433         (ppc64_elf_tls_optimize): Likewise.
434         (ppc64_elf_edit_toc): Likewise.
435         (ppc64_elf_tls_setup): Likewise.  Add no_multi_toc param.
436         * elf64-ppc.h: Update prototypes.
438 2010-02-08  Alan Modra  <amodra@gmail.com>
440         * section.c (struct bfd_section): Delete has_tls_reloc,
441         has_tls_get_addr_call, has_gp_reloc, need_finalize_relax, reloc_done.
442         Add sec_flg0 thru sec_flg5.
443         (BFD_FAKE_SECTION): Update for changed flags.
444         * ecoff.c (bfd_debug_section): Likewise.
445         * elf32-ppc.c (has_tls_reloc, has_tls_get_addr_call): Define.
446         * elf64-ppc.c (has_tls_reloc, has_tls_get_addr_call): Define.
447         (has_toc_reloc, makes_toc_func_call, call_check_in_progress): Update.
448         * elf32-xtensa.c (reloc_done): Define.
449         * elfxx-ia64.c (skip_relax_pass_0, skip_relax_pass_1): Update.
450         * bfd-in2.h: Regenerate.
452 2010-02-08  Tristan Gingold  <gingold@adacore.com>
454         * mach-o.c (bfd_mach_o_canonicalize_one_reloc): Set reloc.r_extern
455         for non-scattered relocations.
457 2010-02-08  Nathan Sidwell  <nathan@codesourcery.com>
459         * elf32-ppc.c (ppc_elf_begin_write_processing): Allow empty
460         apuinfo sections, only scan input sections once and reuse the
461         buffer.
463 2010-02-08  Philipp Tomsich  <philipp.tomsich@theobroma-systems.com>
465         * archures.c (bfd_mach_ppc_titan): Define.
466         * bfd-in2.h: Regenerate.
467         * cpu-powerpc.c (bfd_powerpc_archs): Add titan entry.
469 2010-02-08  Alan Modra  <amodra@gmail.com>
471         * elf32-ppc.c (ppc_elf_check_relocs): Remove dead ifunc code.
473 2010-02-05  Sterling Augustine  <sterling@tensilica.com>
475         * elf.c (assign_file_positions_for_load_sections) Update lma of
476         section if necessary.  Fixes Bugzilla 11219.
478 2010-02-05  H.J. Lu  <hongjiu.lu@intel.com>
480         * elf32-i386.c: Remove trailing white spaces.
481         * elf64-x86-64.c: Likewise.
483 2010-02-03  Nick Clifton  <nickc@redhat.com>
485         * elf-bfd.h (emum elf_object_id): Rename to elf_target_id.  Add
486         entries for other architectures.
487         (struct elf_link_hash_table): Add hash_table_id field.
488         (elf_hash_table_id): New accessor macro.
489         * elflink.c (_bfd_elf_link_hash_table_init): Add target_id
490         parameter.
491         * elf-m10300.c (elf32_mn10300_hash_table): Check table id before
492         returning cast pointer.
493         (elf32_mn10300_link_hash_table_create): Identify new table as
494         containing MN10300 extensions.
495         (mn10300_elf_relax_section): Check pointer returned by
496         elf32_mn10300_hash_table.
497         * elf32-arm.c: Likewise, except using ARM extensions.
498         * elf32-avr.c: Likewise, except using AVR extensions.
499         * elf32-bfin.c: Likewise, except using BFIN extensions.
500         * elf32-cris.c: Likewise, except using CRIS extensions.
501         * elf32-frv.c: Likewise, except using FRV extensions.
502         * elf32-hppa.c: Likewise, except using HPPA32 extensions.
503         * elf32-i386.c: Likewise, except using I386 extensions.
504         * elf32-lm32.c: Likewise, except using LM32 extensions.
505         * elf32-m32r.c: Likewise, except using M32RM extensions.
506         * elf32-m68hc11.c: Likewise, except using M68HC11 extensions.
507         * elf32-m68hc1x.c: Likewise, except using M68HC11 extensions.
508         * elf32-m68hc1x.h: Likewise, except using M68HC11 extensions.
509         * elf32-m68k.c: Likewise, except using M68K extensions.
510         * elf32-microblaze.c: Likewise, except using MICROBLAZE extensions.
511         * elf32-ppc.c: Likewise, except using PPC32 extensions.
512         * elf32-s390.c: Likewise, except using S390 extensions.
513         * elf32-sh.c: Likewise, except using SH extensions.
514         * elf32-spu.c: Likewise, except using SPU extensions.
515         * elf32-xtensa.c: Likewise, except using XTENSA extensions.
516         * elf64-alpha.c: Likewise, except using ALPHA extensions.
517         * elf64-hppa.c: Likewise, except using HPPA64 extensions.
518         * elf64-ppc.c: Likewise, except using PPC64 extensions.
519         * elf64-s390.c: Likewise, except using S390 extensions.
520         * elf64-x86-64.c: Likewise, except using X86_64 extensions.
521         * elfxx-ia64.c: Likewise, except using IA64 extensions.
522         * elfxx-mips.c: Likewise, except using MIPS extensions.
523         * elfxx-sparc.c: Likewise, except using SPARC extensions.
524         * elfxx-sparc.h: Likewise, except using SPARC extensions.
525         * elf32-cr16.c (struct elf32_cr16_link_hash_table): Delete
526         redundant structure.
527         (elf32_cr16_hash_table): Delete unused macro.
528         (elf32_cr16_link_hash_traverse): Delete unused macro.
529         * elf32-score.c: Likewise.
530         * elf32-score7.c: Likewise.
531         * elf32-vax.c: Likewise.
532         * elf64-sh64.c: Likewise.
534 2010-02-03  Alan Modra  <amodra@gmail.com>
536         * elf64-ppc.c (struct plt_entry): Move earlier in file.
537         (struct got_entry): Likewise.  Add is_indirect and got.ent fields.
538         (struct ppc64_elf_obj_tdata): Change tlsld_got to be a struct got_entry.
539         Update all uses.
540         (struct ppc_link_hash_table): Add got_reli_size and second_toc_pass.
541         Remove no_multi_toc.
542         (update_local_sym_info, ppc64_elf_check_relocs): Clear is_indirect
543         when allocating a new struct got_entry.
544         (allocate_got): New function, extracted from..
545         (allocate_dynrelocs): ..here.  Abort on got entry in non-ppc64 bfd.
546         (ppc64_elf_size_dynamic_sections): Track got relocs allocated in
547         .reliplt by got_reli_size.  Set owner on ppc64_tlsld_got entries.
548         (ppc64_elf_setup_section_lists): Remove output_bfd param and
549         no_multi_toc, add add_stub_section and layout_sections_again.  Stash
550         new params in htab.  Extract some code to..
551         (ppc64_elf_start_multitoc_partition): ..here.  New function.
552         (ppc64_elf_next_toc_section): Check for linker script errors.  Handle
553         second pass toc scan.
554         (merge_got_entries, merge_global_got, reallocate_got): New functions.
555         (ppc64_elf_reinit_toc): Rename to..
556         (ppc64_elf_finish_multitoc_partition): ..this.
557         (ppc64_elf_layout_multitoc): New function.
558         (ppc64_elf_size_stubs): Delete output_bfd, add_stub_section and
559         layout_sections_again params.
560         (ppc64_elf_relocate_section): Handle indirect got entries.
561         * elf64-ppc.h: Update prototypes.  Declare new functions.
563 2010-02-02  H.J. Lu  <hongjiu.lu@intel.com>
565         * elf-bfd.h (elfcore_write_xstatereg): New.
567         * elf.c (elfcore_grok_xstatereg): New.
568         (elfcore_write_xstatereg): Likewise.
569         (elfcore_grok_note): Handle NT_X86_XSTATE.
570         (elfcore_write_register_note): Handle .reg-xstate section.
572 2010-02-01  Tristan Gingold  <gingold@adacore.com>
574         * som.c (som_write_ar_hdr): Define this macro.
576 2010-01-30  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
578         * elf32-hppa.c (final_link_relocate): Convert R_PARISC_TLS_GD21L,
579         R_PARISC_TLS_LDM21L and R_PARISC_TLS_IE21L relocations that use the
580         linkage table pointer to use the global table pointer if not doing
581         a shared link.
583 2010-01-29  Joel Brobecker  <brobecker@adacore.com>
585         * elf.c (elfcore_grok_lwpstatus): Do not overwrite the core signal
586         if it has already been set.
588 2010-01-27  Tristan Gingold  <gingold@adacore.com>
590         * vms.h: Remove trailing spaces.
591         (struct hdr_struct): Remove unused hdr_c_cpr field.
592         (enum file_format_enum): Add comments.
593         * vms.c (vms_bfd_print_private_bfd_data): New function that
594         replaces the macro.
595         Remove trailing spaces.
596         * vms-misc.c: Improve comments.
597         (_bfd_vms_get_object_record): Also handle files without pads.
598         * vms-hdr.c (_bfd_vms_write_dbg): Fix format string.
599         * vms-gsd.c (struct flagdescstruct): Make name field const.
600         (gsyflagdesc): Fix typo.
602 2010-01-27  Alan Modra  <amodra@gmail.com>
604         PR ld/11217
605         * elf64-ppc.c (struct ppc_link_hash_table): Add toc_bfd, toc_first_sec.
606         (ppc64_elf_setup_section_lists): Init them.
607         (ppc64_elf_next_toc_section): Don't partition multi-toc between .got
608         and .toc on the same input file.
609         (ppc64_elf_relocate_section): Correct GOT entry offset.
611 2010-01-26  Tristan Gingold  <gingold@adacore.com>
613         * targets.c (BFD_JUMP_TABLE_ARCHIVE): Add initializer for write_ar_hdr.
614         (bfd_target): Add _bfd_write_ar_hdr_fn field.
615         * archive.c (is_bsd44_extended_name): New macro.
616         (_bfd_generic_read_ar_hdr_mag): Use it.  Add extra_size.
617         (bfd_slurp_armap): Also check for "__.SYMDEF" as a BSD4.4 extended
618         name.
619         (_bfd_archive_bsd44_construct_extended_name_table): New function.
620         (_bfd_generic_write_ar_hdr): Ditto.
621         (_bfd_bsd44_write_ar_hdr): Ditto.
622         (_bfd_write_archive_contents): Call _bfd_write_ar_hdr.
623         (bsd_write_armap): Adjust firstreal computation.
624         * libbfd-in.h (struct areltdata): Add extra_size field.
625         (_bfd_generic_write_ar_hdr): Add prototype.
626         (_bfd_bsd44_write_ar_hdr): Ditto.
627         (_bfd_write_ar_hdr): Define.
628         (_bfd_noarchive_write_ar_hdr): Ditto.
629         (_bfd_archive_bsd_write_ar_hdr): Ditto.
630         (_bfd_archive_coff_write_ar_hdr): Ditto.
631         (_bfd_archive_bsd44_slurp_armap): Ditto.
632         (_bfd_archive_bsd44_slurp_extended_name_table): Ditto.
633         (_bfd_archive_bsd44_construct_extended_name_table): New prototype.
634         (_bfd_archive_bsd44_truncate_arname): Ditto.
635         (_bfd_archive_bsd44_write_armap): Ditto.
636         (_bfd_archive_bsd44_read_ar_hdr): Ditto.
637         (_bfd_archive_bsd44_write_ar_hdr): Ditto.
638         (_bfd_archive_bsd44_openr_next_archived_file): Ditto.
639         (_bfd_archive_bsd44_get_elt_at_index): Ditto.
640         (_bfd_archive_bsd44_generic_stat_arch_elt): Ditto.
641         (_bfd_archive_bsd44_update_armap_timestamp): Ditto.
642         * libbfd.h: Regenerate.
643         * oasys.c (oasys_write_ar_hdr): Define.
644         * libecoff.h (_bfd_ecoff_write_ar_hdr): Define.
645         * ieee.c (ieee_write_ar_hdr): Define.
646         * elf64-mips.c (bfd_elf64_archive_write_ar_hdr): Define.
647         * coff-rs6000.c (rs6000coff_vec): Adjust for write_ar_hdr field.
648         (bfd_pmac_xcoff_backend_data): Ditto.
649         * coff64-rs6000.c (rs6000coff64_vec): Ditto.
650         (bfd_xcoff_aix5_backend_data): Ditto.
651         * coff-alpha.c (alpha_ecoff_write_ar_hdr): Define.
652         * aout-target.h (MY_write_ar_hdr): Define it if not defined.
653         * aout-tic30.c (MY_write_ar_hdr): Ditto.
654         * mach-o-target.c (TARGET_NAME): Use _bfd_archive_bsd44 archive.
655         (bfd_mach_o_mkarchive, bfd_mach_o_read_ar_hdr)
656         (bfd_mach_o_slurp_armap, bfd_mach_o_slurp_extended_name_table)
657         (bfd_mach_o_construct_extended_name_table)
658         (bfd_mach_o_truncate_arname, bfd_mach_o_write_armap)
659         (bfd_mach_o_get_elt_at_index, bfd_mach_o_generic_stat_arch_elt)
660         (bfd_mach_o_update_armap_timestamp): Moved to mach-o.c
661         * mach-o.c (bfd_mach_o_mkarchive, bfd_mach_o_read_ar_hdr)
662         (bfd_mach_o_slurp_armap, bfd_mach_o_slurp_extended_name_table)
663         (bfd_mach_o_construct_extended_name_table)
664         (bfd_mach_o_truncate_arname, bfd_mach_o_write_armap)
665         (bfd_mach_o_get_elt_at_index, bfd_mach_o_generic_stat_arch_elt)
666         (bfd_mach_o_update_armap_timestamp): Moved from mach-o-target.c
667         * bfd-in2.h: Regenerate.
669 2010-01-26  Alan Modra  <amodra@gmail.com>
670             H.J. Lu  <hongjiu.lu@intel.com>
672         PR ld/11218
673         * elflink.c (elf_link_output_extsym): Do not ignore undefined
674         symbols with ref_regular set when gc_sections is active.
676 2010-01-25  Alan Modra  <amodra@gmail.com>
678         PR ld/11217
679         * elf64-ppc.c (ppc64_elf_tls_optimize): Optimize tls sequences
680         with relocations against undefined weak symbols.
681         (ppc64_elf_relocate_section): Don't optimize calls to undefined
682         weak functions if the symbol is dynamic.
683         (ppc64_elf_relocate_section): Edit tprel tls sequences.
684         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
685         (_bfd_elf_ppc_at_tprel_transform): New function.
686         * bfd-in.h (_bfd_elf_ppc_at_tprel_transform): Declare.
687         * bfd-in2.h: Regenerate.
689 2010-01-23  Richard Sandiford  <r.sandiford@uk.ibm.com>
691         * coff-rs6000.c (xcoff_howto_table): Change size to 0 and bitsize to 1.
692         (_bfd_xcoff_reloc_type_lookup): Handle BFD_RELOC_NONE.
693         * coff64-rs6000.c (xcoff64_howto_table): Change size to 0 and
694         bitsize to 1.
695         (xcoff64_reloc_type_lookup): Handle BFD_RELOC_NONE.
697 2010-01-21  Nick Clifton  <nickc@redhat.com>
699         * elflink.c (elf_link_add_object_symbols): Look up name of
700         undefined symbol both before and after versioning has been
701         applied.  Do not bother with symbols that are weakly undefined.
703 2010-01-21  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
705         * elf32-s390.c (elf32_s390_merge_private_bfd_data): New function.
706         (bfd_elf32_bfd_merge_private_bfd_data): New macro definition.
708 2010-01-19  Cary Coutant  <ccoutant@google.com>
710         * dwarf2.c (read_attribute_value): Add DW_FORM_ref_sig8.
712 2010-01-19  Daisuke Hatayama  <d.hatayama@jp.fujitsu.com>
713             Alan Modra <amodra@gmail.com>
715         * elfcode.h (elf_swap_ehdr_out): Handle e_phnum > 0xffff.
716         (elf_object_p): Read e_phnum extension.
717         (elf_write_shdrs_and_ehdr): Write e_phnum extension.
718         * elfcore.h (elf_core_file_p): Read e_phnum extension.  Sanity check
719         that we can read last program header.
721 2010-01-19  Matthew Gretton-Dann  <matthew.gretton-dann@arm.com>
723         * elf32-arm.c (elf32_arm_howto_table_1): Correct bitsize of
724         R_ARM_THM_CALL entry.
725         (elf32_arm_final_link_relocate): Correct calculation of
726         reloc_signed_max when doing a R_ARM_THM_CALL, R_ARM_THM_XPC22,
727         or R_ARM_THM_JUMP24 relocation.
729 2010-01-18  Alan Modra  <amodra@gmail.com>
731         PR 11168
732         * coffcode.h (coff_compute_section_file_positions): Move Rs6000COFF_C
733         block past vars in COFF_IMAGE_WITH_PE block.  Report error on more
734         than 32k sections.
736 2010-01-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
738         Fix compilation warning on gcc-3.4.
739         * vms-tir.c (start_etir_record, sto_imm): Rename the prototype
740         parameter index to sec_index according to the function definition.
742 2010-01-13  Chao-ying Fu  <fu@mips.com>
744         * elfxx-mips.c (JR_TO_B_P): New define to transform JR to B.
745         It is true for all CPUs.
746         (jal_reloc_p): New function.
747         (mips_elf_calculate_relocation): Rename require_jalxp to
748         cross_mode_jump_p.
749         Update comment for CROSS_MODE_JUMP_P.
750         Set up cross_mode_jump_p based on the mode change.
751         (mips_elf_perform_relocation): Rename require_jalx to cross_mode_jump_p.
752         Update comment for CROSS_MODE_JUMP_P.
753         Test cross_mode_jump_p and jal_reloc_p to turn jal to jalx.
754         Use !cross_mode_jump_p to guard conversion.
755         Convert "jr t9" to "b", if possible.
756         (_bfd_mips_elf_relocate_section): Rename require_jalx to
757         cross_mode_jump_p.
758         Pass &cross_mode_jump_p to call mips_elf_calculate_relocation.
759         Pass cross_mode_jump_p to call mips_elf_perform_relocation.
761 2010-01-13  Nick Clifton  <nickc@redhat.com>
763         * cpu-m32c.c (m32c_scan): New function.  Ensures that a scan for
764         "m32c" returns the m32c arch_info_struct and not the m16c
765         arch_info_struct.
766         (arch_info_struct): Use the new scan function.
767         (bfd_m32c_arch): Likewise.
769 2010-01-13  Tristan Gingold  <gingold@adacore.com>
771         * config.bfd: Remove duplicated target vector for i386-*-darwin.
772         Appends new arch instead of overriding.
773         Use mach_o_x86_64_vec for x86_64-*-darwin.
774         * configure.in: Add mach_o_x86_64_vec.
775         * configure: Regenerate.
776         * targets.c: Declare mach_o_x86_64_vec, add it to _bfd_target_vector.
777         * Makefile.am (BFD64_BACKENDS): Add mach-o-x86-64.lo
778         (BFD64_BACKENDS_CFILES): Add mach-o-x86-64.c
779         * Makefile.in: Regenerate.
780         * mach-o-x86-64.c: New file.
782 2010-01-13  Tristan Gingold  <gingold@adacore.com>
784         * reloc.c: Add MACH_O_X86_64 relocations.
785         * bfd-in2.h: Regenerate.
786         * libbfd.h: Regenerate.
788 2010-01-13  Tristan Gingold  <gingold@adacore.com>
790         * archive.c (normalize): Use lbasename.
791         (bfd_bsd_truncate_arname): Ditto.
792         (bfd_gnu_truncate_arname): Ditto.
794 2010-01-12  Tristan Gingold  <gingold@adacore.com>
796         * makefile.vms (CFLAGS): Turns warnings into informational messages.
798 2010-01-11  Tristan Gingold  <gingold@adacore.com>
800         * mach-o.h: Add x86-64 relocation types.
802 2010-01-11  Tristan Gingold  <gingold@adacore.com>
804         * mach-o.h (bfd_mach_o_backend_data): Add arch field.
805         (bfd_mach_o_set_arch_mach): New prototype.
806         * mach-o.c (bfd_mach_o_mkobject): Define with bfd_mach_o_gen_mkobject.
807         (bfd_mach_o_set_arch_mach): New function.
808         (bfd_mach_o_gen_mkobject): New function.
809         Set TARGET_ARCHITECTURE for the generic back-ends.
810         * mach-o-target.c (bfd_mach_o_set_arch_mach): Remove define.
811         Check that TARGET_ARCHITECTURE is defined.
812         Add TARGET_ARCHITECTURE in TARGET_NAME_BACKEND structure.
813         * mach-o-i386.c (TARGET_ARCHITECTURE): Define.
815 2010-01-11  Tristan Gingold  <gingold@adacore.com>
817         * archive.c (bfd_slurp_armap): Also check for Mach-O sorted armap.
819 2010-01-11  Nick Clifton  <nickc@redhat.com>
821         * elf32-v850.c (v850_elf_perform_relocation): Fix overflow
822         handling of R_V850_HI16_S relocation.
824 2010-01-11  Alan Modra  <amodra@gmail.com>
826         PR 11103
827         * dwarf1.c (parse_die): Correct FORM_STRING data pointer increment.
829 2010-01-11  Alan Modra  <amodra@gmail.com>
831         PR 6832
832         * dwarf2.c (struct comp_unit): Add sec_info_ptr.
833         (find_abstract_instance_name): Use it.
834         (parse_comp_unit): Set it.
836 2010-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
838         * Makefile.in: Regenerate.
839         * configure: Regenerate.
841 2010-01-08  Tristan Gingold  <gingold@adacore.com>
843         * archive.c: Remove bfd_special_undocumented_glue.
845 2010-01-08  Alan Modra  <amodra@gmail.com>
847         PR ld/11133
848         * elf32-cr16.c (elf32_cr16_gc_mark_hook): Call _bfd_elf_gc_mark_hook.
849         * elf32-microblaze.c (microblaze_elf_gc_mark_hook): Likewise.
850         * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
852 2010-01-07  H.J. Lu  <hongjiu.lu@intel.com>
854         PR ld/11138
855         * elflink.c (elf_link_check_versioned_symbol): Don't abort if
856         a symbol referenced by DSO is is defined in a non-shared object
857         and forced local.
859 2010-01-07  H.J. Lu  <hongjiu.lu@intel.com>
861         PR ld/11133
862         * elflink.c (_bfd_elf_gc_mark_hook): Check section XXX for
863         undefined __start_XXX/__stop_XXX in all input files and set
864         SEC_KEEP.
866 2010-01-07  H.J. Lu  <hongjiu.lu@intel.com>
868         PR ld/11143
869         * elflink.c (elf_gc_sweep): Keep SHT_NOTE section.
871 2010-01-04  Daniel Gutson  <dgutson@codesourcery.com>
873         * bfd.m4 (BFD_HAVE_SYS_PROCFS_TYPE): Define _STRUCTURE_PROC
874         before including procfs.h.
875         (BFD_HAVE_SYS_PROCFS_TYPE_MEMBER): Likewise.
876         * configure.in: Added autoconf probe for the pr_fpreg member.
877         * configure: Regenerated.
878         * config.in: Regenerated.
879         * elf.c: Define _STRUCTURE_PROC before including procfs.h.
881 2010-01-04  Joel Brobecker  <brobecker@adacore.com>
883         Fix -Wshadow warnings in dwarf2.c (seen on alpha-tru64).
884         * dwarf2.c (concat_filename): Rename dirname with dir_name
885         to void shadowing the dirname function.
886         Rename subdirname with subdir_name to stay consistent with
887         the new dir_name variable name.
889 2010-01-04  Edmar Wienskoski  <edmar@freescale.com>
891         * archures.c: Add bfd_mach_ppc_e500mc64.
892         * bfd-in2.h: Regenerate.
893         * cpu-powerpc.c (bfd_powerpc_archs): Add entry for
894         bfd_mach_ppc_e500mc64.
896 2010-01-01  Joel Brobecker  <brobecker@adacore.com>
898         Fix -Wshadow warnings (seen on ppc-aix)
899         * xcofflink.c: Replace finfo by flinfo throughout.
901 For older changes see ChangeLog-2009
903 Local Variables:
904 mode: change-log
905 left-margin: 8
906 fill-column: 74
907 version-control: never
908 End: