merge from gcc
[gdb/gnu.git] / bfd / ChangeLog
blob89774001c1bb7f0a6675005536e49bcfbd79faea
1 2013-10-18  Hans-Peter Nilsson  <hp@axis.com>
3         * elf32-cris.c (cris_elf_check_relocs): Don't assume
4         a registered dynobj means that a .got has been created.
6 2013-10-17  Alan Modra  <amodra@gmail.com>
8         PR 16056
9         * elf.c (copy_elf_program_header): Only consider SEC_ALLOC sections
10         when finding lowest_section.
12 2013-10-14  Chao-ying Fu  <Chao-ying.Fu@imgtec.com>
14         * elfxx-mips.c (mips_elf_obj_tdata): Add abi_msa_bfd.
15         (mips_elf_merge_obj_attributes): Set abi_msa_bfd to the first object
16         file that has a Tag_GNU_MIPS_ABI_MSA attribute.
17         Merge Tag_GNU_MIPS_ABI_MSA attributes.
19 2013-10-14  Nick Clifton  <nickc@redhat.com>
21         * gen-aout.c (main): Fix formatting.  Close file.
23 2013-10-13  Richard Sandiford  <rdsandiford@googlemail.com>
25         * elfxx-mips.c (mips_use_local_got_p): New function.
26         (mips_elf_count_got_symbols, mips_elf_calculate_relocation): Use it.
27         (_bfd_mips_elf_check_relocs): Set pointer_equality_needed for
28         GOT and absolute references.
30 2013-10-09  Roland McGrath  <mcgrathr@google.com>
32         * elf64-alpha.c (elf64_alpha_relax_tls_get_addr): Cast switch
33         expression to int to silence over-eager compiler warnings.
35         * xcofflink.c (_bfd_xcoff_bfd_final_link): Don't touch EREL in
36         loop that doesn't use (or initialize) it.
38         * elfxx-tilegx.c (tilegx32_plt_tail_entry, tilegx32_plt_tail_entry):
39         Move second const qualifier so it applies to the pointer.
41 2013-10-09  Nick Clifton  <nickc@redhat.com>
43         PR binutils/16022
44         * elf32-rx.c (rx_dump_symtab): Add missing break statements.
46 2013-10-09  Tom Tromey  <tromey@redhat.com>
48         * opncls.c (get_alt_debug_link_info_shim): Update type of 'len'.
50 2013-10-09  Nick Clifton  <nickc@redhat.com>
52         PR ld/16021
53         * elf32-rl78.c (rl78_dump_symtab): Delete.
54         (rl78_get_reloc): Delete.
56 2013-10-09  Tom Tromey  <tromey@redhat.com>
58         * bfd-in2.h: Rebuild.
59         * opncls.c (bfd_get_alt_debug_link_info): Change type of
60         buildid_len to bfd_size_type.
62 2013-10-09  Sergio Durigan Junior  <sergiodj@redhat.com>
64         PR binutils/15993
65         * elf32-m32c.c (dump_symtab): Add missing "break;" statement on each
66         "case".  Reindent "switch" statements.
68 2013-10-08  Tom Tromey  <tromey@redhat.com>
70         * bfd-in2.h: Rebuild.
71         * opncls.c (bfd_get_alt_debug_link_info): Add buildid_len
72         parameter.  Change type of buildid_out.  Update.
73         (get_alt_debug_link_info_shim): New function.
74         (bfd_follow_gnu_debuglink): Use it.
76 2013-10-08  Andreas Schwab  <schwab@suse.de>
78         * elf32-m68k.c (elf_m68k_size_dynamic_sections): Add DT_DEBUG also
79         for PIE executables.
81 2013-10-04  Jan-Benedict Glaw  <jbglaw@lug-owl.de>
83         * configure: Regenerate.
85 2013-10-03  Will Newton  <will.newton@linaro.org>
87         * configure: Regenerate.
88         * configure.in: Build elf-ifunc.o for AArch64.
89         * elfnn-aarch64.c: Include objalloc.h.
90         (elfNN_aarch64_local_htab_hash): New function.
91         (elfNN_aarch64_local_htab_eq): New function.
92         (elfNN_aarch64_get_local_sym_hash): New function.
93         (elfNN_aarch64_link_hash_table_create): Initialize local STT_GNU_IFUNC
94         symbol hash.
95         (elfNN_aarch64_hash_table_free): Free local STT_GNU_IFUNC symbol hash.
96         (elfNN_aarch64_final_link_relocate): Add sym argument.  Add support
97         for handling STT_GNU_IFUNC symbols.
98         (elfNN_aarch64_gc_sweep_hook): Add support for garbage collecting
99         references to STT_GNU_IFUNC symbols.
100         (elfNN_aarch64_adjust_dynamic_symbol): Add support for handling
101         STT_GNU_IFUNC symbols.
102         (elfNN_aarch64_check_relocs): Add support for handling STT_GNU_IFUNC
103         symbols.  Ensure we don't increase plt.refcount from -1 to 0.
104         (elfNN_aarch64_post_process_headers): Call _bfd_elf_set_osabi.
105         (elfNN_aarch64_is_function_type): Remove function.
106         (elfNN_aarch64_allocate_dynrelocs): Handle STT_GNU_IFUNC symbols.
107         (elfNN_aarch64_allocate_ifunc_dynrelocs): New function.
108         (elfNN_aarch64_allocate_local_dynrelocs): New function.
109         (elfNN_aarch64_allocate_local_ifunc_dynrelocs): New function.
110         (elfNN_aarch64_size_dynamic_sections): Call
111         elfNN_aarch64_allocate_local_dynrelocs.
112         (elfNN_aarch64_create_small_pltn_entry): Add info argument.
113         Add support for creating .iplt entries for STT_GNU_IFUNC symbols.
114         (elfNN_aarch64_finish_dynamic_symbol): Add support for handling
115         STT_GNU_IFUNC symbols and .iplt.
116         (elfNN_aarch64_finish_local_dynamic_symbol): New function.
117         (elfNN_aarch64_finish_dynamic_sections): Call
118         elfNN_aarch64_finish_local_dynamic_symbol.
120 2013-09-30  Nick Clifton  <nickc@redhat.com>
122         * cpu-msp430.c: Use printable names that match the values
123         displayed by readelf.
125 2013-08-25  Andrew Pinski  <apinski@cavium.com>
127         * elfnn-aarch64.c (TCB_SIZE): Base on the ARCH_SIZE rather than a
128         fixed size of 16.
130 2013-09-24  Gregory Fong  <gregory.0xf0@gmail.com>
132         * elfxx-mips.c (mips_elf_create_got_section): Hide
133         _GLOBAL_OFFSET_TABLE_.
135 2013-09-24  Alan Modra  <amodra@gmail.com>
137         * elf32-mips.c (ELF_OSABI): Undef for vxworks.
139 2013-09-24  Alan Modra  <amodra@gmail.com>
141         * syms.c (_bfd_stab_section_find_nearest_line): Ignore partial
142         stabs at end of .stab.  Tidy variable usage.  Don't drop the need
143         for a NULL function name stab if If N_FUN stab is ignored.
144         Ensure index entry count loop matches write loop.
146 2013-09-20  Alan Modra  <amodra@gmail.com>
148         * configure: Regenerate.
150 2013-09-18  Tristan Gingold  <gingold@adacore.com>
152         * configure.in: Bump version to 2.24.51
153         * configure: Regenerate.
155 2013-09-17  Doug Gilmore  <Doug.Gilmore@imgtec.com>
157         * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): Handle
158         EF_MIPS_FP64.
160 2013-08-31  John David Anglin  <dave.anglin@bell.net>
162         * elf64-hppa.c (elf_hppa_final_link_relocate): Add missing '%' to
163         format string.
165 2013-08-29  Jakub Jelinek  <jakub@redhat.com>
167         * elf64-x86-64.c (elf_x86_64_check_tls_transition): Allow
168         64-bit -mcmodel=large -fpic TLS GD and LD sequences.
169         (elf_x86_64_relocate_section): Handle -mcmodel=large -fpic
170         TLS GD and LD sequences in GD->LE, GD->IE and LD->LE transitions.
172 2013-08-27  Alan Modra  <amodra@gmail.com>
174         * elf-bfd.h (struct elf_backend_data): Remove as_needed_cleanup.
175         Add notice_as_needed.
176         * elf64-ppc.c (elf_backend_as_needed_cleanup): Don't define.
177         (elf_backend_notice_as_needed): Define.
178         (ppc64_elf_as_needed_cleanup): Rename and adjust..
179         (ppc64_elf_notice_as_needed): ..to this.
180         * elflink.c (_bfd_elf_notice_as_needed): New function, extracted..
181         (elf_link_add_object_symbols): ..from here.
182         * elfxx-target.h (elf_backend_as_needed_cleanup): Don't define.
183         (elf_backend_notice_as_needed): Define..
184         (elfNN_bed): ..and use here.
186 2013-08-26  Roland McGrath  <mcgrathr@google.com>
188         * archures.c (bfd_mach_i386_nacl, bfd_mach_i386_i386_nacl): New macros.
189         (bfd_mach_x86_64_nacl, bfd_mach_x64_32_nacl): New macros.
190         * cpu-i386.c (bfd_arch_i386_onebyte_nop_fill): New function.
191         (bfd_i386_nacl_arch): New variable.
192         (bfd_x86_64_nacl_arch, bfd_x64_32_nacl_arch): New variables.
193         (bfd_x64_32_arch_intel_syntax): Link them into the list.
194         * bfd-in2.h: Regenerate.
196 2013-08-26  Roland McGrath  <mcgrathr@google.com>
198         * elf-nacl.c (nacl_modify_segment_map): Fix logic reordering the
199         elf_segment_map list.  If an executable segment is page-aligned
200         but does not end with a full page, then append a fake section into
201         the segment map entry that pads out the page.
202         (nacl_final_write_processing): New function.  Write the code fill
203         laid out in nacl_modify_segment_map.
204         * elf-nacl.h: Declare it.
205         * elf32-arm.c (elf32_arm_nacl_final_write_processing): New function.
206         (elf_backend_final_write_processing): Define it for NaCl backend.
207         * elf32-i386.c (elf_backend_final_write_processing): Likewise.
208         * elf64-x86-64.c (elf_backend_final_write_processing): Likewise.
210         * elf-nacl.c (segment_eligible_for_headers): Rename MAXPAGESIZE
211         parameter to MINPAGESIZE.
212         (nacl_modify_segment_map): Use minpagesize instead of maxpagesize.
214         * elf32-arm.c (ELF_MINPAGESIZE, ELF_COMMONPAGESIZE): #undef for NaCl.
216 2013-08-24  Maciej W. Rozycki  <macro@linux-mips.org>
218         * elf32-tilepro.c (tilepro_elf_finish_dynamic_sections): Don't
219         set GOT's entry size if there is no ELF section data.
220         * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
221         * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_sections):
222         Likewise.
224 2013-08-23  H.J. Lu  <hongjiu.lu@intel.com>
226         * elf64-x86-64.c (get_elf_x86_64_arch_data): New.
227         (get_elf_x86_64_backend_data): Use it.
228         (elf_x86_64_size_dynamic_sections): Likewise.
230 2013-08-23  Yuri Chornoivan  <yurchor@ukr.net>
232         PR binutils/15834
233         * bfdio.c: Fix typos.
234         * elf32-spu.c: Likewise.
235         * elfnn-aarch64.c: Likewise.
237 2013-08-21  Tristan Gingold  <gingold@adacore.com>
239         * coff-rs6000.c (_bfd_xcoff_sizeof_headers): Also count
240         .ovrflo sections.
241         * coffcode.h (coff_compute_section_file_positions): Force
242         match between file offset and vma offset.
244 2013-08-21  Alan Modra  <amodra@gmail.com>
246         * elflink.c (_bfd_elf_merge_symbol): Set *poldbfd, *poldweak,
247         and *poldalignment before exiting when !relocs_compatible.
249 2013-08-21  Alan Modra  <amodra@gmail.com>
251         * elflink.c (_bfd_elf_define_linkage_sym): Don't set STV_INTERNAL
252         symbols to STV_HIDDEN.
254 2013-08-14  John Tytgat  <john@bass-software.com>
256         PR ld/15787
257         * elf32-arm.c (elf32_arm_final_link_relocate): Use origin of output
258         segment containing the relocating symbol instead of assuming 0 for
259         sb group relocations.
261 2013-08-09  Nick Clifton  <nickc@redhat.com>
263         * elf32-rl78.c (rl78_elf_merge_private_bfd_data): Complain if G10
264         flag bits do not match.
265         (rl78_elf_print_private_bfd_data): Describe G10 flag.
267 2013-08-05  John Tytgat  <john@bass-software.com>
269         * po/BLD-POTFILES.in: Regenerate.
270         * po/SRC-POTFILES.in: Likewise.
272 2013-07-31  John Tytgat  <john@bass-software.com>
274         PR ld/15787
275         * elf32-arm.c (elf32_arm_final_link_relocate): Base SB on the
276         output section VMA.
278 2013-07-28  Maciej W. Rozycki  <macro@linux-mips.org>
280         * elf64-hppa.c (elf64_hppa_finish_dynamic_sections)
281         <DT_HP_LOAD_MAP>: Return unsuccessfully if there's no `.data'
282         section.
284 2013-07-27  Andrew Pinski  <apinski@cavium.com>
286         * elfnn-aarch64.c (elfNN_aarch64_check_relocs):
287         Use the correct alignment for
288         _bfd_elf_make_dynamic_reloc_section for ILP32.
290 2013-07-27  Andrew Pinski  <apinski@cavium.com>
292         * elfnn-aarch64.c (elfNN_aarch64_howto_from_bfd_reloc): Handle
293         BFD_RELOC_AARCH64_NONE explicitly.
295 2013-07-27  Maciej W. Rozycki  <macro@linux-mips.org>
297         * elf32-vax.c (elf_vax_finish_dynamic_sections): Don't set GOT's
298         entry size if there is no ELF section data.
300 2013-07-27  Maciej W. Rozycki  <macro@linux-mips.org>
302         * elf32-vax.c (elf_vax_check_relocs) <R_VAX_GOT32, R_VAX_PLT32>:
303         Don't check symbol visibility here.  Remove a check already
304         asserted for.
305         (elf_vax_instantiate_got_entries): Use SYMBOL_REFERENCES_LOCAL
306         instead of individual checks.
307         (elf_vax_relocate_section) <R_VAX_GOT32, R_VAX_PLT32>: Only
308         check the offset to decide if produce a GOT or PLT entry.
309         Remove redundant assertions.  Remove code to produce GOT entries
310         for local symbols.  Remove a duplicate comment and add a comment
311         on GOT relocations.
312         (elf_vax_finish_dynamic_symbol): Remove code to produce RELATIVE
313         dynamic relocs.
315 2013-07-27  Maciej W. Rozycki  <macro@linux-mips.org>
317         * elf32-vax.c (elf_vax_always_size_sections): Correct a comment
318         typo.
320 2013-07-27  Maciej W. Rozycki  <macro@linux-mips.org>
322         * elf32-vax.c (elf_vax_discard_got_entries): New function.
323         (elf_vax_always_size_sections): Likewise.
324         (elf_vax_size_dynamic_sections): Remove code moved to
325         elf_vax_always_size_sections.  Make comment on
326         elf_vax_instantiate_got_entries match reality.
327         (elf_vax_instantiate_got_entries): Assert that rather than check
328         if dynobj is null.  Don't check for dynamic_sections_created.
329         Make function description match reality.
330         (elf_backend_always_size_sections): New macro.
332 2013-07-25  Alan Modra  <amodra@gmail.com>
334         * elf64-ppc.c (struct ppc64_elf_obj_tdata): Replace opd_relocs
335         with a union.
336         (opd_entry_value): Cache .opd section contents.
337         (ppc64_elf_relocate_section): Adjust.
339 2013-07-25  Alan Modra  <amodra@gmail.com>
341         PR ld/15762
342         PR ld/12761
343         * elflink.c (elf_link_add_object_symbols): Correct test in
344         last patch.  Remove unnecessary code.
346 2013-07-24  Tristan Gingold  <gingold@adacore.com>
348         * coff-rs6000.c (xcoff_howto_table): Fix masks and pc_relative for
349         R_RBR.  Add numbers in comments.
350         (_bfd_xcoff_reloc_type_lookup): Handle BFD_RELOC_PPC_B16.
351         * coff64-rs6000.c: Likewise.
353 2013-07-20  Alan Modra  <amodra@gmail.com>
355         PR ld/15762
356         PR ld/12761
357         * elflink.c (elf_link_add_object_symbols): Don't clobber
358         .gnu.warning.symbol sections when shared.
360 2013-07-19  Nick Clifton  <nickc@redhat.com>
362         * elf32-rx.c (rx_elf_relocate_section): Fix typo: move
363         saw_subtract from R_RX_OPdiv to R_RX_OPneg.
365 2013-07-18  Travis Snoozy  <quandary@remstate.com>
367         PR ld/15721
368         * elf32-msp430.c (R_MSP430_10_PCREL): Use 10-bit source and
369         destination masks.
370         * R_MSP430_2X_PCREL: Likewise.
371         * R_MSP430X_10_PCREL: Likewise.
372         * R_MSP430X_2X_PCREL: Likewise.
374 2013-07-18  Terry Guo  <terry.guo@arm.com>
376         * elf32-arm.c (arm_type_of_stub): Don't use ST_BRANCH_TO_ARM for
377         thumb only targets.
378         (elf32_arm_final_link_relocate): Likewise.
380 2013-07-18  Bill Neubauer  <wcn@google.com>
382         * mach-o.c (mach_o_section_name_xlat dw): Add entry for
383         .debug_gdb_scripts
385 2013-07-18  Roland McGrath  <mcgrathr@google.com>
387         * elf32-arm.c (elf32_arm_stub_long_branch_arm_nacl): New variable.
388         (elf32_arm_stub_long_branch_arm_nacl_pic): New variable.
389         (arm_build_one_stub): Increase MAXRELOCS to 3.
390         (arm_type_of_stub): Use them if GLOBALS->nacl_p.
391         (struct elf32_arm_link_hash_table): Give add_stub_section member's
392         pointee type a third argument.
393         (elf32_arm_create_or_find_stub_sec): Update caller.
394         (elf32_arm_size_stubs): Update argument type.
395         * bfd-in.h (elf32_arm_size_stubs): Update decl.
396         * bfd-in2.h: Regenerate.
397         * libbfd.h: Regenerate.
399 2013-07-15  Maciej W. Rozycki  <macro@codesourcery.com>
401         * elfxx-mips.c (mips_elf_merge_obj_attributes): Replace hardcoded
402         magic numbers with enum values.
404 2013-07-12  Roland McGrath  <mcgrathr@google.com>
406         * reloc.c: Add BFD_RELOC_390_PC12DBL, BFD_RELOC_390_PLT12DBL,
407         BFD_RELOC_390_PC24DBL, BFD_RELOC_390_PLT24DBL (should have
408         been added here with 2013-07-05 elf32-s390.c change).
409         * bfd-in2.h: Regenerate (no-op).
410         * libbfd.h: Regenerate (no-op).
412 2013-07-12  Maciej W. Rozycki  <macro@codesourcery.com>
414         * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Handle
415         EF_MIPS_NAN2008.
416         (_bfd_mips_elf_print_private_bfd_data): Likewise.
418 2013-07-09  Tristan Gingold  <gingold@adacore.com>
420         * vms-alpha.c (struct vms_private_data_struct): Remove
421         flag_hash_long_names and flag_show_after_trunc.
422         (hash_string): Remove.
423         (_bfd_vms_length_hash_symbol): Remove.
424         (alpha_vms_write_exec): Remove call to _bfd_vms_length_hash_symbol.
425         (_bfd_vms_write_egsd): Likewise.  Rewrite condition.
426         (_bfd_vms_write_ehdr): Remove code that set removed flags.
427         (_bfd_vms_write_etir): Remove call to _bfd_vms_length_hash_symbol.
428         (vms_bfd_is_local_label_name): Remove trace call.
430 2013-07-09  Tristan Gingold  <gingold@adacore.com>
432         * hosts/alphavms.h: Include config.h and ansidecl.h, remove useless
433         macros.
434         * configure.com: Adjust to match changes in configure.
435         * makefile.vms (OBJS): Update list.
437 2013-07-05  Tristan Gingold  <gingold@adacore.com>
439         * coffcode.h (coff_write_object_contents): Use ".ovrflo" name for
440         overflow sections.
442 2013-07-05  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
444         * elf32-s390.c: Add new relocation definitions R_390_PC12DBL,
445         R_390_PLT12DBL, R_390_PC24DBL, and R_390_PLT24DBL.
446         (elf_s390_reloc_type_lookup, elf_s390_check_relocs)
447         (elf_s390_gc_sweep_hook, elf_s390_relocate_section): Support new
448         relocations.
449         * elf64-s390.c: See elf32-s390.c
450         * bfd-in2.h: Add new relocs to enum bfd_reloc_code_real.
451         * libbfd.h: Add new reloc strings.
453 2013-07-03  Marcus Shawcroft  <marcus.shawcroft@arm.com>
455         * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Reorder case
456         values.
457         (elfNN_aarch64_relocate_section): Likewise.
458         (elfNN_aarch64_gc_sweep_hook): Likewise.
459         (elfNN_aarch64_check_relocs): Likewise.
461 2013-07-03  Alan Modra  <amodra@gmail.com>
463         * elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't hide .TOC.
464         when relocatable.  Don't change root.type or type here.
465         (ppc64_elf_set_toc): Set type of .TOC. to STT_OBJECT.
467 2013-07-03  Alan Modra  <amodra@gmail.com>
469         * elf64-ppc.c (struct ppc_stub_hash_entry): Delete "addend".
470         (ppc64_elf_size_stubs): Don't set "addend".
471         (ppc64_elf_relocate_section): Don't allow calls via
472         toc-adjusting stubs without a following nop even in an
473         executable, except for self-calls and both libc_start_main
474         and .libc_start_main.
476 2013-07-03  Alan Modra  <amodra@gmail.com>
478         * elf64-ppc.c (ppc64_elf_func_desc_adjust): Hide ".TOC.".
480 2013-07-02  Tristan Gingold  <gingold@adacore.com>
482         * coff-rs6000.c (xcoff_find_nearest_line_discriminator): Add missing
483         line.
485 2013-07-02  Tristan Gingold  <gingold@adacore.com>
487         * vms-alpha.c (_bfd_generic_find_nearest_line_discriminator): Define.
488         (_bfd_vms_find_nearest_line_discriminator): New function.
490 2013-07-02  Tristan Gingold  <gingold@adacore.com>
492         * coff-rs6000.c (xcoff_create_csect_from_smclas): Handle more smclas.
494 2013-07-02  Tristan Gingold  <gingold@adacore.com>
496         * coff-rs6000.c (xcoff_find_nearest_line_discriminator): New function.
497         (rs6000coff_vec): Reference it.
499 2013-07-02  Marcus Shawcroft  <marcus.shawcroft@arm.com>
501         * elfnn-aarch64.c (aarch64_elf_create_got_section): New.
502         (elfNN_aarch64_check_relocs): Use aarch64_elf_create_got_section.
503         (elfNN_aarch64_create_dynamic_sections): Do not define
504         _GLOBAL_OFFSET_TABLE_; call aarch64_elf_create_got_section.
506 2013-07-02  Marcus Shawcroft  <marcus.shawcroft@arm.com>
508         * ld-aarch64/emit-relocs-309-low.d: Adjust .text address.
509         * ld-aarch64/emit-relocs-309-up.d: Adjust .got address.
510         * ld-aarch64/emit-relocs-312.d: Adjust offsets into .got.
511         * ld-aarch64/tls-relax-all.d: Likewise.
512         * ld-aarch64/gc-got-relocs.d: Adjust expected .got content.
513         * ld-aarch64/gc-tls-relocs.d: Likewise.
514         * ld-aarch64/tls-relax-gd-ie.d: Likewise.
515         * ld-aarch64/tls-relax-gdesc-ie-2.d: Likewise.
516         * ld-aarch64/tls-relax-gdesc-ie.d: Likewise.
518 2013-07-02  Alan Modra  <amodra@gmail.com>
520         * elf64-ppc.c (ppc64_elf_relocate_section): Set "relocation" for
521         .TOC. after relocatable check.
523 2013-07-01  Alan Modra  <amodra@gmail.com>
525         * elf64-ppc.h (ppc64_elf_toc): Delete.
526         (ppc64_elf_set_toc): Declare.
527         * elf64-ppc.c (ppc64_elf_toc_reloc): Replace call to ppc64_elf_toc
528         with call the ppc64_elf_set_toc.
529         (ppc64_elf_toc_ha_reloc, ppc64_elf_toc64_reloc): Likewise.
530         (ppc64_elf_start_multitoc_partition): Likewise.
531         (struct ppc_link_hash_table): Delete dot_toc_dot.  Replace all uses
532         with elf.hgot.
533         (ppc64_elf_process_dot_syms): Don't make a fake function descriptor
534         for ".TOC.".
535         (ppc64_elf_check_relocs): Mark sections with a reference to .TOC.
536         as needing a toc pointer.
537         (ppc64_elf_size_stubs): Don't set dot_toc_dot here.
538         (ppc64_elf_set_toc): Rename from ppc64_elf_toc.  Add info param.
539         Set elf.hgot value.
541 2013-06-28  H.J. Lu  <hongjiu.lu@intel.com>
543         PR ld/15685
544         * elf64-x86-64.c (elf_x86_64_relocate_section): Handle
545         R_X86_64_DTPOFF64.
547 2013-06-28  Nick Clifton  <nickc@redhat.com>
549         PR ld/15302
550         * elf32-arm.c (allocate_dynrelocs_for_symbol): Revert previous patch.
552 2013-06-27  Marcus Shawcroft  <marcus.shawcroft@arm.com>
554         * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Reserve one slot
555         in sgot.
556         (elfNN_aarch64_finish_dynamic_sections): Place the &_DYNAMIC reference
557         in sgot[0] rather than sgotplt[0].
559 2013-06-26  Yufeng Zhang  <yufeng.zhang@arm.com>
561         * Makefile.am (elf32-aarch64.c): Add a #line cpp directive at the
562         beginning of the generated file.
563         (elf64-aarch64.c): Likewise.
564         * Makefile.in: Re-generated.
566 2013-06-26  Yufeng Zhang  <yufeng.zhang@arm.com>
568         * Makefile.am (BFD64_BACKENDS): Add elfxx-aarch64.c.
569         (BFD64_BACKENDS_CFILES): Add elfxx-aarch64.lo.
570         * Makefile.in: Re-generated.
571         * configure.in (bfd_elf64_bigaarch64_vec): Add elfxx-aarch64.lo.
572         (bfd_elf64_littleaarch64_vec): Likewise.
573         (bfd_elf32_bigaarch64_vec): Likewise.
574         (bfd_elf32_littleaarch64_vec): Likewise.
575         * configure: Re-generated.
576         * elfxx-aarch64.c: New file; split from elf64-aarch64.c.
577         * elfxx-aarch64.h: New file.
578         * elfnn-aarch64.c: Include "elfxx-aarch64.h"; move the following
579         stuff to elfxx-aarch64.c.
580         (bfd_elf_aarch64_put_addend): Removed.
581         (PG_OFFSET, PG): Likewise.
582         (elfNN_aarch64_small_plt0_entry): Support ELF32.
583         (elfNN_aarch64_tlsdesc_small_plt_entry): Likewise.
584         (elf64_aarch64_grok_prstatus): Removed.
585         (elf_backend_grok_prstatus): Removed.
586         (insn32): Likewise.
587         (aarch64_unsigned_overflow): Likewise.
588         (aarch64_signed_overflow): Likewise.
589         (aarch64_resolve_relocation): Likewise.
590         (MASK): Likewise.
591         (decode_branch_ofs_26): Likewise.
592         (decode_cond_branch_ofs_19): Likewise.
593         (decode_ld_lit_ofs_19): Likewise.
594         (decode_tst_branch_ofs_14): Likewise.
595         (decode_movw_imm): Likewise.
596         (decode_adr_imm): Likewise.
597         (decode_add_imm): Likewise.
598         (reencode_branch_ofs_26): Likewise.
599         (reencode_cond_branch_ofs_19): Likewise.
600         (reencode_ld_lit_ofs_19): Likewise.
601         (reencode_tst_branch_ofs_14): Likewise.
602         (reencode_movw_imm): Likewise.
603         (reencode_adr_imm): Likewise.
604         (reencode_ldst_pos_imm): Likewise.
605         (reencode_add_imm): Likewise.
606         (reencode_movzn_to_movz): Likewise.
607         (reencode_movzn_to_movn): Likewise.
608         (aarch64_relocate): Update to call the new function names in
609         elfxx-aarch64.c.
610         (aarch64_calculate_got_entry_vma): Likewise.
611         (elfNN_aarch64_final_link_relocate): Likewise.
612         (elf64_aarch64_update_plt_entry): Likewise; change the type of the
613         parameter 'r_type' to bfd_reloc_code_real_type; rename to ...
614         (elf_aarch64_update_plt_entry): ... this.
615         (elfNN_aarch64_create_small_pltn_entry): Update.
616         (elfNN_aarch64_init_small_plt0_entry): Remove plt_got_base; add
617         bfd_vma plt_got_2nd_ent; update to call elf_aarch64_update_plt_entry.
618         (elfNN_aarch64_finish_dynamic_sections): Add plt_entry; update to
619         call elf_aarch64_update_plt_entry.
621 2013-06-26  Yufeng Zhang  <yufeng.zhang@arm.com>
623         * bfd-in2.h: Re-generated.
624         * elfnn-aarch64.c (HOWTO64, HOWTO32): New define.
625         (IS_AARCH64_TLS_RELOC): Change to be based on the
626         bfd reloc enumerators.
627         (IS_AARCH64_TLSDESC_RELOC): Likewise.
628         (PG, PG_OFFSET): Cast literal to bfd_vma.
629         (elf64_aarch64_howto_table): Removed.
630         (elf64_aarch64_howto_dynrelocs): Removed.
631         (elf64_aarch64_tls_howto_table): Removed.
632         (elf64_aarch64_tlsdesc_howto_table): Removed.
633         (elfNN_aarch64_howto_table): New table to host all howto entires..
634         (R_AARCH64_*): Replaced by AARCH64_R (*) and AARCH64_R_STR (*).
635         (elfNN_aarch64_bfd_reloc_from_howto): New function.
636         (elfNN_aarch64_bfd_reloc_from_type): Ditto.
637         (struct elf_aarch64_reloc_map): New.
638         (elf_aarch64_reloc_map): New table.
639         (elfNN_aarch64_howto_from_bfd_reloc): New function.
640         (elfNN_aarch64_howto_from_type): Update to look up the new table
641         elfNN_aarch64_howto_table.
642         (struct elf64_aarch64_reloc_map): Remove.
643         (elf64_aarch64_reloc_map): Remove.
644         (elfNN_aarch64_reloc_type_lookup): Change to call
645         elfNN_aarch64_howto_from_bfd_reloc.
646         (elfNN_aarch64_reloc_name_lookup): Change to look up the new table
647         elfNN_aarch64_howto_table.
648         (aarch64_resolve_relocation): Refactor to switch on the bfd
649         reloc enumerators.
650         (bfd_elf_aarch64_put_addend): Likewise.
651         (elfNN_aarch64_final_link_relocate): Likewise.
652         (aarch64_tls_transition_without_check): Likewise.
653         (aarch64_reloc_got_type): Likewise.
654         (aarch64_can_relax_tls): Likewise.
655         (aarch64_tls_transition): Likewise.
656         (elfNN_aarch64_tls_relax): Likewise.
657         (elfNN_aarch64_final_link_relocate): Likewise.
658         (elfNN_aarch64_relocate_section): Likewise.
659         (elfNN_aarch64_gc_sweep_hook): Likewise.
660         (elfNN_aarch64_check_relocs): Likewise.
661         (aarch64_tls_transition): Change to return a bfd reloc enumerator.
662         * libbfd.h: Re-generated.
663         * reloc.c: Re-order the AArch64 bfd reloc enumerators.
664         (BFD_RELOC_AARCH64_RELOC_START)
665         (BFD_RELOC_AARCH64_RELOC_END)
666         (BFD_RELOC_AARCH64_LD_GOT_LO12_NC)
667         (BFD_RELOC_AARCH64_LD32_GOT_LO12_NC)
668         (BFD_RELOC_AARCH64_TLSDESC_LD_LO12_NC)
669         (BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC)
670         (BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_LO12_NC)
671         (BFD_RELOC_AARCH64_TLSIE_LD32_GOTTPREL_LO12_NC)
672         (BFD_RELOC_AARCH64_IRELATIVE): New relocs.
674 2013-06-26  Yufeng Zhang  <yufeng.zhang@arm.com>
676         * Makefile.am (BFD64_BACKENDS): Add elf32-aarch64.lo.
677         (BUILD_CFILES): Add elf32-aarch64.c.
678         (elf32-aarch64.c): New rule for generating from elfnn-aarch64.c.
679         * Makefile.in: Re-generated.
680         * archures.c (bfd_mach_aarch64_ilp32): New define.
681         * bfd-in.h (bfd_elf32_aarch64_init_maps): New declaration.
682         (bfd_elf32_aarch64_set_options): Ditto.
683         (elf32_aarch64_setup_section_lists): Ditto.
684         (elf32_aarch64_next_input_section): Ditto.
685         (elf32_aarch64_size_stubs): Ditto.
686         (elf32_aarch64_build_stubs): Ditto.
687         * bfd-in2.h: Re-generated.
688         * config.bfd (aarch64-*-elf): Add bfd_elf32_littleaarch64_vec
689         and bfd_elf32_bigaarch64_vec.
690         (aarch64-*-linux*): Likewise.
691         (aarch64_be-*-elf): Likewise.
692         (aarch64_be-*-linux*): Likewise.
693         * configure.in (bfd_elf32_bigaarch64_vec)
694         (bfd_elf32_littleaarch64_vec): New.
695         * configure: Re-generated.
696         * cpu-aarch64.c (compatible): Don't allow mixing ilp32 objects with
697         lp64 ones.
698         (bfd_aarch64_arch_ilp32): New.
699         (bfd_aarch64_arch): Link to bfd_aarch64_arch_ilp32.
700         * elfnn-aarch64.c (ARCH_SIZE): New define.
701         (AARCH64_R, AARCH64_R_STR, LOG_FILE_ALIGN): New defines.
702         (GOT_ENTRY_SIZE): Re-define as (ARCH_SIZE / 8).
703         (elf64_aarch64_*): Rename to elfNN_aarch64_*.
704         (ELF64_R_*): Rename to ELFNN_R_*.
705         Plus other paramaterization.
706         * targets.c (bfd_elf32_bigaarch64_vec, bfd_elf32_littleaarch64_vec):
707         New declarations.
708         (_bfd_target_vector): Add bfd_elf32_bigaarch64_vec and
709         bfd_elf32_littleaarch64_vec.
711 2013-06-26  Yufeng Zhang  <yufeng.zhang@arm.com>
713         * Makefile.am (BFD64_BACKENDS_CFILES): Remove elf64-aarch64.c.
714         (BUILD_CFILES): Add elf64-aarch64.c.
715         (elf64-aarch64.c): New rule for generating from elfnn-aarch64.c.
716         * Makefile.in: Re-generated.
717         * elf64-aarch64.c: Rename to ...
718         * elfnn-aarch64.c: ... this.
720 2013-06-25  Maciej W. Rozycki  <macro@codesourcery.com>
721             Paul Brook  <paul@codesourcery.com>
723         * elfxx-mips.h (_bfd_mips_elf_insn32): New prototype.
724         * elfxx-mips.c (mips_elf_link_hash_table): Add insn32 member.
725         (STUB_MOVE32_MICROMIPS, STUB_JALR32_MICROMIPS): New macros.
726         (MICROMIPS_INSN32_FUNCTION_STUB_NORMAL_SIZE): Likewise.
727         (MICROMIPS_INSN32_FUNCTION_STUB_BIG_SIZE): Likewise.
728         (micromips_insn32_o32_exec_plt0_entry): New variable.
729         (micromips_insn32_o32_exec_plt_entry): Likewise.
730         (_bfd_mips_elf_adjust_dynamic_symbol): Handle insn32 mode.
731         (mips_elf_estimate_stub_size): Likewise.
732         (_bfd_mips_elf_size_dynamic_sections): Likewise.
733         (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
734         (mips_finish_exec_plt): Likewise.
735         (_bfd_mips_elf_relax_section): Likewise.
736         (_bfd_mips_elf_insn32): New function.
737         (_bfd_mips_elf_get_synthetic_symtab): Handle insn32 PLT.
739 2013-06-24  Maciej W. Rozycki  <macro@codesourcery.com>
741         * elfxx-mips.h (_bfd_mips_elf_get_synthetic_symtab): New
742         prototype.
743         * elf32-mips.c (elf_backend_plt_sym_val): Remove macro.
744         (bfd_elf32_get_synthetic_symtab): New macro.
745         * elfxx-mips.c (plt_entry): New structure.
746         (mips_elf_link_hash_entry): Add use_plt_entry member.
747         (mips_elf_link_hash_table): Rename plt_entry_size member to
748         plt_mips_entry_size.  Add plt_comp_entry_size, plt_mips_offset,
749         plt_comp_offset, plt_got_index entries and plt_header_is_comp
750         members.
751         (STUB_LW_MICROMIPS, STUB_MOVE_MICROMIPS): New macros.
752         (STUB_LUI_MICROMIPS, STUB_JALR_MICROMIPS): Likewise.
753         (STUB_ORI_MICROMIPS, STUB_LI16U_MICROMIPS): Likewise.
754         (STUB_LI16S_MICROMIPS): Likewise.
755         (MICROMIPS_FUNCTION_STUB_NORMAL_SIZE): Likewise.
756         (MICROMIPS_FUNCTION_STUB_BIG_SIZE): Likewise.
757         (micromips_o32_exec_plt0_entry): New variable.
758         (mips16_o32_exec_plt_entry): Likewise.
759         (micromips_o32_exec_plt_entry): Likewise.
760         (mips_elf_link_hash_newfunc): Initialize use_plt_entry.
761         (mips_elf_output_extsym): Update to use gotplt_union's plist
762         member rather than offset.
763         (mips_elf_gotplt_index): Likewise.  Remove the VxWorks
764         restriction.  Use MIPS_ELF_GOT_SIZE to calculate GOT address.
765         (mips_elf_count_got_symbols): Update to use gotplt_union's plist
766         member rather than offset.
767         (mips_elf_calculate_relocation): Handle MIPS16/microMIPS PLT
768         entries.
769         (_bfd_mips_elf_create_dynamic_sections): Don't set PLT sizes
770         here.
771         (mips_elf_make_plt_record): New function.
772         (_bfd_mips_elf_check_relocs): Update comment.  Record occurences
773         of JAL relocations that might need a PLT entry.
774         (_bfd_mips_elf_adjust_dynamic_symbol): Update to use
775         gotplt_union's plist member rather than offset.  Set individual
776         PLT entry sizes here.  Handle MIPS16/microMIPS PLT entries.
777         Don't set the symbol's value in the symbol table for PLT
778         references here.  Don't set the PLT or PLT GOT section sizes
779         here.
780         (mips_elf_estimate_stub_size): Handle microMIPS stubs.
781         (mips_elf_allocate_lazy_stub): Likewise.
782         (mips_elf_lay_out_lazy_stubs): Likewise.  Define a _MIPS_STUBS_
783         magic symbol.
784         (mips_elf_set_plt_sym_value): New function.
785         (_bfd_mips_elf_size_dynamic_sections): Set PLT header size and
786         PLT and PLT GOT section sizes here.  Set the symbol values in
787         the symbol table for PLT references here.  Handle microMIPS
788         annotation of the _PROCEDURE_LINKAGE_TABLE_ magic symbol.
789         (_bfd_mips_elf_finish_dynamic_symbol): Update to use
790         gotplt_union's plist member rather than offset.  Handle
791         MIPS16/microMIPS PLT entries.  Handle microMIPS stubs.
792         (_bfd_mips_vxworks_finish_dynamic_symbol): Update to use
793         gotplt_union's plist member rather than offset.  Use
794         MIPS_ELF_GOT_SIZE to calculate GOT address.
795         (mips_finish_exec_plt): Handle microMIPS PLT.  Return status.
796         (_bfd_mips_elf_finish_dynamic_sections): Handle result from
797         mips_finish_exec_plt.
798         (_bfd_mips_elf_link_hash_table_create): Update to use
799         gotplt_union's plist member rather than offset.
800         (_bfd_mips_elf_get_synthetic_symtab): New function.
802 2013-06-24  Wawa  <caojinyu@msn.com>
804         PR 15657
805         * hash.c (_bfd_stringtab_add): Copy the string if COPY is true.
807 2013-06-23  Richard Sandiford  <rdsandiford@googlemail.com>
809         * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Move MIPS ELF
810         files to...
811         (BFD64_BACKENDS, BFD64_BACKENDS_CFILES): ...here.
812         * Makefile.in: Regenerate.
813         * config.bfd: Enclose all MIPS ELF targets in #ifdef BFD64.
814         Set want64 to true for them at the end.
815         * targets.c (_bfd_target_vector): Protect MIPS ELF targets with
816         #ifdef BFD64.
818 2013-06-22  Sandra Loosemore  <sandra@codesourcery.com>
820         * elf32-nios2.c (nios2_elf32_finish_dynamic_sections): Don't
821         set sh_entsize for PLT section.
823 2013-06-20  Yufeng Zhang  <yufeng.zhang@arm.com>
825         * bfd-in.h (bfd_elf64_aarch64_set_options): Add 'extern'.
826         * bfd-in2.h: Re-generated.
827         * elf64-aarch64.c (RELOC_SECTION): Removed.
828         (SWAP_RELOC_IN, SWAP_RELOC_OUT): Ditto.
829         (AARCH64_ELF_OS_ABI_VERSION): Ditto.
830         (elf64_aarch64_link_hash_traverse): Ditto.
831         (elf64_aarch64_size_stubs): Change 'Aarch64' to 'AArch64' in the
832         comment.
834 2013-06-19  Will Newton  <will.newton@linaro.org>
836         * configure: Regenerated.
837         * configure.in: Remove aarch64 dependency on elf-ifunc.c.
838         * elf64-aarch64.c: Remove objalloc.h include.
839         (elf64_aarch64_howto_dynrelocs): Remove R_AARCH64_IRELATIVE howto.
840         (struct elf64_aarch64_link_hash_table): Remove ifunc related
841         members. (elf_aarch64_local_htab_hash): Remove function.
842         (elf_aarch64_local_htab_eq): Remove function.
843         (elf_aarch64_get_local_sym_hash): Remove function.
844         (elf64_aarch64_link_hash_table_create): Remove local hash
845         table initialization.
846         (elf64_aarch64_final_link_relocate): Remove sym argument and
847         handling of ifunc symbols.
848         (elf64_aarch64_relocate_section): Don't pass sym argument to
849         elf64_aarch64_final_link_relocate.
850         (elf64_aarch64_gc_sweep_hook): Remove handling of ifunc symbols.
851         (elf64_aarch64_adjust_dynamic_symbol): Likewise.
852         (elf64_aarch64_check_relocs): Likewise.
853         (elf64_aarch64_post_process_headers): Remove call to
854         _bfd_elf_set_osabi.
855         (elf64_aarch64_is_function_type): New function.
856         (elf64_aarch64_allocate_dynrelocs): Remove handling of ifunc
857         symbols. (elf_aarch64_allocate_local_dynrelocs): Remove function.
858         (elf64_aarch64_size_dynamic_sections): Remove call to
859         elf_aarch64_allocate_local_dynrelocs.
860         (elf64_aarch64_create_small_pltn_entry): Remove info argument.
861         Remove creation of R_AARCH64_IRELATIVE dynamic relocs.
862         (elf64_aarch64_finish_dynamic_symbol): Remove handling of ifunc
863         symbols. (elf_aarch64_finish_local_dynamic_symbol): Remove
864         function. (elf64_aarch64_finish_dynamic_sections): Remove call to
865         elf_aarch64_finish_local_dynamic_symbol.
866         (elf64_aarch64_add_symbol_hook): Remove function.
868 2013-06-14  Yufeng Zhang  <yufeng.zhang@arm.com>
870         * elf64-aarch64.c (elf64_aarch64_final_link_relocate): Call
871         aarch64_resolve_relocation and bfd_elf_aarch64_put_addend to
872         handle the relocations of R_AARCH64_JUMP26, R_AARCH64_CALL26,
873         R_AARCH64_LD64_GOT_LO12_NC, R_AARCH64_ADR_GOT_PAGE and
874         R_AARCH64_GOT_LD_PREL19.
876 2013-06-13  Terry Guo  <terry.guo@arm.com>
878         PR ld/15302
879         * elf32-arm.c (allocate_dynrelocs_for_symbol): Transform
880         ST_BRANCH_TO_ARM into ST_BRANCH_TO_THUMB if the target only
881         supports thumb instructions.
883 2013-06-11  DJ Delorie  <dj@redhat.com>
885         * elf32-rl78.c (rl78_elf_relocate_section): Fix OPsub math.
887 2013-06-11  Will Newton  <will.newton@linaro.org>
889         * elf64-aarch64.c (elf_aarch64_get_local_sym_hash): Use
890         ELF64_R_SYM instead of ELF32_R_SYM.
892 2013-06-11  Nick Clifton  <nickc@redhat.com>
894         * elf32-rl78.c (rl78_elf_finish_dynamic_sections): Onlly run
895         checks if the dynamic sections have been created and relaxation
896         has not been performed.
898 2013-06-07  Will Newton  <will.newton@linaro.org>
900         * configure: Regenerate.
901         * configure.in: Build elf-ifunc.o for AArch64.
902         * elf64-aarch64.c: Include objalloc.h.
903         (elf64_aarch64_howto_dynrelocs): Add R_AARCH64_IRELATIVE howto.
904         (struct elf64_aarch64_link_hash_table): Add members for handling
905         R_AARCH64_IRELATIVE relocations.
906         (elf_aarch64_local_htab_hash): New function.
907         (elf_aarch64_local_htab_eq): New function.
908         (elf_aarch64_get_local_sym_hash): New function.
909         (elf64_aarch64_link_hash_table_create): Initialize local STT_GNU_IFUNC
910         symbol hash.
911         (elf64_aarch64_hash_table_free): Free local STT_GNU_IFUNC symbol hash.
912         (elf64_aarch64_final_link_relocate): Add sym argument.  Add support
913         for handling STT_GNU_IFUNC symbols.
914         (elf64_aarch64_gc_sweep_hook): Add support for garbage collecting
915         references to STT_GNU_IFUNC symbols.
916         (elf64_aarch64_adjust_dynamic_symbol): Add support for handling
917         STT_GNU_IFUNC symbols.
918         (elf64_aarch64_check_relocs): Add support for handling STT_GNU_IFUNC
919         symbols.  Ensure we don't increase plt.refcount from -1 to 0.
920         (elf64_aarch64_post_process_headers): Call _bfd_elf_set_osabi.
921         (elf64_aarch64_is_function_type): Remove function.
922         (elf64_aarch64_allocate_dynrelocs): Call
923         _bfd_elf_allocate_ifunc_dyn_relocs for STT_GNU_IFUNC symbols.
924         (elf_aarch64_allocate_local_dynrelocs): New function.
925         (elf64_aarch64_size_dynamic_sections): Call
926         elf_aarch64_allocate_local_dynrelocs.  Initialize next_irelative_index.
927         (elf64_aarch64_create_small_pltn_entry): Add info argument.
928         Add support for creating .iplt entries for STT_GNU_IFUNC symbols.
929         (elf64_aarch64_finish_dynamic_symbol): Add support for handling
930         STT_GNU_IFUNC symbols and .iplt.
931         (elf_aarch64_finish_local_dynamic_symbol): New function.
932         (elf64_aarch64_finish_dynamic_sections): Call
933         elf_aarch64_finish_local_dynamic_symbol.
934         (elf64_aarch64_add_symbol_hook): New function.
936 2013-06-03  Alan Modra  <amodra@gmail.com>
938         * syms.c (_bfd_stab_section_find_nearest_line): Add last_str
939         var.  Use it with last_stab.
941 2013-05-30  Paul Brook  <paul@codesourcery.com>
943         * bfd-in2.h: Regenerate.
944         * elf32-mips.c (elf_mips_eh_howto): New.
945         (bfd_elf32_bfd_reloc_type_lookup ): Support BFD_RELOC_MIPS_EH.
946         (bfd_elf32_bfd_reloc_name_lookup): Likewise.
947         (mips_elf32_rtype_to_howto): Support R_MIPS_EH.
948         * elf64-mips.c (elf_mips_eh_howto): New.
949         (bfd_elf64_bfd_reloc_type_lookup): Support BFD_RELOC_MIPS_EH.
950         (bfd_elf64_bfd_reloc_name_lookup): Likewise.
951         (mips_elf64_rtype_to_howto): Support R_MIPS_EH.
952         * libbfd.h: Regenerate.
953         * reloc.c (BFD_RELOC_MIPS_EH): New.
955 2013-05-29  Nick Clifton  <nickc@redhat.com>
957         * dwarf2.c (struct dwarf2_debug): Add fields for handling
958         alternate debug info source.
959         (dwarf_debug_sections): Add entries for alternate .debug_str and
960         .debug_info sections.
961         (dwarf_debug_section_enum): Likewise.
962         (read_alt_indirect_string): New function.  Handles a
963         DW_FORM_GNU_strp_alt attribute.
964         (read_alt_indirect_ref): New function.  Handles a
965         DW_FORM_GNU_ref_alt attribute.
966         (read_attribute_value): Process DW_FORM_GNU_ref_alt and
967         DW_FORM_GNU_strp_alt.
968         (find_abstract_instance_name): Handle DW_FORM_GNU_ref_alt
969         attributes.
970         (_bfd_dwarf2_cleanup_debug_info): Free alternate debug info
971         sources.
972         * opncls.c (GNU_DEBUGALTLINK): Define.
973         (bfd_get_alt_debug_link_info): New function.
974         (separate_alt_debug_file_exists): New function.
975         (find_separate_debug_file): Add parameters for fetch and check
976         functions.
977         (bfd_follow_gnu_debugaltlink): New function.
978         * bfd-in2.h: Regenerate.
980 2013-05-28  Yufeng Zhang  <yufeng.zhang@arm.com>
982         * reloc.c (BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE): Rename to ...
983         (BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21): ... this.
984         (BFD_RELOC_AARCH64_TLSDESC_LD64_PREL19): Rename to ...
985         (BFD_RELOC_AARCH64_TLSDESC_LD_PREL19): ...  this.
986         * bfd-in2.h: Regenerate.
987         * libbfd.h: Regenerate.
988         * elf64-aarch64.c (IS_AARCH64_TLSDESC_RELOC): Update to use
989         the correct names.
990         (elf64_aarch64_tlsdesc_howto_table): Likewise.
991         (elf64_aarch64_reloc_map): Likewise.
992         (aarch64_resolve_relocation): Likewise.
993         (bfd_elf_aarch64_put_addend): Likewise.
994         (aarch64_tls_transition_without_check): Likewise.
995         (aarch64_reloc_got_type): Likewise.
996         (elf64_aarch64_final_link_relocate): Likewise.
997         (elf64_aarch64_tls_relax): Likewise.
998         (elf64_aarch64_relocate_section): Likewise.
999         (elf64_aarch64_gc_sweep_hook): Likewise.
1000         (elf64_aarch64_check_relocs): Likewise.
1002 2013-05-26  Mark Wielaard  <mjw@redhat.com>
1004         * cache.c (BFD_CACHE_MAX_OPEN): Remove define.
1005         (max_open_files): New static int initialized to zero.
1006         (bfd_cache_max_open): New static function to set and return
1007         max_open_files.
1008         (bfd_cache_init): Use bfd_cache_max_open.
1009         (bfd_open_file): Likewise.
1010         * configure.in (AC_CHECK_HEADERS): Add sys/resource.h.
1011         (AC_CHECK_FUNCS): Add getrlimit.
1012         * configure: Regenerated.
1013         * config.in: Likewise.
1014         * sysdep.h: Check and include sys/resource.h for getrlimit.
1016 2013-05-23  Alan Modra  <amodra@gmail.com>
1018         * format.c (bfd_check_format_matches): Don't match a target in
1019         targ_selvecs if some other target is a better match.  If
1020         targets implement match priority, fall back to the first of
1021         the best matches.
1023 2013-05-22  Eric Herman  <eric@freesa.org>
1025         PR binutils/15462
1026         * elfxx-mips.c (_bfd_mips_elf_relocate_section): Warning fix.
1028 2013-05-22  Ralf Dreesen  <gamma@dreesen.net>
1030         PR binutils/15474
1031         * srec.c (srec_set_section_contents): Properly convert size
1032         and offset to address when octets_per_byte is not unity.
1034 2013-05-20  Maciej W. Rozycki  <macro@linux-mips.org>
1036         * elf32-vax.c (elf_vax_instantiate_got_entries): Only set the
1037         refcount member of the gotplt_union when resetting the reference
1038         count.  Adjust comment.
1040 2013-05-20  Will Newton  <will.newton@linaro.org>
1042         * elf64-aarch64.c (elf64_aarch64_link_hash_entry): Remove
1043         relocs_copied member.
1044         (elf64_aarch64_link_hash_newfunc): Remove initialization of
1045         relocs_copied member.
1046         (elf64_aarch64_copy_indirect_symbol): Remove code to copy
1047         relocs_copied member.
1049 2013-05-19  Maciej W. Rozycki  <macro@linux-mips.org>
1051         * elf32-vax.c (elf_vax_adjust_dynamic_symbol): Convert K&R
1052         function definition.
1054 2013-05-16  Cary Coutant  <ccoutant@google.com>
1056         * ecoff.c (ecoff_link_check_archive_element): Add initializers for
1057         external_ext_size and esize.
1059 2013-05-16  Tristan Gingold  <gingold@adacore.com>
1061         * coff-rs6000.c (_bfd_xcoff_reloc_type_lookup): Handle BFD_RELOC_16.
1062         * coff64-rs6000.c (xcoff64_reloc_type_lookup): Likewise.
1064 2013-05-15  Andreas Schwab  <schwab@suse.de>
1066         * elf64-aarch64.c (elf_backend_default_execstack): Define to 0.
1068 2013-05-10  Joel Brobecker  <brobecker@adacore.com>
1070         * coffcode.h (styp_to_sec_flags) [RS6000COFF_C]: Add handling
1071         of STYP_EXCEPT, STYP_LOADER and STYP_TYPCHK sections.
1073 2013-05-09  Joel Brobecker  <brobecker@adacore.com>
1075         * bfd.c (_bfd_default_error_handler): Replace use of putc
1076         by fputc.  Add comment explaining why.
1078 2013-05-09  Alan Modra  <amodra@gmail.com>
1080         * elflink.c (elf_link_add_object_symbols): Don't omit reading
1081         of symbols when hashes already exist.
1083 2013-05-07  Will Newton  <will.newton@linaro.org>
1085         * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Add a
1086         plt_header_size argument for ports where it differs from
1087         plt_entry_size.
1088         * elf-bfd.h: Likewise.
1089         * elf32-i386.c: Pass plt_header_size to
1090         _bfd_elf_allocate_ifunc_dyn_relocs.
1091         * elf64-x86-64.c: Likewise.
1093 2013-05-07  Will Newton  <will.newton@linaro.org>
1095         * elf-ifunc.c (_bfd_elf_create_ifunc_dyn_reloc): Remove unused
1096         function.
1097         * elf-bfd.h: Likewise.
1099 2013-05-06  Paul Brook  <paul@codesourcery.com>
1101         * elf64-mips.c (elf_mips_gnu_pcrel32): New.
1102         (bfd_elf64_bfd_reloc_type_lookup, bfd_elf64_bfd_reloc_name_lookup,
1103         mips_elf64_rtype_to_howto): Handle R_MIPS_PC32.
1104         * elfn32-mips.c (elf_mips_gnu_pcrel32): New.
1105         (bfd_elfn32_bfd_reloc_type_lookup, bfd_elfn32_bfd_reloc_name_lookup,
1106         mips_elfn32_rtype_to_howto): Handle R_MIPS_PC32.
1108 2013-05-06  Alan Modra  <amodra@gmail.com>
1110         * elf64-ppc.c (opd_entry_value): Handle case where symbol
1111         hashes are not available.
1113 2013-05-06  Alan Modra  <amodra@gmail.com>
1115         * elflink.c (elf_link_add_object_symbols): Don't save symbol
1116         hashes around loading as-needed library.  Zero them on allocation,
1117         and restore to initial all-zero state if library not needed.
1118         Arrange to reuse hashes if we load library again later.
1120 2013-05-04  Richard Sandiford  <rdsandiford@googlemail.com>
1122         * elf32-mips.c (elf_mips_copy_howto, elf_mips_jump_slot_howto):
1123         Use _bfd_mips_elf_generic_reloc instead of bfd_elf_generic_reloc.
1124         * elfn32-mips.c: Likewise.
1125         * elf64-mips.c: Likewise.
1127 2013-05-02  Nick Clifton  <nickc@redhat.com>
1129         * archures.c: Add some more MSP430 machine numbers.
1130         * config.bfd (msp430): Define targ_selvecs.
1131         * configure.in: Add bfd_elf32_msp430_ti_vec.
1132         * cpu-msp430.c: Add some more MSP430 machine numbers.
1133         * elf32-msp430.c Add support for MSP430X relocations.
1134         Add support for TI compiler generated relocations.
1135         Add support for sym_diff relocations.
1136         Add support for relaxing out of range short branches into long
1137         branches.
1138         Add support for MSP430 attribute section.
1139         * reloc.c: Add MSP430X relocations.
1140         * targets.c: Add bfd_elf32_msp430_ti_vec.
1141         * bfd-in2.h: Regenerate.
1142         * configure: Regenerate.
1143         * libbfd.h: Regenerate.
1145 2013-05-01  Maciej W. Rozycki  <macro@codesourcery.com>
1147         * config.bfd: Replace alpha*-*-linuxecoff* pattern with
1148         alpha*-*-linux*ecoff*.
1150 2013-04-30  Olaf Flebbe  <o.flebbe@science-computing.de>
1152         PR binutils/15417
1153         * elflink.c (elf_link_add_object_symbols): Initialise 'idx' to
1154         zero.
1156 2013-04-30  Alan Modra  <amodra@gmail.com>
1158         * elflink.c (bfd_elf_record_link_assignment): Dont make
1159         STV_INTERNAL symbols STV_HIDDEN.
1161 2013-04-29  Nick Clifton  <nickc@redhat.com>
1163         * elflink.c (_bfd_elf_gc_mark_extra_sections): Remove mark from
1164         fragmented .debug_line sections associated with unmarked code
1165         sections.
1167 2013-04-29  Will Newton  <will.newton@linaro.org>
1169         * elf32-arm.c (elf32_arm_populate_plt_entry): Call
1170         elf32_arm_add_dynreloc when emitting R_ARM_IRELATIVE relocs.
1172 2013-04-29  Will Newton  <will.newton@linaro.org>
1174         * elf64-aarch64.c (elf64_aarch64_check_relocs): Move relocation
1175         error check up and add error message.
1177 2013-04-26  Will Newton  <will.newton@linaro.org>
1179         * elf64-aarch64.c (elf64_aarch64_check_relocs): Remove dead code.
1181 2013-04-25  Alan Modra  <amodra@gmail.com>
1183         * config.bfd: Add powerpc64le-linux.
1185 2013-04-24  H.J. Lu  <hongjiu.lu@intel.com>
1187         * config.bfd (targ_selvecs): Add bfd_elf32_x86_64_vec for
1188         x86_64-*-elf*.
1190 2013-04-24  Roland McGrath  <mcgrathr@google.com>
1192         * elf32-arm.c (elf32_arm_allocate_plt_entry): If HTAB->nacl_p,
1193         allocate space for PLT header even if IS_IPLT_ENTRY.
1194         (arm_nacl_put_plt0): New function, broken out of ...
1195         (elf32_arm_finish_dynamic_sections): ... here.  Call it.
1196         If HTAB->nacl_p, set up the PLT header in .iplt too.
1197         (elf32_arm_output_arch_local_syms): If HTAB->nacl_p, write
1198         a mapping symbol for the start of .iplt too.
1200 2013-04-19  Luca Pizzamiglio  <luca.pizzamiglio@gmail.com>
1202         * ecoff.c (_bfd_ecoff_sizeof_headers): Cast the return value of
1203         BFD_ALIGN to int.
1204         * elf32-tic6x.c (elf32_tic6x_size_dynamic_sections): Remove unused
1205         variables.
1206         * elf32-v850.c (v850_elf_relax_section): Redefine the type of 'i'
1207         to bfd_vma.
1208         * vms-alpha.c (evax_bfd_print_etir): Initialize sec_len.
1210 2013-04-22  Alan Modra  <amodra@gmail.com>
1212         PR ld/15382
1213         * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Don't multiply
1214         sh_size or reloc_count adjustment by count.
1216 2013-04-22  Alan Modra  <amodra@gmail.com>
1218         * elf64-ppc.c (ppc64_elf_check_relocs): Don't call
1219         create_linkage_sections here..
1220         (ppc64_elf_init_stub_bfd): ..do so here.  Return status.
1221         (create_linkage_sections): Move earlier in file.
1222         (ppc64_elf_setup_section_lists): Remove now useless htab->brlt test.
1223         * elf64-ppc.h (ppc64_elf_init_stub_bfd): Update proto.
1225 2013-04-19  Nick Clifton  <nickc@redhat.com>
1227         PR binutils/15356
1228         * compress.c (decompress_contents): Always call inflateEnd, even
1229         when another inflation operation fails.
1231 2013-04-17  H.J. Lu  <hongjiu.lu@intel.com>
1233         * elf-ifunc.c: Update copyright year.
1235 2013-04-17 Luca Pizzamiglio  <luca.pizzamiglio@gmail.com>
1237         * coffcode.h: Added a cast to void when a bfd_set_section_*()
1238         macro's return value is ignored.
1239         * elf32-hppa.c: Likewise.
1240         * elf32-tic6x.c: Likewise.
1241         * mach-o.c: Likewise.
1242         * mmo.c: Likewise.
1243         * opncls.c: Likewise.
1244         * peicode.h: Likewise.
1245         * elf32-m32r.c: Check return value of bfd_set_section_*().
1246         * elfnn-ia64.c: Likewise.
1247         * elfxx-mips.c: Likewise.
1248         * vms-alpha.c: Likewise.
1250 2013-04-15  H.J. Lu  <hongjiu.lu@intel.com>
1252         PR ld/15371
1253         * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Check
1254         regular reference without non-GOT reference when building
1255         shared library.
1257 2013-04-15  Alan Modra  <amodra@gmail.com>
1259         * archive.c (_bfd_archive_close_and_cleanup): Clear parent
1260         cache slot for archives.
1262 2013-04-14  Hans-Peter Nilsson  <hp@bitrange.com>
1264         * mmo.c (mmo_write_chunk): Break out abfd->tdata.mmo_data to new
1265         local variable mmop.
1267 2013-04-09  Senthil Kumar Selvaraj  <senthil_kumar.selvaraj@atmel.com>
1269         PR ld/12494
1270         * bfd/elf32-avr.c: Consider all sections to determine if linker
1271         relaxation can safely delete a ret after a call/jmp
1273 2013-04-09  Mingjie Xing  <mingjie.xing@gmail.com>
1275         * bfd.c (typedef bfd, Error reporting, Miscellaneous): Add
1276         INODEs.
1278 2013-04-08  Tom Tromey  <tromey@redhat.com>
1280         * som.c (bfd_section_from_som_symbol): No longer static.
1281         * som.h (bfd_section_from_som_symbol): Declare.
1283 2013-04-06  Alan Modra  <amodra@gmail.com>
1285         * elf32-ppc.c (ppc_elf_check_relocs): Use SYMBOLIC_BIND.
1286         * elf64-ppc.c (ppc64_elf_check_relocs, dec_dynrel_count): Likewise.
1288 2013-04-05  Nick Clifton  <nickc@redhat.com>
1290         * elflink.c (elf_link_add_object_symbols): Revert accidental commit.
1292 2013-04-04  Alan Modra  <amodra@gmail.com>
1294         * bfd.c (bfd_error_type, bfd_errmsgs): Add bfd_error_missing_dso.
1295         * bfd-in2.h: Regenerate.
1296         * elflink.c (elf_link_add_object_symbols): Use new error.
1298 2013-04-03  Nick Clifton  <nickc@redhat.com>
1300         * elf32-v850.c (v850_elf_is_target_special_symbol): New function.
1301         (bfd_elf32_bfd_is_target_special_symbol): Define.
1303 2013-04-03   Venkataramanan Kumar  <venkataramanan.kumar@linaro.org>
1305         * elf64-aarch64.c (elf64_aarch64_gc_sweep_hook): Use
1306         elf64_aarch64_locals to get local GOT reference counts.
1308 2013-04-02  DJ Delorie  <dj@redhat.com>
1310         * elf32-rl78.c (GET_RELOC): Assert that there are relocs to get.
1311         (rl78_elf_relax_section): Only fetch the next reloc if there is
1312         one expected.
1314 2013-03-30  Alan Modra  <amodra@gmail.com>
1316         PR ld/15323
1317         * elf-m10300.c (mn10300_elf_check_relocs): Set non_ir_ref for
1318         global symbols referenced by relocs.
1319         * elf32-arm.c (elf32_arm_check_relocs): Likewise.
1320         * elf32-bfin.c (bfin_check_relocs): Likewise.
1321         * elf32-cr16.c (cr16_elf_check_relocs): Likewise.
1322         * elf32-cris.c (cris_elf_check_relocs): Likewise.
1323         * elf32-d10v.c (elf32_d10v_check_relocs): Likewise.
1324         * elf32-dlx.c (elf32_dlx_check_relocs): Likewise.
1325         * elf32-fr30.c (fr30_elf_check_relocs): Likewise.
1326         * elf32-frv.c (elf32_frv_check_relocs): Likewise.
1327         * elf32-hppa.c (elf32_hppa_check_relocs): Likewise.
1328         * elf32-i370.c (i370_elf_check_relocs): Likewise.
1329         * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
1330         * elf32-lm32.c (lm32_elf_check_relocs): Likewise.
1331         * elf32-m32c.c (m32c_elf_check_relocs): Likewise.
1332         * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
1333         * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
1334         * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
1335         * elf32-mcore.c (mcore_elf_check_relocs): Likewise.
1336         * elf32-metag.c (elf_metag_check_relocs): Likewise.
1337         * elf32-microblaze.c (microblaze_elf_check_relocs): Likewise.
1338         * elf32-moxie.c (moxie_elf_check_relocs): Likewise.
1339         * elf32-msp430.c (elf32_msp430_check_relocs): Likewise.
1340         * elf32-mt.c (mt_elf_check_relocs): Likewise.
1341         * elf32-nios2.c (nios2_elf32_check_relocs): Likewise.
1342         * elf32-openrisc.c (openrisc_elf_check_relocs): Likewise.
1343         * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
1344         * elf32-rl78.c (rl78_elf_check_relocs): Likewise.
1345         * elf32-s390.c (elf_s390_check_relocs): Likewise.
1346         * elf32-score.c (s3_bfd_score_elf_check_relocs): Likewise.
1347         * elf32-score7.c (s7_bfd_score_elf_check_relocs): Likewise.
1348         * elf32-sh.c (sh_elf_check_relocs): Likewise.
1349         * elf32-tic6x.c (elf32_tic6x_check_relocs): Likewise.
1350         * elf32-tilepro.c (tilepro_elf_check_relocs): Likewise.
1351         * elf32-v850.c (v850_elf_check_relocs): Likewise.
1352         * elf32-vax.c (elf_vax_check_relocs): Likewise.
1353         * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
1354         * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
1355         * elf64-aarch64.c (elf64_aarch64_check_relocs): Likewise.
1356         * elf64-alpha.c (elf64_alpha_check_relocs): Likewise.
1357         * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
1358         * elf64-ia64-vms.c (elf64_ia64_check_relocs): Likewise.
1359         * elf64-mmix.c (mmix_elf_check_relocs): Likewise.
1360         * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
1361         * elf64-s390.c (elf_s390_check_relocs): Likewise.
1362         * elf64-sh64.c (sh_elf64_check_relocs): Likewise.
1363         * elfnn-ia64.c (elfNN_ia64_check_relocs): Likewise.
1364         * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
1365         * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
1366         * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.  Don't
1367         test indirect/warning links for NULL.
1369 2013-03-29  H.J. Lu  <hongjiu.lu@intel.com>
1371         PR ld/15323
1372         * elf32-i386.c (elf_i386_check_relocs): Set non_ir_ref if a
1373         symbol is referenced by a non-shared object.
1374         * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1376 2013-03-28  Joe Seymour  <jseymour@codesourcery.com>
1378         * elf32-sh.c (sh_elf_relocate_section): Suppress warnings for
1379         R_SH_REL32 relocations against undefined weak symbols.
1381 2013-03-28  Alan Modra  <amodra@gmail.com>
1383         * elf64-ppc.c (struct ppc_dyn_relocs): New.
1384         (ppc64_elf_check_relocs): Separate dynrel counts for local syms
1385         into ifunc and non-ifunc.
1386         (dec_dynrel_count): Pass in sym rather than sym_sec.  Handle
1387         separate ifunc/non-ifunc dynrel counts.
1388         (allocate_got): Always use reliplt for ifunc.
1389         (allocate_dynrelocs): Likewise.
1390         (ppc64_elf_size_dynamic_sections): Likewise.
1391         (ppc64_elf_layout_multitoc): Likewise.
1392         (ppc64_elf_relocate_section): Likewise.
1394 2013-03-28  Alan Modra  <amodra@gmail.com>
1396         * elf32-ppc.c (struct ppc_dyn_relocs): New.
1397         (ppc_elf_check_relocs): Separate dynrel counts for local syms
1398         into ifunc and non-ifunc.
1399         (allocate_dynrelocs): Always put ifunc relocs into reliplt.
1400         (ppc_elf_size_dynamic_sections): Likewise.
1401         (ppc_elf_relocate_section): Likewise.
1403 2013-03-28  Alan Modra  <amodra@gmail.com>
1405         * elf-bfd.h (enum elf_reloc_type_class): Add reloc_class_ifunc.
1406         (struct elf_backend_data <elf_backed_reloc_type_class>): Add
1407         bfd_link_info* and asection* params.
1408         (_bfd_elf_reloc_type_class): Likewise.
1409         * elf.c (_bfd_elf_reloc_type_class): Likewise.
1410         * elflink.c (elf_link_sort_cmp2): Sort first on reloc class.
1411         (elf_link_sort_relocs): Update elf_backed_reloc_type_class call.
1412         * elf32-ppc.c (ppc_elf_reloc_type_class): Return reloc_class_ifunc
1413         for any reliplt reloc.  Don't return reloc_class_plt for
1414         R_PPC_REL24 and R_PPC_ADDR24.
1415         * elf64-ppc.c (allocate_got): Formatting.
1416         (ppc64_elf_reloc_type_class): Return reloc_class_ifunc for any
1417         reliplt reloc.
1418         * elf-m10300.c, * elf32-arm.c, * elf32-bfin.c, * elf32-cr16.c,
1419         * elf32-cris.c, * elf32-hppa.c, * elf32-i386.c, * elf32-lm32.c,
1420         * elf32-m32r.c, * elf32-m68k.c, * elf32-metag.c, * elf32-nios2.c,
1421         * elf32-s390.c, * elf32-sh.c, * elf32-sparc.c, * elf32-tilepro.c,
1422         * elf32-vax.c, * elf32-xtensa.c, * elf64-aarch64.c, * elf64-alpha.c,
1423         * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-s390.c, * elf64-sparc.c,
1424         * elf64-x86-64.c, * elfnn-ia64.c, * elfxx-tilegx.c, * elfxx-tilegx.h:
1425         Add extra params to the various reloc_type_class functions.
1427 2013-03-27  Alan Modra  <amodra@gmail.com>
1429         * elf32-ppc.c (ppc_elf_check_relocs): Set PLT_IFUNC in local got
1430         masks for all local ifunc syms.
1431         (allocate_dynrelocs): Don't use htab->relgot for ifunc.
1432         (ppc_elf_size_dynamic_sections): Likewise.
1433         (ppc_elf_relocate_section): Likewise.
1435 2013-03-27  Will Newton  <will.newton@linaro.org>
1437         * elf32-arm.c (elf32_arm_final_link_relocate): Avoid emitting a
1438         dynamic reloc for symbols with dynindx == -1.
1439         (allocate_dynrelocs_for_symbol): Avoid allocating space for a
1440         dynamic reloc for symbols with dynindx == -1.
1442 2013-03-27  Will Newton  <will.newton@linaro.org>
1444         * elf32-arm.c (elf32_arm_final_link_relocate): Avoid emitting a
1445         dynamic reloc for non-default visibility undefined weaks.
1446         (allocate_dynrelocs_for_symbol): Avoid allocating space for a
1447         dynamic reloc for non-default visibility undefined weaks.
1449 2013-03-26  Alan Modra  <amodra@gmail.com>
1451         * elflink.c (_bfd_elf_add_default_symbol): Preserve section
1452         over _bfd_elf_merge_symbol calls.
1454 2013-03-26  Alan Modra  <amodra@gmail.com>
1456         * elflink.c (elf_link_add_object_symbols): Add assertion for
1457         common override alignment check code.  Formatting.
1459 2013-03-25  Alan Modra  <amodra@gmail.com>
1461         * elflink.c (_bfd_elf_merge_symbol): Set old_alignment for
1462         usual common symbols as well as for dynamic.  Add poldbfd param.
1463         Save old bfd.  Adjust callers.
1464         (_bfd_elf_add_default_symbol): Add poldbfd param.  Pass "section"
1465         and "value" by value, not pointer.  Adjust caller.
1466         (elf_link_add_object_symbols): Combine undef_bfd and old_bfd vars.
1467         Delete code to set same.  Use old_bfd and old_alignment from
1468         _bfd_elf_merge_symbol instead.  Add default symbol before
1469         alignment and size checks.  Wrap overlong lines.
1471 2013-03-25  Alan Modra  <amodra@gmail.com>
1473         * elflink.c (_bfd_elf_add_default_symbol): Delete "override" param.
1474         (elf_link_add_object_symbols): Don't call _bfd_elf_add_default_symbol
1475         when override is true.
1477 2013-03-25  Alan Modra  <amodra@gmail.com>
1479         * elflink.c (_bfd_elf_merge_symbol): Use local var holding value
1480         of *sym_hash.
1482 2013-03-25  Alan Modra  <amodra@gmail.com>
1484         * elflink.c (_bfd_elf_merge_symbol): Don't discard TLS symbols here.
1485         Wrap long lines.
1486         (elf_link_add_object_symbols): Discard TLS symbols for --just-syms
1487         early in symbol loop.
1489 2013-03-25  Alan Modra  <amodra@gmail.com>
1491         * elf-bfd.h (struct elf_backend_data <merge_symbol>): Update proto.
1492         (_bfd_elf_init_reloc_shdr): Delete.
1493         * elf.c (_bfd_elf_init_reloc_shdr): Make static.
1494         * elf64-x86-64.c (elf_x86_64_merge_symbol): Trim parameters to
1495         just what is needed.
1496         * elflink.c (_bfd_elf_merge_symbol): Update bed->merge_symbol call.
1498 2013-03-23  Alan Modra  <amodra@gmail.com>
1500         * elf-bfd.h (_bfd_elf_merge_symbol): Delete declaration.
1501         * elflink.c (_bfd_elf_merge_symbol): Make static.
1502         * elf32-sh-symbian.c (sh_symbian_relocate_section): Don't call
1503         _bfd_elf_merge_symbol, call _bfd_generic_link_add_one_symbol.
1505 2013-03-23  Alan Modra  <amodra@gmail.com>
1507         PR ld/15270
1508         * elflink.c (elf_link_add_object_symbols): Don't set def_regular
1509         or ref_regular for BFD_PLUGIN owned syms, or have them affect
1510         def_dynamic/ref_dynamic.
1511         (_bfd_elf_fix_symbol_flags): Don't set def_regular for BFD_PLUGIN
1512         owned syms.
1514 2013-03-22  David S. Miller  <davem@davemloft.net>
1516         * elfxx-sparc.c (_bfd_sparc_elf_merge_private_bfd_data): Set type of
1517         hwcaps attribute.
1519 2013-03-22  Achille Fouilleul  <achille.fouilleul+binutils@gadz.org>
1521         PR ld/14902
1522         * elf32-h8300.c (elf32_h8_relax_delete_bytes): Fix off by one
1523         errors adjusting relocs and symbols.
1525 2013-03-21  Michael Schewe  <michael.schewe@gmx.net>
1527         * elf32-h8300 (h8_relax_section): Add new relaxation of mov
1528         @(disp:32,ERx) to mov @(disp:16,ERx).
1529         (R_H8_DISP32A16): New reloc.
1530         Comments added and corrected.
1531         * reloc.c (BFD_RELOC_H8_DISP32A16): New reloc.
1532         * bfd-in2.h: Regenerate.
1533         * libbfd.h: Regenerate.
1535 2013-03-21  Kai Tietz  <ktietz@redhat.com>
1537         * coffgen.c (coff_real_object_p): Make global.
1538         * peicode.h (coff_real_object_p): Add prototype.
1539         (FILHDR): Defined for COFF_IMAGE_WITH_PE as
1540         external_PEI_IMAGE_hdr structure.
1541         (coff_swap_filehdr_in): Handle variable header-size.
1542         * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Just handle amount
1543         of directory-entiries as specified in pe-header.
1545 2013-03-21  Nick Clifton  <nickc@redhat.com>
1547         PR sim/15286
1548         * elf32-arm.c (bfd_arm_get_mach_from_attributes): Identify XScale,
1549         iWMMXt and iWMMXt2 processors from attributes.
1551 2013-03-20  Alan Modra  <amodra@gmail.com>
1553         * elflink.c (_bfd_elf_make_dynamic_reloc_section): Override
1554         sh_type according to is_rela.
1556 2013-03-18  Alan Modra  <amodra@gmail.com>
1558         PR ld/12549
1559         * elflink.c (elf_link_add_object_symbols): Exclude weak refs when
1560         considering whether an --as-needed library is needed.
1562 2013-03-14  Tom Tromey  <tromey@redhat.com>
1564         * opncls.c (bfd_get_debug_link_info): Rename from
1565         get_debug_link_info.  Export.  Update comment.
1566         (find_separate_debug_file): Update.
1567         * bfd-in2.h: Rebuild.
1569 2013-03-08  Venkataramanan Kumar  <venkataramanan.kumar@linaro.org>
1571         * elf64-aarch64.c (elf_backend_can_gc_sections): Enable gc-section
1572         support.
1573         (elf64_aarch64_gc_sweep_hook): Handle GOT, TLS and PLT related
1574         relocs.
1576 2013-03-08  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1578         * elf-bfd.h (elfcore_write_s390_tdb): Add prototype.
1579         * elf.c (elfcore_write_s390_tdb): New function.
1580         (elfcore_write_register_note): Call it.
1581         (elfcore_grok_s390_tdb): New function.
1582         (elfcore_grok_note): Call it.
1584 2013-03-08  Maciej W. Rozycki  <macro@codesourcery.com>
1586         * elfxx-mips.c (mips_elf_allocate_lazy_stub): Correct data type.
1588 2013-03-05  Corinna Vinschen  <vinschen@redhat.com>
1590         * config.bfd: Add x86_64-*-cygwin to list of supported targets.
1592 2013-03-04  Alan Modra  <amodra@gmail.com>
1594         * elf32-ppc.c (ppc_elf_relocate_section <R_PPC_PLTREL24>): Adjust
1595         non-zero addends when relocatable, rather than addends >= 32768.
1596         Always zero "addend" before applying relocation.
1598 2013-03-04  Nick Clifton  <nickc@redhat.com>
1600         * archive64.c (bfd_elf64_archive_write_armap): Fix calculation of
1601         file pointer offsets for thin archives.
1603 2013-02-28  Nathan Sidwell  <nathan@codesourcery.com>
1605         * elf32-arm.c (elf32_arm_size_dynamic_sections): Don't call
1606         elf32_arm_allocate_dynrelocs for source reloc for non-dynamic link.
1608 2013-02-27  DJ Delorie  <dj@redhat.com>
1610         * reloc.c (BFD_RELOC_RL78_CODE): Add.
1611         * libbfd.h: Regenerate.
1612         * bfd-in2.h: Regenerate.
1613         * elf32-rl78.c (rl78_elf_relocate_section): Handle weak code
1614         references in compuated relocs.
1616 2013-02-26  Anthony Green  <green@moxielogic.com>
1618         * config.bfd: Extend moxie-rtems target triplet name support.
1620 2013-02-21  H.J. Lu  <hongjiu.lu@intel.com>
1622         PR ld/15167
1623         * elf64-ia64-vms.c (elf64_vms_link_add_object_symbols): Set
1624         unique_global only for definition.
1625         * elflink.c (_bfd_elf_merge_symbol): Don't set unique_global
1626         here.
1627         (elf_link_add_object_symbols): Set unique_global only
1628         for definition.
1630 2013-02-21  Alan Modra  <amodra@gmail.com>
1632         * elf-bfd.h (struct elf_build_id): Extracted from..
1633         (struct elf_build_id_info): ..here.  Delete.
1634         (struct output_elf_obj_tdata): New, extracted from..
1635         (struct elf_obj_tdata): ..here.  Reorganize for better packing.
1636         Add "o" field.
1637         (elf_program_header_size): Reference tdata->o.
1638         (elf_seg_map, elf_next_file_pos, elf_eh_frame_hdr, elf_linker,
1639         elf_stack_flags, elf_shstrtab, elf_strtab_sec, elf_shstrtab_sec,
1640         elf_section_syms, elf_num_section_syms, elf_flags_init): Likewise.
1641         * elf.c (bfd_elf_allocate_object): Allocate output_elf_obj_tdata
1642         when opening bfd in any mode that might write.
1643         (_bfd_elf_write_object_contents): Use build_id field in
1644         output_elf_obj_tdata.
1645         (_bfd_elf_close_and_cleanup): Tweak elf_shstrtab test.
1646         (elfobj_grok_gnu_build_id): Adjust for elf_tdata changes.
1648 2013-02-21  Alan Modra  <amodra@gmail.com>
1650         * elf-bfd.h (struct core_elf_obj_tdata): New.
1651         (struct elf_obj_tdata): Delete core_signal, core_pid, core_lwpid,
1652         core_program, and core_command.  Add "core".
1653         * elf.c (bfd_elf_mkcorefile): Allocate "core" struct.
1654         Update all refs to tdata core fields.
1655         * elf32-am33lin.c, * elf32-arm.c, * elf32-cris.c, * elf32-frv.c,
1656         * elf32-hppa.c, * elf32-i386.c, * elf32-m68k.c, * elf32-mips.c,
1657         * elf32-nios2.c, * elf32-ppc.c, * elf32-s390.c, * elf32-score.c,
1658         * elf32-score7.c, * elf32-sh.c, * elf32-sparc.c, * elf32-tilegx.c,
1659         * elf32-tilepro.c, * elf32-xtensa.c, * elf64-aarch64.c,
1660         * elf64-hppa.c, * elf64-mips.c, * elf64-ppc.c, * elf64-tilegx.c,
1661         * elf64-x86-64.c, * elfcore.h, * elfn32-mips.c: Update all refs
1662         to tdata core fields.
1664 2013-02-21  Alan Modra  <amodra@gmail.com>
1666         * elf-bfd.h (struct elf_obj_tdata): Rename segment_map to seg_map.
1667         Delete num_locals and num_globals.
1668         (elf_num_locals, elf_num_globals): Don't define.
1669         (elf_seg_map, elf_next_file_pos, elf_eh_frame_hdr, elf_linker,
1670         elf_stack_flags, elf_strtab_sec, elf_shstrtab_sec): Define.
1671         * bfd.c, * elf-eh-frame.c, * elf-nacl.c, * elf-vxworks.c, * elf.c,
1672         * elf32-arm.c, * elf32-lm32.c, * elf32-ppc.c, * elf32-rx.c,
1673         * elf32-spu.c, * elf64-hppa.c, * elfcode.h, * elflink.c,
1674         * elfnn-ia64.c, * elfxx-mips.c: Use newly defined elf_obj_tdata
1675         accessor macros.
1676         * elf.c (elf_map_symbols): Add pnum_locals param.  Return
1677         number of locals syms via new param.
1678         (swap_out_syms): Adjust to suit elf_map_symbols change.
1680 2013-02-19  Maciej W. Rozycki  <macro@codesourcery.com>
1682         * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Also clear
1683         STO_MICROMIPS annotation.
1685 2013-02-19  Alan Modra  <amodra@gmail.com>
1687         * configure.in: Bump version to 2.23.52.
1688         * elf-bfd.h (struct elf_build_id_info): New.
1689         (struct elf_obj_tdata): Delete after_write_object_contents,
1690         after_write_object_contents_info and build_id_size.  Make build_id
1691         a pointer to struct elf_build_id_info.
1692         * elf.c (_bfd_elf_write_object_contents): Style.  Update
1693         after_write_ibject_contents invocation.
1694         (elfobj_grok_gnu_build_id): Update for new build_id struct.  Don't
1695         allow zero size notes.
1696         * configure: Regenerate.
1698 2013-02-18  Maciej W. Rozycki  <macro@codesourcery.com>
1700         * elf64-mips.c (micromips_elf64_howto_table_rel): Add
1701         R_MICROMIPS_SCN_DISP and R_MICROMIPS_JALR.
1702         (micromips_elf64_howto_table_rela): Likewise.
1703         (micromips_reloc_map): Add BFD_RELOC_MICROMIPS_JALR.
1704         * elfn32-mips.c (elf_micromips_howto_table_rel): Add
1705         R_MICROMIPS_SCN_DISP and R_MICROMIPS_JALR.
1706         (elf_micromips_howto_table_rela): Likewise.
1707         (micromips_reloc_map): Add BFD_RELOC_MICROMIPS_JALR.
1709 2013-02-18  Paul Brook  <paul@codesourcery.com>
1711         * elfxx-mips.c (MICROMIPS_P): New macro.
1712         (_bfd_mips_elf_symbol_processing): Use it.
1714 2013-02-18  Maciej W. Rozycki  <macro@codesourcery.com>
1716         * elfxx-mips.c (_bfd_mips_elf_create_dynamic_sections): Clarify
1717         comment on _PROCEDURE_LINKAGE_TABLE_ creation.
1719 2013-02-18  Alan Modra  <amodra@gmail.com>
1721         PR ld/12549
1722         * elf-bfd.h (_bfd_elf_strtab_clear_refs): Delete.
1723         (_bfd_elf_strtab_clear_all_refs): Declare.
1724         (_bfd_elf_strtab_resize): Declare.
1725         * elf-strtab.c (_bfd_elf_strtab_clear_refs): Delete.
1726         (_bfd_elf_strtab_clear_all_refs): New function.
1727         (_bfd_elf_strtab_resize): Likewise.
1728         * elflink.c (elf_link_add_object_symbols): Use _bfd_elf_strtab_resize.
1730 2013-02-18  Alan Modra  <amodra@gmail.com>
1732         * elf-bfd.h (struct elf_obj_tdata): Move find_line_info, local_stubs,
1733         local_call_stubs, elf_data_symbol, elf_text_symbol, elf_data_section,
1734         and elf_text_section to..
1735         * elfxx-mips.c (struct mips_elf_obj_tdata): ..here.  Update all refs.
1736         * elf64-alpha.c (struct mips_elf_find_line): Rename to..
1737         (struct alpha_elf_find_line): ..this.
1738         (struct alpha_elf_obj_tdata): Add find_line_info, update refs.
1740 2013-02-16  H.J. Lu  <hongjiu.lu@intel.com>
1742         PR ld/15146
1743         * elflink.c (elf_link_add_object_symbols): Don't add DT_NEEDED
1744         for references from the dummy bfd.
1746 2013-02-16  H.J. Lu  <hongjiu.lu@intel.com>
1748         PR ld/15149
1749         * elflink.c (elf_link_add_object_symbols): Also track weak
1750         references.
1752 2013-02-15  H.J. Lu  <hongjiu.lu@intel.com>
1754         PR binutils/15151
1755         * archive.c (_bfd_find_nested_archive): Don't allow a nested
1756         archive pointing to itself.
1757         (_bfd_get_elt_at_filepos): Revert the last 2 changes.
1759 2013-02-15  Nick Clifton  <nickc@redhat.com>
1761         PR binutils/15140
1762         * archive.c (_bfd_get_elt_at_filepos): Prevent an infinite loop
1763         accessing a corrupt nested archive.
1765 2013-02-13  Richard Sandiford  <rdsandiford@googlemail.com>
1767         * elfxx-mips.c (mips_got_page_ref): New structure.
1768         (mips_got_page_entry): Use a section rather than a (bfd, symndx)
1769         pair to represent the anchor point.
1770         (mips_got_info): Add a got_page_refs field.
1771         (mips_elf_link_hash_table): Add a sym_cache field.
1772         (mips_got_page_ref_hash, mips_got_page_ref_eq): New functions.
1773         (mips_got_page_entry_hash, mips_got_page_entry_eq): Update for
1774         new anchor representation.
1775         (mips_elf_create_got_info): Create got_page_refs rather than
1776         got_page_entries.
1777         (mips_elf_record_got_page_ref): New function.
1778         (mips_elf_pages_for_range): Move further down file.
1779         (mips_elf_record_got_page_entry): Likewise.  Take a got as argument.
1780         Use a section rather than a (bfd, symndx) pair to represent the
1781         anchor point.
1782         (mips_elf_resolve_got_page_ref): New function.
1783         (mips_elf_resolve_final_got_entries): Use it to populate
1784         got_page_entries.
1785         (_bfd_mips_elf_check_relocs): Call mips_elf_record_got_page_ref
1786         rather than mips_elf_record_got_page_entry.  Only nullify h
1787         afterwards.
1788         (mips_elf_lay_out_got): Call mips_elf_resolve_final_got_entries
1789         earlier.
1791 2013-02-12  Richard Sandiford  <rdsandiford@googlemail.com>
1793         * elfxx-mips.c (mips_elf_lay_out_got): Count VxWorks GOT relocs
1794         in g->relocs.
1796 2013-02-12  Alan Modra  <amodra@gmail.com>
1798         * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Provide
1799         suitable definition when using generic linker hash table.
1801 2013-02-11  Richard Sandiford  <rdsandiford@googlemail.com>
1803         * elfxx-mips.c (mips_elf_count_got_entries): Delete.
1804         (mips_elf_check_recreate_got, mips_elf_recreate_got): Take a
1805         mips_elf_traverse_got_arg.  Count GOT entries.
1806         (mips_elf_resolve_final_got_entries): Take the bfd_link_info
1807         as argument.  Update after above changes.
1808         (mips_elf_merge_got, mips_elf_lay_out_got): Don't call
1809         mips_elf_count_got_entries.  Update the calls to
1810         mips_elf_resolve_final_got_entries.
1812 2013-02-11  Richard Sandiford  <rdsandiford@googlemail.com>
1814         * elfxx-mips.c (mips_got_tls_type): New enum.
1815         (mips_got_entry): Add tls_initialized.
1816         (mips_elf_got_entry_hash, mips_elf_got_entry_eq, mips_tls_got_relocs)
1817         (mips_elf_count_got_entry, mips_elf_initialize_tls_index): Remove
1818         GOT_TLS_TYPE masks.
1819         (mips_elf_reloc_tls_type, mips_tls_got_entries)
1820         (mips_elf_record_global_got_symbol, mips_elf_initialize_tls_index)
1821         (_bfd_mips_elf_finish_dynamic_symbol): Use GOT_TLS_NONE rather
1822         than GOT_NORMAL.
1823         (mips_elf_initialize_tls_slots): Replace got_offset and tls_type_p
1824         arguments with a GOT entry.  Remove GOT_TLS_TYPE masks.  Use
1825         tls_initialized rather than GOT_TLS_DONE.
1826         (mips_tls_got_index): Delete.
1827         (mips_elf_local_got_index, mips_elf_global_got_index): Use
1828         mips_elf_initialize_tls_slots rather than mips_tls_got_index.
1829         (mips_elf_record_got_entry): Initialize tls_initialized.
1831 2013-02-11  Richard Sandiford  <rdsandiford@googlemail.com>
1833         * elfxx-mips.c (mips_got_entry): Remove tls_ldm_offset.
1834         (mips_elf_link_hash_entry): Remove tls_ie_type, tls_gd_type,
1835         tls_ie_got_offset and tls_gd_got_offset.
1836         (mips_elf_link_hash_newfunc): Remove initialization.
1837         (mips_elf_create_got_info): Likewise.
1838         (mips_elf_count_local_got_entries, mips_elf_count_global_tls_entries)
1839         (mips_tls_single_got_index): Delete.
1840         (mips_elf_local_got_index): Always use the GOT entry to track
1841         GOT indices.
1842         (mips_elf_global_got_index): Likewise.
1843         (mips_elf_create_local_got_entry): Assert that TLS entries have
1844         already been allocated.
1845         (mips_elf_record_global_got_symbol): Don't initialize
1846         tls_ie_type or tls_gd_type.
1847         (mips_elf_count_got_symbols): Only count reloc-only GOT entries here.
1848         (mips_elf_initialize_tls_index): Allocate a GOT index for every TLS
1849         entry.
1850         (mips_elf_lay_out_got): Use mips_elf_count_got_entries to count
1851         the GOT entries.
1852         (_bfd_mips_elf_finish_dynamic_symbol): Assert that TLS GOT offsets
1853         have been allocated.
1854         (_bfd_mips_elf_copy_indirect_symbol): Remove handling of
1855         tls_ie_type and tls_gd_type.
1857 2013-02-11  Richard Sandiford  <rdsandiford@googlemail.com>
1859         * elfxx-mips.c (mips_elf_create_local_got_entry): Tidy.  Avoid
1860         aliasing violation.  Check for htab allocation failures.
1862 2013-02-11  Richard Sandiford  <rdsandiford@googlemail.com>
1864         * elfxx-mips.c (mips_elf_primary_global_got_index): New function,
1865         split out from...
1866         (mips_elf_global_got_index): ...here.  Reorder arguments so that
1867         the output bfd and info come first.
1868         (mips_elf_calculate_relocation): Update the call to
1869         mips_elf_global_got_index accordingly.
1870         (_bfd_mips_elf_finish_dynamic_symbol): Use
1871         mips_elf_primary_global_got_index rather than
1872         mips_elf_global_got_index.
1873         (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
1875 2013-02-11  Richard Sandiford  <rdsandiford@googlemail.com>
1877         * elfxx-mips.c (mips_got_entry): Update comments.
1878         (mips_elf_multi_got_entry_eq): Rename to...
1879         (mips_elf_got_entry_eq): ...this, deleting the old definition.
1880         (mips_elf_create_got_info): Remove master_got_p argument.
1881         Always use mips_elf_got_entry_eq.
1882         (mips_elf_bfd_got, mips_elf_multi_got, mips_elf_create_got_section):
1883         Update calls accordingly.
1885 2013-02-11  Richard Sandiford  <rdsandiford@googlemail.com>
1887         * elfxx-mips.c (mips_got_info): Remove bfd2got.
1888         (mips_elf_bfd2got_hash): Delete.
1889         (mips_elf_got_per_bfd_arg): Remove bfd2got.
1890         (mips_elf_replace_bfd_got, mips_elf_count_got_entries): New functions.
1891         (mips_elf_global_got_index, mips_elf_create_local_got_entry): Use
1892         g->next to test for the multigot case.  Use mips_elf_bfd_got rather
1893         than mips_elf_got_for_ibfd.
1894         (mips_elf_bfd2got_entry_hash, mips_elf_bfd2got_entry_eq)
1895         (mips_elf_got_for_ibfd, mips_elf_get_got_for_bfd): Delete.
1896         (mips_elf_make_got_per_bfd): Replace with...
1897         (mips_elf_add_got_entry): ...this new function.
1898         (mips_elf_make_got_pages_per_bfd): Replace with...
1899         (mips_elf_add_got_page_entry): ...this new function.
1900         (mips_elf_merge_got_with): Replace bfd2got argument with separate
1901         bfd and GOT arguments.  Use mips_elf_add_got_entry and
1902         mips_elf_add_got_page_entry instead of mips_elf_make_got_per_bfd
1903         and mips_elf_make_got_pages_per_bfd.  Use mips_elf_replace_bfd_got
1904         to set the BFD's GOT and free the old table.
1905         (mips_elf_merge_got): Replace bfd2got argument with separate
1906         bfd and GOT arguments.  Apply mips_elf_resolve_final_got_entries.
1907         Use mips_elf_count_got_entries to count the number of entries in
1908         each GOT.  Update the calls to mips_elf_merge_got_with.
1909         (mips_elf_adjust_gp): Use g->next to test for the multigot case.
1910         Use mips_elf_bfd_got rather than mips_elf_got_for_ibfd.
1911         (mips_elf_multi_got): Don't create the bfd2got hash table.
1912         Replace hash table traversal with a walk over the input bfds,
1913         updating the call to mips_elf_merge_got.  Use mips_elf_replace_bfd_got
1914         to set the output bfd's GOT.
1915         (mips_elf_lay_out_got): Rename "sub" to "ibfd".  Record that all
1916         bfds use the master GOT in the single-GOT case.
1917         (_bfd_mips_elf_finish_dynamic_sections): Use mips_elf_bfd_got
1918         rather than mips_elf_got_for_ibfd.
1920 2013-02-11  Richard Sandiford  <rdsandiford@googlemail.com>
1922         * elfxx-mips.c (mips_elf_obj_tdata): Add a got field.
1923         (mips_elf_bfd_got, mips_elf_record_got_entry): New functions.
1924         (mips_elf_record_global_got_symbol): Update the hash entry before
1925         adding the mips_got_entry.  Use mips_elf_record_got_entry to do
1926         the latter.
1927         (mips_elf_record_local_got_symbol): Use mips_elf_record_got_entry.
1928         (mips_elf_record_got_page_entry): Record the entry in both the
1929         master and bfd GOTs.
1931 2013-02-11  Richard Sandiford  <rdsandiford@googlemail.com>
1933         * elfxx-mips.c (mips_elf_recreate_got): Don't change the entry;
1934         create another one if necessary.
1935         (mips_elf_set_gotidx): New function.
1936         (mips_elf_set_global_gotidx): Use it.
1937         (mips_elf_initialize_tls_index): Likewise.  Take a
1938         mips_elf_traverse_got_arg as argument.
1939         (mips_elf_lay_out_got): Update use of mips_elf_initialize_tls_index.
1940         (mips_elf_multi_got): Likewise.  Cope with error returns from
1941         mips_elf_set_global_gotidx.
1943 2013-02-11  Richard Sandiford  <rdsandiford@googlemail.com>
1945         * elfxx-mips.c (mips_got_info): Add relocs field.
1946         (mips_elf_set_global_got_offset_arg, mips_elf_count_tls_arg): Replace
1947         with...
1948         (mips_elf_traverse_got_arg): ...this new structure.
1949         (mips_elf_count_local_tls_relocs): Delete.
1950         (mips_elf_count_global_tls_relocs): Likewise.
1951         (mips_elf_count_got_entry): New function.
1952         (mips_elf_count_local_got_entries): Likewise.
1953         (mips_elf_count_global_tls_entries): Take a mips_elf_traverse_got_arg
1954         rather than a mips_elf_count_tls_arg.  Count both relocs and entries.
1955         (mips_elf_record_local_got_symbol): Don't count got entries here.
1956         (mips_elf_make_got_per_bfd): Use mips_elf_count_got_entry.
1957         (mips_elf_set_global_got_offset): Split into...
1958         (mips_elf_set_global_got_area, mips_elf_set_global_gotidx): ...these
1959         new functions.  Take a mips_elf_traverse_got_arg rather than a
1960         mips_elf_set_global_got_offset_arg.  Don't count TLS relocs here.
1961         Use g->relocs to record the number of relocs needed for global GOT
1962         entries.
1963         (mips_elf_multi_got): Use mips_elf_traverse_got_arg rather than
1964         mips_elf_set_global_got_offset_arg.  Use the relocs field to count
1965         relocations.  Update for above function split.
1966         (mips_elf_lay_out_got): Use mips_elf_count_local_got_entries
1967         to count both the number of GOT entries and the number of TLS
1968         relocs required by local entries.  Likewise
1969         mips_elf_count_global_tls_entries and global entries.
1970         Remove uses of mips_elf_count_local_tls_relocs and
1971         mips_elf_count_global_tls_relocs.
1973 2013-02-11  Richard Sandiford  <rdsandiford@googlemail.com>
1975         * elfxx-mips.c (mips_got_entry): Update comment above tls_type entry
1976         to say that each structure represents only one type of TLS reference.
1977         (GOT_TLS_TYPE): New define.
1978         (mips_elf_link_hash_entry): Temporarily split tls_type and
1979         tls_got_offset into two variables each.
1980         (mips_elf_link_hash_newfunc): Update accordingly.
1981         (mips_elf_got_entry_eq, mips_elf_got_entry_hash)
1982         (mips_elf_multi_got_entry_eq): Require the tls_type to be the same.
1983         (mips_elf_reloc_tls_type, mips_tls_got_entries): New functions.
1984         (mips_tls_got_relocs): Use a switch statement.
1985         (mips_elf_count_global_tls_entries): Handle the new hash entry fields.
1986         (mips_elf_initialize_tls_slots): Use a switch statement.  Avoid
1987         local "offset" variable.
1988         (mips_tls_got_index): Remove r_type argument and assert.  Remove
1989         code that handled entries with two TLS types; always use the
1990         original got_index instead.
1991         (mips_tls_single_got_index): New function.
1992         (mips_elf_local_got_index): Use entry->tls_type to check for
1993         TLS entries.  Use mips_tls_single_got_index.  Update call to
1994         mips_tls_got_index.
1995         (mips_elf_global_got_index): Use mips_elf_reloc_tls_type.
1996         Use p->tls_type to check for TLS entries.  Update call to
1997         mips_tls_got_index.  Use mips_tls_single_got_index.
1998         (mips_elf_create_local_got_entry): Use mips_elf_reloc_tls_type.
1999         Use entry.tls_type to check for TLS entries.
2000         (mips_elf_record_global_got_symbol): Replace tls_flag argument
2001         with r_type argument.  Use mips_elf_reloc_tls_type.
2002         Set up the new hash entry fields.
2003         (mips_elf_record_local_got_symbol): Replace tls_flag argument
2004         with r_type argument.  Use mips_elf_reloc_tls_type and
2005         mips_tls_got_entries.  Remove code that handled entries
2006         with multiple TLS types.
2007         (mips_elf_make_got_per_bfd): Use mips_tls_got_entries.
2008         (mips_elf_initialize_tls_index): Handle new hash entry fields.
2009         Use equality rather than masks when checking for specific TLS types.
2010         Use mips_tls_got_entries.  Remove code that handled entries
2011         with multiple TLS types.
2012         (mips_elf_calculate_relocation): Use TLS_RELOC_P instead of
2013         testing the hash table entry.
2014         (_bfd_mips_elf_check_relocs): Update calls to
2015         mips_elf_record_global_got_symbol and mips_elf_record_local_got_symbol.
2016         (_bfd_mips_elf_finish_dynamic_symbol): Don't check h->type.
2017         (_bfd_mips_elf_copy_indirect_symbol): Handle new hash entry fields.
2019 2013-02-11  Richard Sandiford  <rdsandiford@googlemail.com>
2021         * elfxx-mips.c (mips_elf_multi_got_entry_hash): Rename to...
2022         (mips_elf_got_entry_hash): ...this, deleting the old version.
2023         (mips_elf_create_got_info): Use mips_elf_got_entry_hash for
2024         both types of GOT.
2026 2013-02-11  Richard Sandiford  <rdsandiford@googlemail.com>
2028         * elfxx-mips.c (mips_elf_create_got_info): New function.
2029         (mips_elf_get_got_for_bfd, mips_elf_multi_got): Use it.
2030         (mips_elf_create_got_section): Likewise.
2032 2013-02-11  Richard Sandiford  <rdsandiford@googlemail.com>
2034         * elfxx-mips.c (mips_elf_record_local_got_symbol): Always set
2035         gotidx to -1.
2037 2013-02-11  Richard Sandiford  <rdsandiford@googlemail.com>
2039         * elfxx-mips.c (mips_elf_multi_got): Simplify size calculation.
2041 2013-02-11  Richard Sandiford  <rdsandiford@googlemail.com>
2043         * elfxx-mips.c (mips_got_info): Move global_gotsym to...
2044         (mips_elf_link_hash_table): ...here.  Update rest of file accordingly.
2046 2013-02-11  Richard Sandiford  <rdsandiford@googlemail.com>
2048         * elfxx-mips.c (mips_elf_count_global_tls_entries)
2049         (mips_elf_count_global_tls_relocs): Don't count indirect or
2050         warning symbols.
2051         (mips_elf_multi_got, mips_elf_lay_out_got): Assert that the right
2052         number of TLS entries were allocated.
2054 2013-02-11  Richard Sandiford  <rdsandiford@googlemail.com>
2056         * elfxx-mips.c (mips_elf_sort_hash_table_f): Remove asserts.
2058 2013-02-11  Richard Sandiford  <rdsandiford@googlemail.com>
2060         * elfxx-mips.c (mips_elf_merge_got_with): Only use arg->global_count
2061         if there are TLS relocations.
2063 2013-02-11  Richard Sandiford  <rdsandiford@googlemail.com>
2065         * elfxx-mips.c (mips_elf_recreate_got): Remove free.
2066         (mips_elf_resolve_final_got_entries): Remove bogus comment.
2068 2013-02-11  Alan Modra  <amodra@gmail.com>
2070         * elfcode.h (elf_checksum_contents): Free contents.
2071         * elf-bfd.h (_bfd_elf_link_hash_table_free): Declare.
2072         * elflink.c (_bfd_elf_link_hash_table_free): New function.
2073         (elf_final_link_free): New function, extracted from..
2074         (bfd_elf_final_link): ..here.  Always call
2075         _bfd_elf_write_section_eh_frame_hdr.
2076         * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Default to
2077         _bfd_elf_link_hash_table_free.
2078         * libbfd-in.h (_bfd_merge_sections_free): Declare.
2079         * libbfd.h: Regenerate.
2080         * merge.c (_bfd_merge_sections_free): New function.
2081         * elf-eh-frame.c (_bfd_elf_write_section_eh_frame_hdr): Free
2082         hdr_info->array.
2083         * elf-m10300.c (elf32_mn10300_link_hash_table_free): Call
2084         _bfd_elf_link_hash_table_free.
2085         * elf32-arm.c (elf32_arm_link_hash_table_free): Likewise.
2086         * elf32-avr.c (elf32_avr_link_hash_table_free): Likewise.
2087         * elf32-hppa.c (elf32_hppa_link_hash_table_free): Likewise.
2088         * elf32-i386.c (elf_i386_link_hash_table_free): Likewise.
2089         * elf32-m68hc1x.c (m68hc11_elf_hash_table_free): Likewise.
2090         * elf32-m68k.c (elf_m68k_link_hash_table_free): Likewise.
2091         * elf32-metag.c (elf_metag_link_hash_table_free): Likewise.
2092         * elf32-xgate.c (xgate_elf_bfd_link_hash_table_free): Likewise.
2093         * elf64-aarch64.c (elf64_aarch64_link_hash_table_free): Likewise.
2094         * elf64-ia64-vms.c (elf64_ia64_hash_table_free): Likewise.
2095         * elf64-ppc.c (ppc64_elf_link_hash_table_free): Likewise.
2096         * elf64-x86-64.c (elf_x86_64_link_hash_table_free): Likewise.
2097         * elfnn-ia64.c (elfNN_ia64_hash_table_free): Likewise.
2098         * elf32-cr16.c (elf32_cr16_link_hash_table_free): Delete.
2099         (bfd_elf32_bfd_link_hash_table_free): Don't define.
2100         * elf32-tic6x.c (elf32_tic6x_link_hash_table_free): Delete.
2101         (bfd_elf32_bfd_link_hash_table_free): Dont' define.
2103 2013-02-10  Alan Modra  <amodra@gmail.com>
2105         * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_zmalloc.
2106         * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
2107         * m68klinux.c (linux_link_hash_table_create): Likewise.
2108         * sparclinux.c (linux_link_hash_table_create): Likewise.
2109         * sunos.c (sunos_link_hash_table_create): Likewise.
2110         * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
2111         * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
2112         * elf32-arm.c (elf32_arm_link_hash_table_create): Likewise.
2113         * elf32-avr.c (elf32_avr_link_hash_table_create): Likewise.
2114         * elf32-cr16.c (elf32_cr16_link_hash_table_create): Likewise.
2115         * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
2116         * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
2117         * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
2118         * elf32-lm32.c (lm32_elf_link_hash_table_create): Likewise.
2119         * elf32-m32r.c (m32r_elf_link_hash_table_create): Likewise.
2120         * elf32-m68hc1x.c (m68hc11_elf_hash_table_create): Likewise.
2121         * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
2122         * elf32-metag.c (elf_metag_link_hash_table_create): Likewise.
2123         * elf32-nios2.c (nios2_elf32_link_hash_table_create): Likewise.
2124         * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
2125         * elf32-score.c (elf32_score_link_hash_table_create): Likewise.
2126         * elf32-spu.c (spu_elf_link_hash_table_create): Likewise.
2127         * elf32-tic6x.c (elf32_tic6x_link_hash_table_create): Likewise.
2128         * elf32-vax.c (elf_vax_link_hash_table_create): Likewise.
2129         * elf32-xgate.c (xgate_elf_bfd_link_hash_table_create): Likewise.
2130         * elf32-xtensa.c (elf_xtensa_link_hash_table_create): Likewise.
2131         * elf64-aarch64.c (elf64_aarch64_link_hash_table_create): Likewise.
2132         * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
2133         * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
2134         * elf64-x86-64.c (elf_x86_64_link_hash_table_create): Likewise.
2135         * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
2136         * elflink.c (_bfd_elf_link_hash_table_create): Likewise.
2137         (_bfd_elf_link_hash_table_init): Assume zero fill table on entry.
2139 2013-02-10  Alan Modra  <amodra@gmail.com>
2141         * i386linux.c (linux_link_hash_table_create): Allocate table
2142         with bfd_zmalloc, not bfd_alloc.
2143         * pdp11.c (link_hash_table_create): Allocate table with
2144         bfd_malloc, not bfd_alloc.
2145         * elf32-bfin.c (bfinfdpic_elf_link_hash_table_create): Allocate table
2146         with bfd_zmalloc, not bfd_zalloc.
2147         (bfin_link_hash_table_create): Likewise.
2148         * elf32-frv.c (frvfdpic_elf_link_hash_table_create): Likewise.
2149         * elf64-hppa.c (elf64_hppa_hash_table_create): Likewise.
2151 2013-02-10  Alan Modra  <amodra@gmail.com>
2153         PR ld/15113
2154         * elf32-sh.c (sh_elf_link_hash_table_create): Use bfd_zmalloc.
2156 2013-02-08  Markos Chandras  <markos.chandras@imgtec.com>
2158         * elf32-metag.c: Use bfd_get_linker_section to get SEC_LINKER_CREATED
2159         sections.
2160         (elf_metag_adjust_dynamic_symbol): Don't error on zero size dynbss
2161         symbol.
2163 2013-02-08  Yufeng Zhang  <yufeng.zhang@arm.com>
2165         * elf64-aarch64.c (elf64_aarch64_grok_prstatus): Change 'size' from
2166         288 to 272.
2168 2013-02-08  Alan Modra  <amodra@gmail.com>
2170         PR binutils/15106
2171         * elf-bfd.h (struct elf_obj_tdata): Add elf_find_function_cache.
2172         * elf.c (elf_find_function): Revert last change.  Use new
2173         tdata field rather than static vars for cache.
2175 2013-02-07  H.J. Lu  <hongjiu.lu@intel.com>
2177         PR ld/15107
2178         * elflink.c (elf_link_output_extsym): Set STB_GNU_UNIQUE only if
2179         symbol is defined in regular object.
2181 2013-02-07  Roberto Agostino Vitillo  <ra.vitillo@gmail.com>
2183         PR binutils/15106
2184         * elf.c (elf_find_function): Don't cache if symbols change.
2186 2013-02-07  Alan Modra  <amodra@gmail.com>
2188         PR binutils/14873
2189         * elf-attrs.c (_bfd_elf_copy_obj_attributes): Don't attempt to
2190         copy attributes from or to non-ELF.
2192 2013-02-06  H.J. Lu  <hongjiu.lu@intel.com>
2194         * elf32-i386.c (elf_i386_allocate_dynrelocs): Don't clear pc_count
2195         for non-zero TLS symbol.
2196         (elf_i386_relocate_section): Don't resolve size relocation against
2197         non-zero TLS symbol.
2198         * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Don't clear
2199         pc_count for non-zero TLS symbol.
2200         (elf_x86_64_relocate_section): Don't resolve size relocation
2201         against non-zero TLS symbol.
2203 2013-02-06  Sandra Loosemore  <sandra@codesourcery.com>
2204             Andrew Jenner <andrew@codesourcery.com>
2206         Based on patches from Altera Corporation.
2208         * Makefile.am (ALL_MACHINES): Add cpu-nios2.lo.
2209         (ALL_MACHINES_CFILES): Add cpu-nios2.c.
2210         (BFD_BACKENDS): Add elf32-nios2.lo.
2211         (BFD32_BACKENDS_CFILES): Add elf32-nios2.c.
2212         * Makefile.in: Regenerated.
2213         * configure.in: Add entries for bfd_elf32_bignios2_vec and
2214         bfd_elf32_littlenios2_vec.
2215         * configure: Regenerated.
2216         * config.bfd: Add cases for nios2.
2217         * archures.c (enum bfd_architecture): Add bfd_arch_nios2.
2218         (bfd_mach_nios2): Define.
2219         (bfd_nios2_arch): Declare.
2220         (bfd_archures_list): Add bfd_nios2_arch.
2221         * targets.c (bfd_elf32_bignios2_vec): Declare.
2222         (bfd_elf32_littlenios2_vec): Declare.
2223         (_bfd_target_vector): Add entries for bfd_elf32_bignios2_vec and
2224         bfd_elf32_littlenios2_vec.
2225         * elf-bfd.h (enum elf_target_id): Add NIOS2_ELF_DATA.
2226         * reloc.c (enum bfd_reloc_code_real): Add Nios II relocations.
2227         * bfd-in2.h: Regenerated.
2228         * libbfd.h: Regenerated.
2229         * cpu-nios2.c: New file.
2230         * elf32-nios2.c: New file.
2232 2013-02-06  Alan Modra  <amodra@gmail.com>
2234         * elf32-arm.c (elf32_arm_final_link_relocate): Only test for
2235         stubs in stub_bfd.
2237 2013-02-06  Alan Modra  <amodra@gmail.com>
2239         * Makefile.am (SOURCE_HFILES): Add `elf-linux-psinfo.h'.
2240         * Makefile.in: Regenerate.
2242 2013-02-04  Sergio Durigan Junior  <sergiodj@redhat.com>
2243             Pedro Alves  <palves@redhat.com>
2245         * Makefile.in (SOURCE_HFILES): Add `elf-linux-psinfo.h'.
2246         * elf-bfd.h (elf_internal_linux_prpsinfo): New structure
2247         declaration.
2248         (elfcore_write_linux_prpsinfo32, elfcore_write_linux_prpsinfo64)
2249         (elfcore_write_ppc32_linux_prpsinfo32): New declarations.
2250         * elf-linux-psinfo.h: New file.
2251         * elf.c: Include elf-linux-psinfo.h.
2252         (elfcore_write_linux_prpsinfo32, elfcore_write_linux_prpsinfo64):
2253         New functions.
2254         * elf32-ppc.c: Include `elf-linux-psinfo.h'.
2255         (elf_external_ppc_linux_prpsinfo32): New structure declaration.
2256         (PPC_LINUX_PRPSINFO32_SWAP_FIELDS): New macro.
2257         (elfcore_write_ppc_linux_prpsinfo32): New function.
2259 2013-02-04  Tristan Gingold  <gingold@adacore.com>
2261         * mach-o.c (bfd_mach_o_scan_start_address): Do not fail if no
2262         start address.
2264 2013-02-04  Alan Modra  <amodra@gmail.com>
2266         * Makefile.am (BFD64_BACKENDS): Remove elf-nacl.lo.
2267         (BFD64_BACKENDS_CFILES): Remove elf-nacl.c.
2268         * Makefile.in: Regenerate.
2269         * po/SRC-POTFILES.in: Regenerate.
2271 2013-02-04  Alan Modra  <amodra@gmail.com>
2273         * coff-tic54x.c (SWAP_OUT_RELOC_EXTRA): Delete.
2274         * coff-tic80.c (SWAP_OUT_RELOC_EXTRA): Delete.
2276 2013-02-01  Alan Modra  <amodra@gmail.com>
2278         * elf64-ppc.c (dec_dynrel_count): Don't error when elf_gc_sweep_symbol
2279         clears def_regular.
2281 2013-01-31  Tristan Gingold  <gingold@adacore.com>
2283         * mach-o.c (bfd_mach_o_scan): Call bfd_mach_o_flatten_sections
2284         earlier.  Fix status checking of bfd_mach_o_scan_start_address.
2285         (bfd_mach_o_scan_start_address): Handle LC_MAIN.
2287 2013-01-31  Alan Modra  <amodra@gmail.com>
2288             David S. Miller  <davem@davemloft.net>
2290         PR ld/15056
2291         * elfxx-sparc.c (_bfd_sparc_elf_gc_mark_hook): Handle implicit
2292         references to __tls_get_addr.
2293         * elf32-tilpro.c (tilepro_elf_gc_mark_hook): Likewise.  Correct
2294         vtinherit and vtentry reloc handling too.
2295         * elfxx-tilegx.c (tilegx_elf_gc_mark_hook): As for tilepro.
2297 2013-01-31  Alan Modra  <amodra@gmail.com>
2299         * elf64-ppc.c (ppc_stub_name): Trim off trailing "+0".
2301 2013-01-31  Alan Modra  <amodra@gmail.com>
2303         * elf64-ppc.c (build_plt_stub): Correct plt stub branch to glink.
2305 2013-01-28  Alan Modra  <amodra@gmail.com>
2307         * elf64-ppc.c: Use %T to print symbols names and remove redundant
2308         "relocation" in error messages throughout file.
2309         (ppc64_elf_relocate_section): Remove sibling call error message,
2310         replace with "call lacks nop".  Specially report errors for
2311         branches to function entry points via OPD lookup and branches
2312         to stubs.  Remove NULL symbol handling now done by %T.
2314 2013-01-28  Alan Modra  <amodra@gmail.com>
2316         * archive.c (bfd_generic_archive_p): Return target and keep
2317         ardata on partial matches.
2318         * format.c (bfd_check_format_matches): Adjust for above
2319         change.  Remove bfd_error_file_ambiguously_recognized dead
2320         code.
2322 2013-01-26  Alan Modra  <amodra@gmail.com>
2324         * bfd.c (struct bfd_preserve, bfd_preserve_save, bfd_preserve_restore,
2325         bfd_preserve_finish): Move to..
2326         * format.c: ..here, splitting out..
2327         (bfd_reinit): ..this.  New function.
2328         (bfd_check_format_matches): Use bfd_preserve_save/restore to
2329         keep bfd state for a match.
2330         * elfcode.h (elf_object_p): Don't use bfd_preserve_save/restore.
2331         * elfcore.h (elf_core_file_p): Likewise.
2332         * mach-o.c (bfd_mach_o_header_p): Likewise.
2333         * pef.c (bfd_pef_object_p, bfd_pef_xlib_object_p): Likewise.
2334         * xsym.c (bfd_sym_object_p): Likewise.
2335         * mmo.c (mmo_scan): Clear abfd->symcount.
2336         * opncls.c (_bfd_new_bfd): Use a smaller section hash table.
2337         * section.c (bfd_section_list_clear): Clear section_htab.count.
2338         * bfd-in2.h: Regenerate.
2340 2013-01-25  Michael Schewe  <michael.schewe@gmx.net>
2342         * elf32-h8300.c (elf32_h8_relax_section): When checking for a
2343         second reloc, make sure that the reloc potentially exists first.
2345 2013-01-24  Nick Clifton  <nickc@redhat.com>
2347         * archures.c: Add bfd_mach_v850e3v5.
2348         * bfd-in2.h: Regenerate.
2349         * cpu-v850.c: Add entries for v850e2v5 and v850e3v5.
2350         * cpu-v850_rh850.c: Likewise.
2351         * elf32-v850.c: Add support for v850e3v5 architecture.
2353 2013-01-23  Markos Chandras  <markos.chandras@imgtec.com>
2355         * elf32-metag.c: Error on HIADDR16/LOADDR16 in shared link.
2357 2013-01-23  Leif Ekblad  <leif@rdos.net>
2359         * config.bfd (x86_64-*-rdos*): Remove targ_selvecs.
2361 2013-01-18  H.J. Lu  <hongjiu.lu@intel.com>
2363         * elf32-i386.c (elf_i386_allocate_dynrelocs): Clear pc_count for
2364         non-zero TLS symbol.
2365         (elf_i386_relocate_section): Resolve size relocation against
2366         non-zero TLS symbol.
2367         * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Clear pc_count
2368         for non-zero TLS symbol.
2369         (elf_x86_64_relocate_section): Resolve size relocation against
2370         non-zero TLS symbol.
2372 2013-01-18  Mike Frysinger  <vapier@gentoo.org>
2374         * elflink.c (bfd_elf_size_dynamic_sections): Only add DT_RPATH
2375         when new_dtags is false.  Only add DT_RUNPATH when new_dtags is
2376         true.
2378 2013-01-17  H.J. Lu  <hongjiu.lu@intel.com>
2380         * elf32-i386.c (elf_i386_check_relocs): Count size relocation as
2381         PC-relative relocation.
2382         * elf64-x86-64.c (elf_x86_64_check_relocs): Count size relocation
2383         as PC-relative relocation.
2385 2013-01-16  H.J. Lu  <hongjiu.lu@intel.com>
2387         * elf32-i386.c (elf_i386_check_relocs): Update R_386_SIZE32
2388         check.
2389         (elf_i386_relocate_section): Don't check TLS for R_386_SIZE32.
2391         * elf64-x86-64.c (elf_x86_64_check_relocs): Update R_X86_64_SIZE32
2392         and R_X86_64_SIZE64 check.
2393         (elf_x86_64_relocate_section): Don't check TLS for R_X86_64_SIZE32
2394         nor R_X86_64_SIZE64.
2396 2013-01-16  H.J. Lu  <hongjiu.lu@intel.com>
2398         * bfd-in2.h: Regenerated.
2399         * libbfd.h: Likewise.
2401         * elf32-i386.c (elf_howto_table): Fill R_386_SIZE32 entry.
2402         (elf_i386_reloc_type_lookup): Support BFD_RELOC_SIZE32.
2403         (elf_i386_check_relocs): Handle R_386_SIZE32.
2404         (elf_i386_gc_sweep_hook): Likewise.
2405         (elf_i386_relocate_section): Likewise.
2407         * elf64-x86-64.c (x86_64_elf_howto_table): Fill R_X86_64_SIZE32
2408         and R_X86_64_SIZE64 entries.
2409         (x86_64_reloc_map): Add BFD_RELOC_SIZE32 and BFD_RELOC_SIZE64,
2410         (elf_x86_64_rtype_to_howto): Handle R_X86_64_SIZE32 for x32.
2411         (elf_x86_64_reloc_name_lookup): Likewise.
2412         (elf_x86_64_check_relocs): Handle R_X86_64_SIZE32 and
2413         R_X86_64_SIZE64.
2414         (elf_x86_64_gc_sweep_hook): Likewise.
2415         (elf_x86_64_relocate_section): Likewise.
2417         * reloc.c (bfd_reloc_code_type): Add BFD_RELOC_SIZE32 and
2418         BFD_RELOC_SIZE64.
2420 2013-01-15  H.J. Lu  <hongjiu.lu@intel.com>
2422         * elf64-x86-64.c (R_X86_64_standard): Replace R_X86_64_IRELATIVE
2423         with R_X86_64_RELATIVE64.
2425 2013-01-15  Nick Clifton  <nickc@redhat.com>
2427         * elf32-msp430.c: Fix spelling typo.
2429 2013-01-15  Alan Modra  <amodra@gmail.com>
2431         * elf64-ppc.c (ppc64_elf_size_stubs): Default shared libs to
2432         plt-thread-safe.
2434 2013-01-14  Alan Modra  <amodra@gmail.com>
2436         PR binutils/14813
2437         * bfdio.c (struct bfd_iovec <bclose>): Revert 2012-11-06.
2438         (memory_bclose): Likewise.  Return 0 on success.
2439         * cache.c (cache_bclose): Likewise.
2440         * opncls.c (opncls_bclose, bfd_close): Likewise.
2441         * vms-lib.c (vms_lib_bclose): Likewise.
2442         * libbfd.h: Regenerate.
2444 2013-01-13  Alan Modra  <amodra@gmail.com>
2446         * elf-bfd.h (struct elf_link_hash_entry): Delete dynamic_weak.
2447         Add ref_dynamic_nonweak.
2448         * elflink.c (_bfd_elf_mark_dynamic_def_weak): Delete.
2449         (_bfd_elf_merge_symbol): Don't call above function.  Move
2450         setting of ref_dynamic_nonweak and dynamic_def earlier.  Don't
2451         clear dynamic_def.
2452         (elf_link_add_object_symbols): Delete redundant "override" test.
2453         Don't set dynamic_def here.
2454         (elf_link_output_extsym): Update.
2456 2013-01-12  H.J. Lu  <hongjiu.lu@intel.com>
2458         * elf32-i386.c (elf_i386_check_relocs): Set bfd errror for
2459         normal and TLS symbol access.
2460         * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
2462 2013-01-12  Alan Modra  <amodra@gmail.com>
2464         * elf-bfd.h (_bfd_elf_strtab_refcount): Declare.
2465         * elf-strtab.c (_bfd_elf_strtab_refcount): New function.
2466         * elflink.c (elf_add_dt_needed_tag): Use _bfd_elf_strtab_refcount.
2468 2013-01-12  Alan Modra  <amodra@gmail.com>
2470         PR ld/12549
2471         * elf-bfd.h (_bfd_elf_strtab_clear_refs): Declare.
2472         (_bfd_elf_strtab_clear_all_refs): Define.
2473         * elf-strtab.c (_bfd_elf_strtab_clear_refs): New function.
2474         (_bfd_elf_strtab_clear_all_refs): Delete.
2475         * elflink.c (elf_link_add_object_symbols): Clear out added
2476         strtab refs.  Correct handling of warning common symbols.
2478 2013-01-10  H.J. Lu  <hongjiu.lu@intel.com>
2480         * aout0.c: Remove trailing white spaces.
2481         * archive.c: Likewise.
2482         * archures.c: Likewise.
2483         * bfd-in.h: Likewise.
2484         * bfd-in2.h: Likewise.
2485         * coff-alpha.c: Likewise.
2486         * coff-i860.c: Likewise.
2487         * coff-mips.c: Likewise.
2488         * coff-ppc.c: Likewise.
2489         * coff-tic80.c: Likewise.
2490         * coff-x86_64.c: Likewise.
2491         * coff-z80.c: Likewise.
2492         * coffcode.h: Likewise.
2493         * coffgen.c: Likewise.
2494         * cofflink.c: Likewise.
2495         * compress.c: Likewise.
2496         * corefile.c: Likewise.
2497         * cpu-arm.c: Likewise.
2498         * cpu-avr.c: Likewise.
2499         * cpu-bfin.c: Likewise.
2500         * cpu-cr16.c: Likewise.
2501         * cpu-cr16c.c: Likewise.
2502         * cpu-crx.c: Likewise.
2503         * cpu-h8300.c: Likewise.
2504         * cpu-i386.c: Likewise.
2505         * cpu-lm32.c: Likewise.
2506         * cpu-m68k.c: Likewise.
2507         * cpu-moxie.c: Likewise.
2508         * cpu-msp430.c: Likewise.
2509         * cpu-sh.c: Likewise.
2510         * cpu-xc16x.c: Likewise.
2511         * dwarf2.c: Likewise.
2512         * ecofflink.c: Likewise.
2513         * ecoffswap.h: Likewise.
2514         * elf-ifunc.c: Likewise.
2515         * elf-m10300.c: Likewise.
2516         * elf-vxworks.c: Likewise.
2517         * elf32-avr.c: Likewise.
2518         * elf32-avr.h: Likewise.
2519         * elf32-cr16.c: Likewise.
2520         * elf32-cr16c.c: Likewise.
2521         * elf32-cris.c: Likewise.
2522         * elf32-crx.c: Likewise.
2523         * elf32-frv.c: Likewise.
2524         * elf32-hppa.c: Likewise.
2525         * elf32-i860.c: Likewise.
2526         * elf32-ip2k.c: Likewise.
2527         * elf32-iq2000.c: Likewise.
2528         * elf32-m32c.c: Likewise.
2529         * elf32-m68hc1x.c: Likewise.
2530         * elf32-msp430.c: Likewise.
2531         * elf32-mt.c: Likewise.
2532         * elf32-ppc.c: Likewise.
2533         * elf32-rl78.c: Likewise.
2534         * elf32-s390.c: Likewise.
2535         * elf32-score.h: Likewise.
2536         * elf32-sh-symbian.c: Likewise.
2537         * elf32-sh.c: Likewise.
2538         * elf32-spu.c: Likewise.
2539         * elf32-tic6x.c: Likewise.
2540         * elf32-v850.c: Likewise.
2541         * elf32-xc16x.c: Likewise.
2542         * elf32-xtensa.c: Likewise.
2543         * elf64-alpha.c: Likewise.
2544         * elf64-hppa.c: Likewise.
2545         * elf64-ppc.c: Likewise.
2546         * elf64-s390.c: Likewise.
2547         * elfcore.h: Likewise.
2548         * elflink.c: Likewise.
2549         * elfxx-mips.c: Likewise.
2550         * elfxx-sparc.c: Likewise.
2551         * elfxx-tilegx.c: Likewise.
2552         * ieee.c: Likewise.
2553         * libcoff.h: Likewise.
2554         * libpei.h: Likewise.
2555         * libxcoff.h: Likewise.
2556         * linker.c: Likewise.
2557         * mach-o-i386.c: Likewise.
2558         * mach-o-target.c: Likewise.
2559         * mach-o.c: Likewise.
2560         * mach-o.h: Likewise.
2561         * mmo.c: Likewise.
2562         * opncls.c: Likewise.
2563         * pdp11.c: Likewise.
2564         * pe-x86_64.c: Likewise.
2565         * peXXigen.c: Likewise.
2566         * pef-traceback.h: Likewise.
2567         * pei-x86_64.c: Likewise.
2568         * peicode.h: Likewise.
2569         * plugin.c: Likewise.
2570         * reloc.c: Likewise.
2571         * riscix.c: Likewise.
2572         * section.c: Likewise.
2573         * som.c: Likewise.
2574         * syms.c: Likewise.
2575         * tekhex.c: Likewise.
2576         * ticoff.h: Likewise.
2577         * vaxbsd.c: Likewise.
2578         * xcofflink.c: Likewise.
2579         * xtensa-isa.c: Likewise.
2581 2013-01-10  Will Newton <will.newton@imgtec.com>
2583         * Makefile.am: Add Meta.
2584         * Makefile.in: Regenerate.
2585         * archures.c (bfd_mach_metag): New.
2586         * bfd-in2.h: Regenerate.
2587         * config.bfd: Add Meta.
2588         * configure: Regenerate.
2589         * configure.in: Add Meta.
2590         * cpu-metag.c: New file.
2591         * elf-bfd.h: Add Meta.
2592         * elf32-metag.c: New file.
2593         * elf32-metag.h: New file.
2594         * libbfd.h: Regenerate.
2595         * reloc.c: Add Meta relocations.
2596         * targets.c: Add Meta.
2598 2013-01-08  Yufeng Zhang  <yufeng.zhang@arm.com>
2600         * elf-bfd.h (elfcore_write_aarch_tls): Add prototype.
2601         (elfcore_write_aarch_hw_break): Likewise.
2602         (elfcore_write_aarch_hw_watch): Likewise.
2603         * elf.c (elfcore_grok_aarch_tls): New function.
2604         (elfcore_grok_aarch_hw_break): Likewise.
2605         (elfcore_grok_aarch_hw_watch): Likewise.
2606         (elfcore_grok_note): Call the new functions to handle the
2607         corresponding notes.
2608         (elfcore_write_aarch_tls): New function.
2609         (elfcore_write_aarch_hw_break): Likewise.
2610         (elfcore_write_aarch_hw_watch): Likewise.
2611         (elfcore_write_register_note): Call the new functions to handle the
2612         corresponding pseudo sections.
2614 2013-01-07  Tom Tromey  <tromey@redhat.com>
2616         * section.c (_bfd_std_section): Rename from std_section.
2617         (bfd_com_section_ptr, bfd_und_section_ptr, bfd_abs_section_ptr)
2618         (STD_SECTION): Update.
2619         * bfd-in2.h: Rebuild.
2621 2013-01-04  Juergen Urban <JuergenUrban@gmx.de>
2623         * archures.c (bfd_mach_mips5900): Define.
2624         * bfd-in2.h: Regenerate.
2625         * config.bfd: Add mips64-ps2-elf and mips-ps2-elf targets.
2626         * cpu-mips.c: Add support for MIPS r5900.
2627         * elfxx-mips.c: Add support for MIPS r5900 (extension of r4000).
2629 2013-01-03  Nickolai Zeldovich  <nickolai@csail.mit.edu>
2630             Nick Clifton  <nickc@redhat.com>
2632         * elflink.c (get_value): Prevent the use of an undefined shift
2633         operation.  Add sanity checks.
2635 2013-01-02  Kaushik Phatak  <kaushik.phatak@kpitcummins.com>
2637         * config.bfd (cr16*-*-uclinux*): New target support.
2640 For older changes see ChangeLog-2012
2642 Copyright (C) 2013 Free Software Foundation, Inc.
2644 Copying and distribution of this file, with or without modification,
2645 are permitted in any medium without royalty provided the copyright
2646 notice and this notice are preserved.
2648 Local Variables:
2649 mode: change-log
2650 left-margin: 8
2651 fill-column: 74
2652 version-control: never
2653 End: