1e08f3d287a1390244a956d32adc074ea4dff998
[external/binutils.git] / bfd / ChangeLog
1 2016-07-27  Nick Clifton  <nickc@redhat.com>
2
3         * Import this patch from the mainline:
4         2016-07-27  Ozkan Sezer  <sezeroz@gmail.com>
5             Nick Clifton  <nickc@redhat.com>
6
7         PR ld/20401
8         * coffgen.c (fini_reloc_cookie_rels): Check for the extistence
9         of the coff_section_data before using it.
10
11 2016-07-01  Tristan Gingold  <gingold@adacore.com>
12
13         * version.m4: Bump version to 2.26.90
14         * configure: Regenerate.
15
16 2016-07-01  Tristan Gingold  <gingold@adacore.com>
17
18         * version.m4: Bump version to 2.27.51
19         * configure: Regenerate.
20
21 2016-06-29  Nick Clifton  <nickc@redhat.com>
22
23         * elfnn-aarch64.c (is_aarch64_mapping_symbol): New function.
24         Returns TRUE for AArch64 mapping symbols.
25         (elfNN_aarch64_backend_symbol_processing): New function.  Marks
26         mapping symbols as precious in object files so that they will not
27         be stripped.
28         (elf_backend_symbol_processing): Define.
29
30         * elf32-arm.c (is_arm_mapping_symbol): New function.  Returns TRUE
31         for ARM mapping symbols.
32         (elf32_arm_backend_symbol_processing): Make use of the new function.
33
34 2016-06-28  H.J. Lu  <hongjiu.lu@intel.com>
35
36         PR ld/20306
37         * elflink.c (elf_link_check_versioned_symbol): Return false
38         for unreferenced undefined symbol.
39
40 2016-06-28  Nick Clifton  <nickc@redhat.com>
41
42         * elf32-bfin.c (bfin_adjust_dynamic_symbol): Fail if a COPY reloc
43         is needed.
44
45         * elf32-arm.c (elf32_arm_backend_symbol_processing): New
46         function.  Marks mapping symbols in object files as precious, so
47         that strip will not remove them.
48         (elf_backend_symbol_processing): Define.
49
50 2016-06-28  James Clarke  <jrtc27@jrtc27.com>
51
52         * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Don't convert
53         R_SPARC_32 to R_SPARC_RELATIVE if class is ELFCLASS64.
54
55 2016-06-28  Maciej W. Rozycki  <macro@imgtec.com>
56
57         * elf32-mips.c (elf_mips16_howto_table_rel): Add
58         R_MIPS16_PC16_S1.
59         (mips16_reloc_map): Likewise.
60         * elf64-mips.c (mips16_elf64_howto_table_rel): Likewise.
61         (mips16_elf64_howto_table_rela): Likewise.
62         (mips16_reloc_map): Likewise.
63         * elfn32-mips.c (elf_mips16_howto_table_rel): Likewise.
64         (elf_mips16_howto_table_rela): Likewise.
65         (mips16_reloc_map): Likewise.
66         * elfxx-mips.c (mips16_branch_reloc_p): New function.
67         (mips16_reloc_p): Handle R_MIPS16_PC16_S1.
68         (b_reloc_p): Likewise.
69         (mips_elf_calculate_relocation): Likewise.
70         (_bfd_mips_elf_check_relocs): Likewise.
71         * reloc.c (BFD_RELOC_MIPS16_16_PCREL_S1): New relocation.
72         * bfd-in2.h: Regenerate.
73         * libbfd.h: Regenerate.
74
75 2016-06-27  Alan Modra  <amodra@gmail.com>
76
77         PR ld/19264
78         * elf64-ppc.c (STUB_SHRINK_ITER): Define.
79         (ppc64_elf_size_stubs): Exit stub sizing loop past STUB_SHRINK_ITER
80         if shrinking stubs.
81         (ppc64_elf_size_stubs): Adjust to suit.
82
83 2016-06-27  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>
84
85         * elf32-dlx.h: New file.
86         * elf32-dlx.c: Adjust.
87
88 2016-06-25  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>
89
90         * elf32-xtensa.c (xtensa_make_property_section): Remove prototype.
91
92 2016-06-24  John Baldwin  <jhb@FreeBSD.org>
93
94         * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PROCSTAT_AUXV
95         notes.
96
97 2016-06-24  John Baldwin  <jhb@FreeBSD.org>
98
99         * elf.c (elfcore_grok_note): Remove handling of NT_X86_XSTATE for
100         FreeBSD.  Remove case for NT_FREEBSD_THRMISC.
101         (elfcore_grok_freebsd_psinfo): New function.
102         (elfcore_grok_freebsd_prstatus): New function.
103         (elfcore_grok_freebsd_note): New function.
104         (elf_parse_notes): Use "elfcore_grok_freebsd_note" for "FreeBSD"
105         notes.
106
107 2016-06-24  Joel Brobecker  <brobecker@adacore.com>
108
109         * elflink.c: Check the value of BFD_SUPPORTS_PLUGINS rather
110         than its existance.
111
112 2016-06-24  Alan Modra  <amodra@gmail.com>
113
114         * config.bfd: Delete mips vxworks patterns matched earlier.
115         Combine mips*-*-none with mips*-*-elf*.
116
117 2016-06-21  Maciej W. Rozycki  <macro@imgtec.com>
118
119         * elfxx-mips.c (mips_elf_perform_relocation): Call
120         `info->callbacks->einfo' rather than `*_bfd_error_handler' and
121         use the `%X%H' format for the cross-mode jump conversion error
122         message.  Remove the full stop from the end of the message.
123         Continue processing rather than returning failure.
124
125 2016-06-21  Graham Markall  <graham.markall@embecosm.com>
126
127         * archures.c: Remove bfd_mach_arc_nps400.
128         * bfd-in2.h: Likewise.
129         * cpu-arc.c (arch_info_struct): Likewise.
130         * elf32-arc.c (arc_elf_object_p, arc_elf_final_write_processing):
131         Likewise.
132
133 2016-06-20  H.J. Lu  <hongjiu.lu@intel.com>
134
135         PR ld/18250
136         PR ld/20267
137         * elflink.c: Include plugin.h if BFD_SUPPORTS_PLUGINS is
138         defined.
139         (elf_link_is_defined_archive_symbol): Call
140         bfd_link_plugin_object_p on unknown plugin object and use the
141         IR symbol table if the input is an IR object.
142         * plugin.c (bfd_link_plugin_object_p): New function.
143         * plugin.h (bfd_link_plugin_object_p): New prototype.
144
145 2016-06-20  H.J. Lu  <hongjiu.lu@intel.com>
146
147         PR ld/20276
148         * elflink.c (elf_link_add_object_symbols): Don't check alignment
149         on symbol from plugin dummy input.
150
151 2016-06-18  H.J. Lu  <hongjiu.lu@intel.com>
152
153         * bfd.c (bfd_plugin_format): Rename bfd_plugin_uknown to
154         bfd_plugin_unknown.
155         * bfd-in2.h: Regenerated.
156         * plugin.c (bfd_plugin_object_p): Replace bfd_plugin_uknown
157         with bfd_plugin_unknown.
158
159 2016-06-18  H.J. Lu  <hongjiu.lu@intel.com>
160
161         PR ld/20253
162         * elf-bfd.h (_bfd_elf_allocate_ifunc_dyn_relocs): Add an
163         bfd_boolean argument.
164         * elf-ifunc.c (_bfd_elf_create_ifunc_sections): Replace
165         "shared object" with "PIC object" in comments.
166         (_bfd_elf_allocate_ifunc_dyn_relocs): Updated.  Replace
167         "shared object" with "PIC object" in comments.  Avoid PLT if
168         requested.  Generate dynamic relocations for non-GOT references.
169         Make room for the special first entry in PLT and allocate PLT
170         entry only for PLT and PC-relative references.  Store dynamic
171         GOT relocations in .rel[a].iplt section for static executables.
172         If PLT isn't used, always use GOT for symbol value.  Don't
173         allocate GOT entry if it isn't used.
174         * elf32-i386.c (elf_i386_check_relocs): Increment PLT reference
175         count only in the code section.  Allocate dynamic pointer
176         relocation against STT_GNU_IFUNC symbol in the non-code section.
177         (elf_i386_adjust_dynamic_symbol): Increment PLT reference count
178         only for PC-relative references.
179         (elf_i386_allocate_dynrelocs): Pass TRUE to
180         _bfd_elf_allocate_ifunc_dyn_relocs.
181         (elf_i386_relocate_section): Allow R_386_GOT32/R_386_GOT32X
182         relocations against STT_GNU_IFUNC symbols without PLT.  Generate
183         dynamic pointer relocation against STT_GNU_IFUNC symbol in
184         the non-code section and store it in the proper REL section.
185         Don't allow non-pointer relocation against STT_GNU_IFUNC symbol
186         without PLT.
187         (elf_i386_finish_dynamic_symbol): Generate dynamic
188         R_386_IRELATIVE and R_386_GLOB_DAT GOT relocations against
189         STT_GNU_IFUNC symbols without PLT.
190         (elf_i386_finish_dynamic_sections): Don't handle local
191         STT_GNU_IFUNC symbols here.
192         (elf_i386_output_arch_local_syms): Handle local STT_GNU_IFUNC
193         symbols here.
194         (elf_backend_output_arch_local_syms): New.
195         * elf32-x86-64.c (elf_i386_check_relocs): Increment PLT reference
196         count only in the code section.  Allocate dynamic pointer
197         relocation against STT_GNU_IFUNC symbol in the non-code section.
198         (elf_x86_64_adjust_dynamic_symbol): Increment PLT reference
199         count only for PC-relative references.
200         (elf_x86_64_allocate_dynrelocs): Pass TRUE to
201         _bfd_elf_allocate_ifunc_dyn_relocs.
202         (elf_x86_64_relocate_section): Allow R_X86_64_GOTPCREL,
203         R_X86_64_GOTPCRELX, R_X86_64_REX_GOTPCRELX and
204         R_X86_64_GOTPCREL64 relocations against STT_GNU_IFUNC symbols
205         without PLT.  Generate dynamic pointer relocation against
206         STT_GNU_IFUNC symbol in the non-code section and store it in
207         the proper RELA section.  Don't allow non-pointer relocation
208         against STT_GNU_IFUNC symbol without PLT.
209         (elf_x86_64_finish_dynamic_symbol): Generate dynamic
210         R_X86_64_IRELATIVE and R_X86_64_GLOB_DAT GOT relocations against
211         STT_GNU_IFUNC symbols without PLT.
212         (elf_x86_64_finish_dynamic_sections): Don't handle local
213         STT_GNU_IFUNC symbols here.
214         (elf_x86_64_output_arch_local_syms): Handle local STT_GNU_IFUNC
215         symbols here.
216         (elf_backend_output_arch_local_syms): New.
217         * elfnn-aarch64.c (elfNN_aarch64_allocate_ifunc_dynrelocs):
218         Pass FALSE to _bfd_elf_allocate_ifunc_dyn_relocs.
219
220 2016-06-17  Thomas Preud'homme  <thomas.preudhomme@arm.com>
221             Tony Wang  <tony.wang@arm.com>
222
223         * elf32-arm.c (elf32_arm_stub_long_branch_thumb2_only): Define stub
224         sequence.
225         (stub_long_branch_thumb2_only): Define stub.
226         (arm_stub_is_thumb): Add case for arm_stub_long_branch_thumb2_only.
227         (arm_stub_long_branch_thumb2_only): Likewise.
228         (arm_type_of_stub): Use arm_stub_long_branch_thumb2_only for Thumb-2
229         capable targets.
230
231 2016-06-17  Jose E. Marchesi  <jose.marchesi@oracle.com>
232
233         * archures.c (bfd_mach_sparc_v8plusc): Define.
234         (bfd_mach_sparc_v9c): Likewise.
235         (bfd_mach_sparc_v8plusd): Likewise.
236         (bfd_mach_sparc_v9d): Likewise.
237         (bfd_mach_sparc_v8pluse): Likewise.
238         (bfd_mach_sparc_v9e): Likewise.
239         (bfd_mach_sparc_v8plusv): Likewise
240         (bfd_mach_sparc_v9v): Likewise.
241         (bfd_mach_sparc_v8plusm): Likewise.
242         (bfd_mach_sparc_v9m): Likewise.
243         (bfd_mach_sparc_v9_p): Adapt to v8plusm and v9m.
244         (bfd_mach_sparc_64bit_p): Likewise.
245         * bfd-in2.h: Regenerate.
246         * cpu-sparc.c (arch_info_struct): Add entries for
247         bfd_mach_sparc_v8plus{c,d,e,v,m} and bfd_mach_sparc_v9{c,d,e,v,m}.
248         * aoutx.h (machine_type): Handle bfd_mach_sparc_v8plus{c,d,e,v,m}
249         and bfd_mach_sparc_v9{c,d,e,v,m}.
250         * elf32-sparc.c (elf32_sparc_final_write_processing): Likewise.
251         * elfxx-sparc.c (_bfd_sparc_elf_object_p): Likewise.
252
253 2016-06-16  H.J. Lu  <hongjiu.lu@intel.com>
254
255         * elf32-i386.c (elf_i386_check_relocs): Don't check undefined
256         symbols for relocations against IFUNC symbols.
257         * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
258
259 2016-06-16  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
260
261         * elf32-s390.c (elf_s390_finish_dynamic_sections): Include
262         .rela.iplt in DT_PLTRELSZ.
263         * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise,
264         for DT_PLTRELSZ and DT_RELASZ as well.
265
266 2016-06-16  H.J. Lu  <hongjiu.lu@intel.com>
267
268         * elf32-i386.c (elf_i386_check_relocs): Skip relocations in
269         non-loaded, non-alloced sections.
270         * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
271
272 2016-06-15  H.J. Lu  <hongjiu.lu@intel.com>
273
274         * elf32-i386.c (elf_i386_check_relocs): Check SEC_ALLOC before
275         allocating dynamic relocation.
276         * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
277
278 2016-06-14  Senthil Kumar Selvaraj  <senthil_kumar.selvaraj@atmel.com>
279
280         PR ld/20254
281         * elf32-avr.c (elf32_avr_relax_delete_bytes): Adjust reloc
282         offsets until reloc_toaddr.
283
284 2016-06-14  H.J. Lu  <hongjiu.lu@intel.com>
285
286         * elf32-i386.c (elf_i386_reloc_type_class): Check R_386_IRELATIVE.
287         Don't check symbol type for STN_UNDEF symbol index.
288         * elf64-x86-64.c (elf_x86_64_reloc_type_class): Check
289         R_X86_64_IRELATIVE.  Don't check symbol type for STN_UNDEF symbol
290         index.
291
292 2016-06-14  Thomas Preud'homme  <thomas.preudhomme@arm.com>
293
294         * elf32-arm.c (using_thumb_only): Force review of arch check logic for
295         new architecture.
296         (using_thumb2): Try Tag_THUMB_ISA_use first and check
297         for exact arch value then.  Force review of arch check logic for new
298         architecture.
299         (arch_has_arm_nop): Update and fix arch check logic.  Force review of
300         that logic for new architecture.
301         (arch_has_thumb2_nop): Remove.
302         (elf32_arm_tls_relax): Use using_thumb2 instead of above function.
303         (elf32_arm_final_link_relocate): Likewise but using thumb2.
304
305 2016-06-14  Alan Modra  <amodra@gmail.com>
306
307         * bfd-in.h (bfd_my_archive): Delete.
308         * bfd-in2.h: Regenerate.
309
310 2016-06-14  Alan Modra  <amodra@gmail.com>
311
312         PR ld/20241
313         * archive.c (open_nested_file): Set my_archive.
314         * bfd.c (_bfd_default_error_handler <%B>): Exclude archive file name
315         for thin archives.
316         * bfdio.c (bfd_tell): Don't adjust origin for thin archives.
317         (bfd_seek): Likewise.
318         * bfdwin.c (bfd_get_file_window): Likewise.
319         * cache.c (cache_bmmap): Likewise.
320         (bfd_cache_lookup_worker): Don't look in my_archive for thin archives.
321         * mach-o.c (bfd_mach_o_follow_dsym): Don't open my_archive for
322         thin archives.
323         * plugin.c (try_claim): Likewise.
324         * xcofflink.c (xcoff_link_add_dynamic_symbols): Use import path of
325         file within thin archive, not the archive.
326
327 2016-06-13  H.J. Lu  <hongjiu.lu@intel.com>
328
329         PR ld/20244
330         * elf32-i386.c (elf_i386_relocate_section): Add the .got.plt
331         section address for R_386_GOT32/R_386_GOT32X relocations against
332         IFUNC symbols if there is no base register and return error for
333         PIC.
334
335 2016-06-13  H.J. Lu  <hongjiu.lu@intel.com>
336
337         * elf32-i386.c (elf_i386_relocate_section): Simplify IFUNC
338         GOT32 adjustment for static executables.
339
340 2016-06-13  Maciej W. Rozycki  <macro@imgtec.com>
341
342         * elf32-mips.c (elf_mips_gnu_pcrel32): Update comment.
343
344 2016-06-13  Cupertino Miranda  <cmiranda@synospsy.com>
345
346         * elf32-arc.c (elf_arc_relocate_section): Fixed condition.
347
348 2016-06-13  Cupertino Miranda  <cmiranda@synospsy.com>
349
350         * elf32-arc.c (elf_arc_finish_dynamic_sections): Changed.
351
352 2016-06-13  Cupertino Miranda  <cmiranda@synospsy.com>
353
354         * elf32-arc.c (arc_local_data, arc_local_data): Removed.
355         (SECTSTART): Changed.
356         (elf_arc_relocate_section): Fixed mistake in PIE related
357         condition.
358         (elf_arc_size_dynamic_sections): Changed DT_RELENT to DT_RELAENT.
359
360 2016-06-13  Cupertino Miranda  <cmiranda@synospsy.com>
361
362         * elf32-arc.c (elf32_arc_reloc_type_class): Defined function to
363         enable support for "-z combreloc" and DT_RELACOUNT.
364         (elf_backend_reloc_type_class): Likewise
365
366 2016-06-11  H.J. Lu  <hongjiu.lu@intel.com>
367
368         PR ld/20244
369         * elf32-i386.c (elf_i386_relocate_section): When relocating
370         R_386_GOT32, return error without a base register for PIC and
371         subtract the .got.plt section address only with a base register.
372
373 2016-06-10  Alan Modra  <amodra@gmail.com>
374
375         * elf-strtab.c (struct strtab_save): Use size_t for "size".
376         (struct elf_strtab_hash): Likewise for "size" and "alloced".
377         (_bfd_elf_strtab_init): Formatting.
378         (_bfd_elf_strtab_add): Return size_t rather than bfd_size_type.
379         (_bfd_elf_strtab_addref): Take size_t idx param.
380         (_bfd_elf_strtab_delref, _bfd_elf_strtab_refcount): Likewise.
381         (_bfd_elf_strtab_offset): Likewise.
382         (_bfd_elf_strtab_clear_all_refs): Use size_t idx.
383         (_bfd_elf_strtab_save): Use size_t "idx" and "size" vars.
384         (_bfd_elf_strtab_restore, _bfd_elf_strtab_emit): Similarly.
385         (_bfd_elf_strtab_finalize): Similarly.
386         * elf-bfd.h (_bfd_elf_strtab_add): Update prototypes.
387         (_bfd_elf_strtab_addref, _bfd_elf_strtab_delref): Likewise.
388         (_bfd_elf_strtab_refcount, _bfd_elf_strtab_offset): Likewise.
389         * elf.c (bfd_elf_get_elf_syms): Calculate symbol buffer size
390         using bfd_size_type.
391         (bfd_section_from_shdr): Delete amt.
392         (_bfd_elf_init_reloc_shdr): Likewise.
393         (_bfd_elf_link_assign_sym_version): Likewise.
394         (assign_section_numbers): Use size_t reloc_count.
395         * elflink.c (struct elf_symbuf_head): Use size_t "count".
396         (bfd_elf_link_record_dynamic_symbol): Use size_t for some vars.
397         (elf_link_is_defined_archive_symbol): Likewise.
398         (elf_add_dt_needed_tag): Likewise.
399         (elf_finalize_dynstr): Likewise.
400         (elf_link_add_object_symbols): Likewise.
401         (bfd_elf_size_dynamic_sections): Likewise.
402         (elf_create_symbuf): Similarly.
403         (bfd_elf_match_symbols_in_sections): Likewise.
404         (elf_link_swap_symbols_out): Likewise.
405         (elf_link_check_versioned_symbol): Likewise.
406         (bfd_elf_gc_record_vtinherit): Likewise.
407         (bfd_elf_gc_common_finalize_got_offsets): Likewise.
408
409 2016-06-08  Senthil Kumar Selvaraj  <senthil_kumar.selvaraj@atmel.com>
410
411         PR ld/20221
412         * elf32-avr.c (elf32_avr_relax_delete_bytes): Adjust syms
413         and relocs only if shrinking occurred.
414
415 2016-06-08  H.J. Lu  <hongjiu.lu@intel.com>
416
417         * elf64-i386.c (elf_i386_link_hash_entry): Add tls_get_addr.
418         (elf_i386_link_hash_newfunc): Initialize tls_get_addr to 2.
419         (elf_i386_check_tls_transition): Check indirect call and direct
420         call with the addr32 prefix for general and local dynamic models.
421         Set the tls_get_addr feild.
422         (elf_i386_convert_load_reloc): Always use addr32 prefix for
423         indirect ___tls_get_addr call via GOT.
424         (elf_i386_relocate_section): Handle GD->LE, GD->IE and LD->LE
425         transitions with indirect call and direct call with the addr32
426         prefix.
427
428 2016-06-07  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
429
430         * elf32-s390.c (elf_s390_finish_dynamic_symbol): Fix comment.
431         * elf64-s390.c (elf_s390x_plt_entry): Fix comment.
432         (elf_s390_relocate_section): Fix comment.
433         (elf_s390_finish_dynamic_sections): Fix initialization of fixed
434         .got.plt entries.
435
436 2016-06-07  Ulrich Weigand  <ulrich.weigand@de.ibm.com>
437
438         * elf64-s390.c (elf_s390_finish_dynamic_sections): Subtract plt
439         section offset when calculation the larl operand in the first PLT
440         entry.
441
442 2016-06-07  Alan Modra  <amodra@gmail.com>
443
444         * cpu-powerpc.c (powerpc_compatible): Allow bfd_mach_ppc_vle entry
445         to match other 32-bit archs.
446         * elf32-ppc.c (_bfd_elf_ppc_set_arch): New function.
447         (ppc_elf_object_p): Call it.
448         (ppc_elf_special_sections): Use APUINFO_SECTION_NAME.  Fix
449         overlong line.
450         (APUINFO_SECTION_NAME, APUINFO_LABEL): Don't define here.
451         * elf64-ppc.c (ppc64_elf_object_p): Call _bfd_elf_ppc_set_arch.
452         * bfd-in.h (_bfd_elf_ppc_at_tls_transform,
453         _bfd_elf_ppc_at_tprel_transform): Move to..
454         * elf-bfd.h: ..here.
455         (_bfd_elf_ppc_set_arch): Declare.
456         * bfd-in2.h: Regenerate.
457
458 2016-06-06  H.J. Lu  <hongjiu.lu@intel.com>
459
460         * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add tls_get_addr.
461         (elf_x86_64_link_hash_newfunc): Initialize tls_get_addr to 2.
462         (elf_x86_64_check_tls_transition): Check indirect call and
463         direct call with the addr32 prefix for general and local dynamic
464         models.  Set the tls_get_addr feild.
465         (elf_x86_64_convert_load_reloc): Always use addr32 prefix for
466         indirect __tls_get_addr call via GOT.
467         (elf_x86_64_relocate_section): Handle GD->LE, GD->IE and LD->LE
468         transitions with indirect call and direct call with the addr32
469         prefix.
470
471 2016-06-04  Christian Groessler  <chris@groessler.org>
472
473         * coff-z8k.c (extra_case): Fix range check for R_JR relocation.
474
475 2016-06-02  Nick Clifton  <nickc@redhat.com>
476
477         PR target/20088
478         * cpu-arm.c (processors): Add "arm_any" type to match any ARM
479         architecture.
480         (arch_info_struct): Likewise.
481         (architectures): Likewise.
482
483 2016-06-02  Vineet Gupta  <Vineet.Gupta1@synopsys.com>
484
485         * config.bfd: Replace -uclibc with *.
486
487 2016-06-02  H.J. Lu  <hongjiu.lu@intel.com>
488
489         * elf64-x86-64.c: Replace data32 with data16 in comments.
490
491 2016-05-31  Alan Modra  <amodra@gmail.com>
492
493         PR ld/20159
494         PR ld/16467
495         * elflink.c (_bfd_elf_merge_symbol): Revert PR16467 change.
496         (_bfd_elf_add_default_symbol): Don't indirect to/from defined
497         symbol given a version by a script different to the version
498         of the symbol being added.
499         (elf_link_add_object_symbols): Use _bfd_elf_strtab_save and
500         _bfd_elf_strtab_restore.  Don't fudge dynstr references.
501         * elf-strtab.c (_bfd_elf_strtab_restore_size): Delete.
502         (struct strtab_save): New.
503         (_bfd_elf_strtab_save, _bfd_elf_strtab_restore): New functions.
504         * elf-bfd.h (_bfd_elf_strtab_restore_size): Delete.
505         (_bfd_elf_strtab_save, _bfd_elf_strtab_restore): Declare.
506
507 2016-06-01  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>
508
509         * elf32-hppa.h: Add extern "C".
510         * elf32-nds32.h: Likewise.
511         * elf32-tic6x.h: Likewise.
512
513 2016-06-01  Nick Clifton  <nickc@redhat.com>
514
515         * po/sr.po: New Serbian translation.
516         * configure.ac (ALL_LINGUAS): Add sr.
517         * configure: Regenerate.
518
519 2016-05-28  Maciej W. Rozycki  <macro@imgtec.com>
520
521         * elfxx-mips.c (b_reloc_p): New function.
522         (_bfd_mips_elf_relocate_section) <bfd_reloc_outofrange>: Handle
523         branch relocations.
524
525 2016-05-28  Maciej W. Rozycki  <macro@imgtec.com>
526
527         * elfxx-mips.c (mips_elf_calculate_relocation): <R_MIPS16_26>
528         <R_MIPS_26, R_MICROMIPS_26_S1>: Drop the region bits of the
529         reloc location from calculation, treat the addend as signed with
530         local non-section symbols and enable overflow detection.
531
532 2016-05-28  Alan Modra  <amodra@gmail.com>
533
534         * aoutx.h: Adjust linker callback calls throughout file,
535         removing dead code.
536         * bout.c: Likewise.
537         * coff-alpha.c: Likewise.
538         * coff-arm.c: Likewise.
539         * coff-h8300.c: Likewise.
540         * coff-h8500.c: Likewise.
541         * coff-i960.c: Likewise.
542         * coff-mcore.c: Likewise.
543         * coff-mips.c: Likewise.
544         * coff-ppc.c: Likewise.
545         * coff-rs6000.c: Likewise.
546         * coff-sh.c: Likewise.
547         * coff-tic80.c: Likewise.
548         * coff-w65.c: Likewise.
549         * coff-z80.c: Likewise.
550         * coff-z8k.c: Likewise.
551         * coff64-rs6000.c: Likewise.
552         * cofflink.c: Likewise.
553         * ecoff.c: Likewise.
554         * elf-bfd.h: Likewise.
555         * elf-m10200.c: Likewise.
556         * elf-m10300.c: Likewise.
557         * elf32-arc.c: Likewise.
558         * elf32-arm.c: Likewise.
559         * elf32-avr.c: Likewise.
560         * elf32-bfin.c: Likewise.
561         * elf32-cr16.c: Likewise.
562         * elf32-cr16c.c: Likewise.
563         * elf32-cris.c: Likewise.
564         * elf32-crx.c: Likewise.
565         * elf32-d10v.c: Likewise.
566         * elf32-epiphany.c: Likewise.
567         * elf32-fr30.c: Likewise.
568         * elf32-frv.c: Likewise.
569         * elf32-ft32.c: Likewise.
570         * elf32-h8300.c: Likewise.
571         * elf32-hppa.c: Likewise.
572         * elf32-i370.c: Likewise.
573         * elf32-i386.c: Likewise.
574         * elf32-i860.c: Likewise.
575         * elf32-ip2k.c: Likewise.
576         * elf32-iq2000.c: Likewise.
577         * elf32-lm32.c: Likewise.
578         * elf32-m32c.c: Likewise.
579         * elf32-m32r.c: Likewise.
580         * elf32-m68hc1x.c: Likewise.
581         * elf32-m68k.c: Likewise.
582         * elf32-mep.c: Likewise.
583         * elf32-metag.c: Likewise.
584         * elf32-microblaze.c: Likewise.
585         * elf32-moxie.c: Likewise.
586         * elf32-msp430.c: Likewise.
587         * elf32-mt.c: Likewise.
588         * elf32-nds32.c: Likewise.
589         * elf32-nios2.c: Likewise.
590         * elf32-or1k.c: Likewise.
591         * elf32-ppc.c: Likewise.
592         * elf32-s390.c: Likewise.
593         * elf32-score.c: Likewise.
594         * elf32-score7.c: Likewise.
595         * elf32-sh.c: Likewise.
596         * elf32-sh64.c: Likewise.
597         * elf32-spu.c: Likewise.
598         * elf32-tic6x.c: Likewise.
599         * elf32-tilepro.c: Likewise.
600         * elf32-v850.c: Likewise.
601         * elf32-vax.c: Likewise.
602         * elf32-visium.c: Likewise.
603         * elf32-xstormy16.c: Likewise.
604         * elf32-xtensa.c: Likewise.
605         * elf64-alpha.c: Likewise.
606         * elf64-hppa.c: Likewise.
607         * elf64-ia64-vms.c: Likewise.
608         * elf64-mmix.c: Likewise.
609         * elf64-ppc.c: Likewise.
610         * elf64-s390.c: Likewise.
611         * elf64-sh64.c: Likewise.
612         * elf64-x86-64.c: Likewise.
613         * elflink.c: Likewise.
614         * elfnn-aarch64.c: Likewise.
615         * elfnn-ia64.c: Likewise.
616         * elfxx-mips.c: Likewise.
617         * elfxx-sparc.c: Likewise.
618         * elfxx-tilegx.c: Likewise.
619         * linker.c: Likewise.
620         * pdp11.c: Likewise.
621         * pe-mips.c: Likewise.
622         * reloc.c: Likewise.
623         * reloc16.c: Likewise.
624         * simple.c: Likewise.
625         * vms-alpha.c: Likewise.
626         * xcofflink.c: Likewise.
627         * elf32-rl78.c (get_symbol_value, get_romstart, get_ramstart): Delete
628         status param.  Adjust calls to these and linker callbacks throughout.
629         * elf32-rx.c: (get_symbol_value, get_gp, get_romstart,
630         get_ramstart): Delete status param.  Adjust calls to these and
631         linker callbacks throughout.
632
633 2016-05-27  Maciej W. Rozycki  <macro@imgtec.com>
634
635         * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS16_26>
636         <R_MIPS_26, R_MICROMIPS_26_S1>: Include the addend in JALX's
637         target alignment verification.
638
639 2016-05-27  Maciej W. Rozycki  <macro@imgtec.com>
640
641         * elfxx-mips.c (mips_elf_calculate_relocation): Also use the
642         section name if `bfd_elf_string_from_elf_section' returns an
643         empty string.
644
645 2016-05-26  Maciej W. Rozycki  <macro@imgtec.com>
646
647         * elfxx-mips.c (_bfd_mips_elf_relocate_section)
648         <bfd_reloc_outofrange>: Use the `%X%H' rather than `%C' format
649         for message.  Continue processing rather than returning failure.
650
651 2016-05-25  Maciej W. Rozycki  <macro@imgtec.com>
652
653         * elfxx-mips.c (_bfd_mips_elf_relocate_section)
654         <bfd_reloc_outofrange>: Call `->einfo' rather than `->warning'.
655         Call `bfd_set_error'.
656
657 2016-05-25  H.J. Lu  <hongjiu.lu@intel.com>
658
659         PR binutils/14625
660         * archive.c (bfd_slurp_armap): Replace
661         bfd_elf64_archive_slurp_armap with
662         _bfd_archive_64_bit_slurp_armap.
663         (bsd_write_armap): Call _bfd_archive_64_bit_write_armap if
664         BFD64 is defined and the archive is too big.
665         (coff_write_armap): Likewise.
666         * archive64.c (bfd_elf64_archive_slurp_armap): Renamed to ...
667         (_bfd_archive_64_bit_slurp_armap): This.
668         (bfd_elf64_archive_write_armap): Renamed to ...
669         (_bfd_archive_64_bit_write_armap): This.
670         * configure.ac: Add --enable-64-bit-archive.
671         (want_64_bit_archive): New.  Set to true by default for 64-bit
672         MIPS and s390 ELF targets.
673         (USE_64_BIT_ARCHIVE): New AC_DEFINE.
674         * config.in: Regenerated.
675         * configure: Likewise.
676         * elf64-mips.c (bfd_elf64_archive_functions): Removed.
677         (bfd_elf64_archive_slurp_armap): Likewise.
678         (bfd_elf64_archive_write_armap): Likewise.
679         (bfd_elf64_archive_slurp_extended_name_table): Likewise.
680         (bfd_elf64_archive_construct_extended_name_table): Likewise.
681         (bfd_elf64_archive_truncate_arname): Likewise.
682         (bfd_elf64_archive_read_ar_hdr): Likewise.
683         (bfd_elf64_archive_write_ar_hdr): Likewise.
684         (bfd_elf64_archive_openr_next_archived_file): Likewise.
685         (bfd_elf64_archive_get_elt_at_index): Likewise.
686         (bfd_elf64_archive_generic_stat_arch_elt): Likewise.
687         (bfd_elf64_archive_update_armap_timestamp): Likewise.
688         * elf64-s390.c (bfd_elf64_archive_functions): Removed.
689         (bfd_elf64_archive_slurp_armap): Likewise.
690         (bfd_elf64_archive_write_armap): Likewise.
691         (bfd_elf64_archive_slurp_extended_name_table): Likewise.
692         (bfd_elf64_archive_construct_extended_name_table): Likewise.
693         (bfd_elf64_archive_truncate_arname): Likewise.
694         (bfd_elf64_archive_read_ar_hdr): Likewise.
695         (bfd_elf64_archive_write_ar_hdr): Likewise.
696         (bfd_elf64_archive_openr_next_archived_file): Likewise.
697         (bfd_elf64_archive_get_elt_at_index): Likewise.
698         (bfd_elf64_archive_generic_stat_arch_elt): Likewise.
699         (bfd_elf64_archive_update_armap_timestamp): Likewise.
700         * elfxx-target.h (TARGET_BIG_SYM): Use _bfd_archive_64_bit on
701         BFD_JUMP_TABLE_ARCHIVE if USE_64_BIT_ARCHIVE is defined and
702         bfd_elfNN_archive_functions isn't defined.
703         (TARGET_LITTLE_SYM): Likewise.
704         * libbfd-in.h (_bfd_archive_64_bit_slurp_armap): New prototype.
705         (_bfd_archive_64_bit_write_armap): Likewise.
706         (_bfd_archive_64_bit_slurp_extended_name_table): New macro.
707         (_bfd_archive_64_bit_construct_extended_name_table): Likewise.
708         (_bfd_archive_64_bit_truncate_arname): Likewise.
709         (_bfd_archive_64_bit_read_ar_hdr): Likewise.
710         (_bfd_archive_64_bit_write_ar_hdr): Likewise.
711         (_bfd_archive_64_bit_openr_next_archived_file): Likewise.
712         (_bfd_archive_64_bit_get_elt_at_index): Likewise.
713         (_bfd_archive_64_bit_generic_stat_arch_elt): Likewise.
714         (_bfd_archive_64_bit_update_armap_timestamp): Likewise.
715         * libbfd.h: Regenerated.
716         * plugin.c (plugin_vec): Use _bfd_archive_64_bit on
717         BFD_JUMP_TABLE_ARCHIVE if USE_64_BIT_ARCHIVE is defined.
718
719 2016-05-25  H.J. Lu  <hongjiu.lu@intel.com>
720
721         PR ld/20103
722         * cofflink.c (coff_link_check_archive_element): Return TRUE if
723         linker add_archive_element callback returns FALSE.
724         * ecoff.c (ecoff_link_check_archive_element): Likewise.
725         * elf64-ia64-vms.c (elf64_vms_link_add_archive_symbols): Skip
726         archive element if linker add_archive_element callback returns
727         FALSE.
728         * elflink.c (elf_link_add_archive_symbols): Likewise.
729         * pdp11.c (aout_link_check_ar_symbols): Likewise.
730         * vms-alpha.c (alpha_vms_link_add_archive_symbols): Likewise.
731         * xcofflink.c (xcoff_link_check_dynamic_ar_symbols): Likewise.
732         (xcoff_link_check_ar_symbols): Likewise.
733
734 2016-05-24  Maciej W. Rozycki  <macro@imgtec.com>
735
736         * elfxx-mips.c (_bfd_mips_elf_relocate_section)
737         <bfd_reloc_outofrange>: Unify error reporting code.
738
739 2016-05-23  Jim Wilson  <jim.wilson@linaro.org>
740
741         * elfnn-aarch64.c: Unconditionally enable R_AARCH64_NULL and
742         R_AARCH64_NONE.  Use HOWTO64 for R_AARCH64_NULL.
743         * relocs.c: Add BFD_RELOC_AARCH64_NULL.
744         * bfd-in2.h: Regenerate.
745         * libbfd.h: Likewise.
746
747 2016-05-23  Kuba Sejdak  <jakub.sejdak@phoesys.com>
748
749         * config.bfd: Add entry for arm-phoenix.
750
751 2016-05-23  Thomas Preud'homme  <thomas.preudhomme@arm.com>
752
753         * elf32-arm.c (arm_dedicated_stub_section_padding): New function.
754         (elf32_arm_size_stubs): Declare stub_type in a more outer scope and
755         account for padding for stub section requiring one.
756         (elf32_arm_build_stubs): Add comment to stress the importance of
757         zeroing veneer section content.
758
759 2016-05-23  Thomas Preud'homme  <thomas.preudhomme@arm.com>
760
761         * bfd-in.h (bfd_elf32_arm_keep_private_stub_output_sections): Declare
762         bfd hook.
763         * bfd-in2.h: Regenerate.
764         * elf32-arm.c (arm_dedicated_stub_output_section_required): New
765         function.
766         (arm_dedicated_stub_output_section_required_alignment): Likewise.
767         (arm_dedicated_stub_output_section_name): Likewise.
768         (arm_dedicated_stub_input_section_ptr): Likewise.
769         (elf32_arm_create_or_find_stub_sec): Add stub type parameter and
770         function description comment. Add support for dedicated output stub
771         section to given stub types.
772         (elf32_arm_add_stub): Add a stub type parameter and pass it down to
773         elf32_arm_create_or_find_stub_sec.
774         (elf32_arm_create_stub): Pass stub type down to elf32_arm_add_stub.
775         (elf32_arm_size_stubs): Pass stub type when calling
776         elf32_arm_create_or_find_stub_sec for Cortex-A8 erratum veneers.
777         (bfd_elf32_arm_keep_private_stub_output_sections): New function.
778
779 2016-05-20  H.J. Lu  <hongjiu.lu@intel.com>
780
781         * elf32-i386.c (elf_i386_check_relocs): Don't check R_386_GOT32
782         when setting need_convert_load.
783
784 2016-05-20  Maciej W. Rozycki  <macro@imgtec.com>
785
786         * elfxx-mips.c (mips_elf_read_rel_addend): Adjust the addend for
787         microMIPS JALX.
788
789 2016-05-19  H.J. Lu  <hongjiu.lu@intel.com>
790
791         PR ld/20117
792         * elf32-i386.c (elf_i386_convert_load_reloc): Don't check
793         R_386_GOT32X.
794         (elf_i386_convert_load): Don't convert R_386_GOT32.
795
796 2016-05-20  Alan Modra  <amodra@gmail.com>
797
798         PR gas/20118
799         * elf.c (elf_fake_sections): Set sh_entsize for SHT_INIT_ARRAY,
800         SHT_FINI_ARRAY, and SHT_PREINIT_ARRAY.
801
802 2016-05-19  Cupertino Miranda  <cmiranda@synopsys.com>
803
804         * elf32-arc.c (arc_elf_final_write_processing): Changed.
805         (debug_arc_reloc): Likewise.
806         (elf_arc_relocate_section): Likewise.
807         (elf_arc_check_relocs): Likewise.
808         (elf_arc_adjust_dynamic_symbol): Likewise.
809         (elf_arc_add_symbol_hook): Likewise.
810
811 2016-05-19  Maciej W. Rozycki  <macro@imgtec.com>
812
813         * config.bfd: Remove `am34-*-linux*' support.
814
815 2016-05-19  Alan Modra  <amodra@gmail.com>
816
817         * elf64-ppc.c (allocate_dynrelocs): Allocate got and other dynamic
818         relocs before plt relocs.
819
820 2016-05-19  Alan Modra  <amodra@gmail.com>
821
822         * elf64-ppc.c (ppc64_elf_branch_reloc): Check for NULL owner
823         before dereferencing.
824
825 2016-05-18  Nick Clifton  <nickc@redhat.com>
826
827         * po/sv.po: Updated Swedish translation.
828
829 2016-05-18  Alan Modra  <amodra@gmail.com>
830
831         * elf32-arm.c (elf32_arm_size_stubs): Free or cache local syms
832         for each BFD.  Don't goto error_ret_free_local from outside loop.
833
834 2016-05-17  Maciej W. Rozycki  <macro@imgtec.com>
835
836         * elf-s390-common.c (elf_s390_add_symbol_hook): Remove
837         STB_GNU_UNIQUE handling.
838         * elf32-arc.c (elf_arc_add_symbol_hook): Likewise.
839         * elf32-arm.c (elf32_arm_add_symbol_hook): Likewise.
840         * elf32-m68k.c (elf_m68k_add_symbol_hook): Likewise.
841         * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
842         * elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise.
843         * elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise.
844         * elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise.
845         * elf64-x86-64.c (elf_x86_64_add_symbol_hook): Likewise.
846         * elfxx-aarch64.c (_bfd_aarch64_elf_add_symbol_hook): Likewise.
847         * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Likewise.
848         * elf32-i386.c (elf_i386_add_symbol_hook): Remove function.
849         (elf_backend_add_symbol_hook): Remove macro.
850         * elflink.c (elf_link_add_object_symbols): Set `has_gnu_symbols'
851         for STB_GNU_UNIQUE symbols.
852
853 2016-05-16  Maciej W. Rozycki  <macro@imgtec.com>
854
855         * elf32-v850.c (v850_elf_copy_notes): New function, factored out
856         from...
857         (v850_elf_copy_private_bfd_data): ... here.  Call the new
858         function and `_bfd_elf_copy_private_bfd_data'.
859
860 2016-05-13  H.J. Lu  <hongjiu.lu@intel.com>
861
862         PR ld/20093
863         * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Don't convert
864         GOTPCREL relocation against large section.
865
866 2016-05-13  Alan Modra  <amodra@gmail.com>
867
868         * elf-m10300.c (_bfd_mn10300_elf_finish_dynamic_sections): Use
869         linker dynamic sections in calculating size and address of
870         dynamic tags rather than using output sections.  Remove asserts.
871         * elf32-arm.c (elf32_arm_finish_dynamic_sections): Likewise.
872         * elf32-cr16.c (_bfd_cr16_elf_finish_dynamic_sections): Likewise.
873         * elf32-cris.c (elf_cris_finish_dynamic_sections): Likewise.
874         * elf32-i370.c (i370_elf_finish_dynamic_sections): Likewise.
875         * elf32-lm32.c (lm32_elf_finish_dynamic_sections): Likewise.
876         * elf32-m32r.c (m32r_elf_finish_dynamic_sections): Likewise.
877         * elf32-m68k.c (elf_m68k_finish_dynamic_sections): Likewise.
878         * elf32-metag.c (elf_metag_finish_dynamic_sections): Likewise.
879         * elf32-microblaze.c (microblaze_elf_finish_dynamic_sections): Likewise.
880         * elf32-nds32.c (nds32_elf_finish_dynamic_sections): Likewise.
881         * elf32-nios2.c (nios2_elf32_finish_dynamic_sections): Likewise.
882         * elf32-or1k.c (or1k_elf_finish_dynamic_sections): Likewise.
883         * elf32-s390.c (elf_s390_finish_dynamic_sections): Likewise.
884         * elf32-score.c (s3_bfd_score_elf_finish_dynamic_sections): Likewise.
885         * elf32-score7.c (s7_bfd_score_elf_finish_dynamic_sections): Likewise.
886         * elf32-vax.c (elf_vax_finish_dynamic_sections): Likewise.
887         * elf32-xtensa.c (elf_xtensa_finish_dynamic_sections): Likewise.
888         * elf64-alpha.c (elf64_alpha_finish_dynamic_sections): Likewise.
889         * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
890         * elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Likewise.
891         * elflink.c (bfd_elf_final_link): Likewise.
892         * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections): Likewise.
893         * elfxx-sparc.c (sparc_finish_dyn): Likewise.  Adjust error message.
894         * elf32-arc.c (GET_SYMBOL_OR_SECTION): Remove ASSERT arg and
895         don't set doit.  Look up dynobj section.
896         (elf_arc_finish_dynamic_sections): Adjust GET_SYMBOL_OR_SECTION
897         invocation and dynamic tag vma calculation.  Don't test
898         boolean var == TRUE.
899         * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_sections): Fix
900         DT_JMPREL calc.
901
902 2016-05-13  Alan Modra  <amodra@gmail.com>
903
904         * elflink.c (elf_link_sort_relocs): Wrap overlong lines.  Fix
905         octets_per_byte.  Put dynamic .rela.plt last in link orders.
906         Assign output_offset for reloc sections rather than writing
907         sorted relocs from block corresponding to output_offset.
908
909 2016-05-12  Alan Modra  <amodra@gmail.com>
910
911         * elf-bfd.h (elf_reloc_type_class): Put reloc_class_plt last.
912
913 2016-05-11  Andrew Bennett  <andrew.bennett@imgtec.com>
914
915         * elfxx-mips.c (print_mips_ases): Add DSPR3.
916
917 2016-05-11  Alan Modra  <amodra@gmail.com>
918
919         * elf32-hppa.c (elf32_hppa_init_stub_bfd): New function.
920         (elf32_hppa_check_relocs): Don't set dynobj.
921         (elf32_hppa_size_stubs): Test !SEC_LINKER_CREATED for stub sections.
922         (elf32_hppa_build_stubs): Likewise.
923         * elf32-hppa.h (elf32_hppa_init_stub_bfd): Declare.
924
925 2016-05-11  Alan Modra  <amodra@gmail.com>
926
927         PR 20060
928         * elf64-ppc.c (ppc64_elf_tls_setup): Clear forced_local.
929         * elf32-ppc.c (ppc_elf_tls_setup): Likewise.
930
931 2016-05-10  Jiong Wang  <jiong.wang@arm.com>
932
933         * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Remove redundant
934         aarch64_tls_transition check.
935
936 2016-05-10  Thomas Preud'homme  <thomas.preudhomme@arm.com>
937
938         * elf32-arm.c (enum elf32_arm_stub_type): New max_stub_type
939         enumerator.
940         (arm_stub_sym_claimed): New function.
941         (elf32_arm_create_stub): Use veneered symbol name and section if
942         veneer needs to claim its symbol, and keep logic unchanged otherwise.
943         (arm_stub_claim_sym): New function.
944         (arm_map_one_stub): Call arm_stub_claim_sym if veneer needs to claim
945         veneered symbol, otherwise create local symbol as before.
946
947 2016-05-10  Thomas Preud'homme  <thomas.preudhomme@arm.com>
948
949         * elf32-arm.c (elf32_arm_size_stubs): Use new macros
950         ARM_GET_SYM_BRANCH_TYPE and ARM_SET_SYM_BRANCH_TYPE to respectively get
951         and set branch type of a symbol.
952         (bfd_elf32_arm_process_before_allocation): Likewise.
953         (elf32_arm_relocate_section): Likewise and fix identation along the
954         way.
955         (allocate_dynrelocs_for_symbol): Likewise.
956         (elf32_arm_finish_dynamic_symbol): Likewise.
957         (elf32_arm_swap_symbol_in): Likewise.
958         (elf32_arm_swap_symbol_out): Likewise.
959
960 2016-05-10  Thomas Preud'homme  <thomas.preudhomme@arm.com>
961
962         * bfd-in.h (elf32_arm_size_stubs): Add an output section parameter.
963         * bfd-in2.h: Regenerated.
964         * elf32-arm.c (struct elf32_arm_link_hash_table): Add an output section
965         parameter to add_stub_section callback.
966         (elf32_arm_create_or_find_stub_sec): Get output section from link_sec
967         and pass it down to add_stub_section.
968         (elf32_arm_add_stub): Set section to stub_sec if NULL before using it
969         for error message.
970         (elf32_arm_size_stubs): Add output section parameter to
971         add_stub_section function pointer parameter.
972
973 2016-05-10  Thomas Preud'homme  <thomas.preudhomme@arm.com>
974
975         * elf32-arm.c (elf32_arm_create_stub): New function.
976         (elf32_arm_size_stubs): Use elf32_arm_create_stub for stub creation.
977
978 2016-05-10  Thomas Preud'homme  <thomas.preudhomme@arm.com>
979
980         * elf32-arm.c (enum elf32_arm_stub_type): Delete
981         arm_stub_a8_veneer_lwm enumerator.
982         (arm_stub_a8_veneer_lwm): New unsigned constant to replace
983         aforementioned enumerator.
984         (struct elf32_arm_stub_hash_entry): Delete target_addend
985         field and add source_value.
986         (struct a8_erratum_fix): Delete addend field and add target_offset.
987         (stub_hash_newfunc): Initialize source_value field amd remove
988         initialization for target_addend.
989         (arm_build_one_stub): Stop special casing Thumb relocations: promote
990         the else to being always executed, moving the
991         arm_stub_a8_veneer_b_cond specific code in it.  Remove
992         stub_entry->target_addend from points_to computation.
993         (cortex_a8_erratum_scan): Store in a8_erratum_fix structure the offset
994         to target symbol from start of section rather than the offset from the
995         stub address.
996         (elf32_arm_size_stubs): Set stub_entry's source_value and target_value
997         fields from struct a8_erratum_fix's offset and target_offset
998         respectively.
999         (make_branch_to_a8_stub): Rename target variable to loc.  Compute
1000         veneered_insn_loc and loc using stub_entry's source_value.
1001
1002 2016-05-10  Thomas Preud'homme  <thomas.preudhomme@arm.com>
1003
1004         (elf32_arm_merge_eabi_attributes): Add merging logic for
1005         Tag_DSP_extension.
1006
1007 2016-05-10  Pip Cet  <pipcet@gmail.com>
1008
1009         PR ld/20059
1010         * elfxx-target.h (bfd_elfNN_bfd_copy_link_hash_symbol_type):
1011         Define as _bfd_generic_copy_link_hash_symbol_type when using
1012         generic hash table.
1013
1014 2016-05-09  Nick Clifton  <nickc@redhat.com>
1015
1016         PR binutils/20063
1017         * elf.c (bfd_elf_get_elf_syms): Check for out of range sh_link
1018         field before accessing sections array.
1019
1020 2016-05-09  Christophe Monat  <christophe.monat@st.com>
1021
1022         PR ld/20030
1023         * elf32-arm.c (is_thumb2_vldm): Account for T1 (DP) encoding.
1024         (stm32l4xx_need_create_replacing_stub): Rename ambiguous nb_regs
1025         to nb_words.
1026         (create_instruction_vldmia): Add is_dp to disambiguate SP/DP
1027         encoding.
1028         (create_instruction_vldmdb): Likewise.
1029         (stm32l4xx_create_replacing_stub_vldm): is_dp detects DP encoding,
1030         uses it to re-encode.
1031
1032 2016-05-09  Nick Clifton  <nickc@redhat.com>
1033
1034         PR 19938
1035         * elf32-arm.c (elf32_arm_adjust_dynamic_symbol): Revert accidental
1036         commit.
1037
1038 2016-05-09  Alan Modra  <amodra@gmail.com>
1039
1040         * elf64-ppc.c (ppc64_elf_init_stub_bfd): Remove redundant NULL check.
1041
1042 2016-05-06  H.J. Lu  <hongjiu.lu@intel.com>
1043
1044         PR ld/17550
1045         * elf-bfd.h (elf_link_hash_entry): Update comments for indx,
1046         documenting that indx == -3 if symbol is defined in a discarded
1047         section.
1048         * elflink.c (elf_link_add_object_symbols): Set indx to -3 if
1049         symbol is defined in a discarded section.
1050         (elf_link_output_extsym): Strip a global symbol defined in a
1051         discarded section.
1052
1053 2016-05-06  H.J. Lu  <hongjiu.lu@intel.com>
1054
1055         * elf32-i386.c (elf_backend_add_symbol_hook): Defined for Intel
1056         MCU.
1057
1058 2016-05-05  H.J. Lu  <hongjiu.lu@intel.com>
1059
1060         * elf32-i386.c (elf_i386_convert_load): Extract the GOT load
1061         conversion to ...
1062         (elf_i386_convert_load_reloc): This.  New function.
1063         * elf64-x86-64.c (elf_x86_64_convert_load): Extract the GOT load
1064         conversion to ...
1065         (elf_x86_64_convert_load_reloc): This.  New function.
1066
1067 2016-05-05  H.J. Lu  <hongjiu.lu@intel.com>
1068
1069         * elf32-i386.c (elf_i386_check_tls_transition): Remove abfd.
1070         Don't check if contents == NULL.
1071         (elf_i386_tls_transition): Add from_relocate_section.  Check
1072         from_relocate_section instead of contents != NULL.  Update
1073         elf_i386_check_tls_transition call.
1074         (elf_i386_check_relocs): Cache the section contents if
1075         keep_memory is FALSE.  Pass FALSE as from_relocate_section to
1076         elf_i386_tls_transition.
1077         (elf_i386_relocate_section): Pass TRUE as from_relocate_section
1078         to elf_i386_tls_transition.
1079         (elf_backend_caches_rawsize): New.
1080         * elf64-x86-64.c (elf_x86_64_check_tls_transition): Don't check
1081         if contents == NULL.
1082         (elf_x86_64_tls_transition): Add from_relocate_section.  Check
1083         from_relocate_section instead of contents != NULL.
1084         (elf_x86_64_check_relocs): Cache the section contents if
1085         keep_memory is FALSE.  Pass FALSE as from_relocate_section to
1086         elf_x86_64_tls_transition.
1087         (elf_x86_64_relocate_section): Pass TRUE as from_relocate_section
1088         to elf_x86_64_tls_transition.
1089         (elf_backend_caches_rawsize): New.
1090
1091 2016-05-03  Maciej W. Rozycki  <macro@imgtec.com>
1092
1093         PR 10549
1094         * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Handle
1095         STB_GNU_UNIQUE.
1096
1097 2016-05-03  Jiong Wang  <jiong.wang@arm.com>
1098
1099         * bfd-in.h (bfd_elf64_aarch64_set_options): Update prototype.
1100         * bfd-in2.h (bfd_elf64_aarch64_set_options): Likewise.
1101         * elfnn-aarch64.c (bfd_elfNN_aarch64_set_options): Initialize
1102         no_apply_dynamic_relocs.
1103         (elfNN_aarch64_final_link_relocate): Apply absolute relocations even though
1104         dynamic relocations generated.
1105
1106 2016-04-29  H.J. Lu  <hongjiu.lu@intel.com>
1107
1108         * elf32-i386.c (elf_i386_size_dynamic_sections): Move interp
1109         setting to ...
1110         (elf_i386_create_dynamic_sections): Here.
1111         * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Move
1112         interp setting to ...
1113         (elf_x86_64_create_dynamic_sections): Here.
1114
1115 2016-04-29  H.J. Lu  <hongjiu.lu@intel.com>
1116
1117         * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Take GOT_RELOC
1118         and replace (EH)->has_got_reloc with GOT_RELOC.
1119         (elf_i386_fixup_symbol): Pass has_got_reloc to
1120         UNDEFINED_WEAK_RESOLVED_TO_ZERO.
1121         (elf_i386_allocate_dynrelocs): Likewise.
1122         (elf_i386_relocate_section): Likewise.
1123         (elf_i386_finish_dynamic_symbol): Likewise.
1124         (elf_i386_convert_load): Pass TRUE to
1125         UNDEFINED_WEAK_RESOLVED_TO_ZERO.
1126         * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Take
1127         GOT_RELOC and replace (EH)->has_got_reloc with GOT_RELOC.
1128         (elf_x86_64_fixup_symbol): Pass has_got_reloc to
1129         UNDEFINED_WEAK_RESOLVED_TO_ZERO.
1130         (elf_x86_64_allocate_dynrelocs): Likewise.
1131         (elf_x86_64_relocate_section): Likewise.
1132         (elf_x86_64_finish_dynamic_symbol): Likewise.
1133         (elf_x86_64_convert_load): Pass TRUE to
1134         UNDEFINED_WEAK_RESOLVED_TO_ZERO.
1135
1136 2016-04-29  H.J. Lu  <hongjiu.lu@intel.com>
1137
1138         * elf32-i386.c (check_relocs_failed): New.
1139         (elf_i386_check_relocs): Set check_relocs_failed on error.
1140         (elf_i386_relocate_section): Skip if check_relocs failed.
1141
1142 2016-04-29  H.J. Lu  <hongjiu.lu@intel.com>
1143
1144         * elf64-x86-64.c (elf_x86_64_check_relocs): Set
1145         check_relocs_failed on error.
1146
1147 2016-04-29  Nick Clifton  <nickc@redhat.com>
1148
1149         PR 19938
1150         * elf-bfd.h (struct elf_backend_data): Rename
1151         elf_backend_set_special_section_info_and_link to
1152         elf_backend_copy_special_section_fields.
1153         * elfxx-target.h: Likewise.
1154         * elf.c (section_match): Ignore the SHF_INFO_LINK flag when
1155         comparing section flags.
1156         (copy_special_section_fields): New function.
1157         (_bfd_elf_copy_private_bfd_data): Copy the EI_ABIVERSION field.
1158         Perform two scans over special sections.  The first one looks for
1159         a direct mapping between the output section and an input section.
1160         The second scan looks for a possible match based upon section
1161         characteristics.
1162         * elf32-arm.c (elf32_arm_copy_special_section_fields): New
1163         function.  Handle setting the sh_link field of SHT_ARM_EXIDX
1164         sections.
1165         * elf32-i386.c (elf32_i386_set_special_info_link): Rename to
1166         elf32_i386_copy_solaris_special_section_fields.
1167         * elf32-sparc.c (elf32_sparc_set_special_section_info_link):
1168         Rename to elf32_sparc_copy_solaris_special_section_fields.
1169         * elf64-x86-64.c (elf64_x86_64_set_special_info_link): Rename to
1170         elf64_x86_64_copy_solaris_special_section_fields.
1171
1172 2016-04-28  Nick Clifton  <nickc@redhat.com>
1173
1174         * po/zh_CN.po: Updated Chinese (simplified) translation.
1175
1176 2016-04-27  H.J. Lu  <hongjiu.lu@intel.com>
1177
1178         PR ld/20006
1179         * elf64-x86-64.c (elf_x86_64_convert_load): Skip debug sections
1180         when estimating distances between output sections.
1181
1182 2016-04-27  Alan Modra  <amodra@gmail.com>
1183
1184         * elflink.c (_bfd_elf_is_start_stop): New function.
1185         (_bfd_elf_gc_mark_rsec): Use it.
1186         * elf-bfd.h (_bfd_elf_is_start_stop): Declare.
1187
1188 2016-04-26  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>
1189
1190         * elf32-rx.c (rx_set_section_contents): Avoid arithmetic on void *.
1191         * mmo.c (mmo_get_section_contents): Likewise.
1192         (mmo_set_section_contents): Likewise.
1193
1194 2016-04-26  H.J. Lu  <hongjiu.lu@intel.com>
1195
1196         * elf-bfd.h (elf_link_hash_table): Update comments for
1197         dynsymcount.
1198         * elflink.c (_bfd_elf_link_renumber_dynsyms): Always count for
1199         the unused NULL entry at the head of dynamic symbol table.
1200         (bfd_elf_size_dynsym_hash_dynstr): Remove dynsymcount != 0
1201         checks.
1202
1203 2016-04-21  H.J. Lu  <hongjiu.lu@intel.com>
1204
1205         * elflink.c (_bfd_elf_link_create_dynstrtab): Exclude linker
1206         created file from dynobj.
1207
1208 2016-04-21  H.J. Lu  <hongjiu.lu@intel.com>
1209
1210         * elflink.c (_bfd_elf_link_create_dynstrtab): Set dynobj to a
1211         normal input file if possible.
1212
1213 2016-04-21  Nick Clifton  <nickc@redhat.com>
1214
1215         * aout-adobe.c: Use _bfd_generic_link_check_relocs.
1216         * aout-target.h: Likewise.
1217         * aout-tic30.c: Likewise.
1218         * binary.c: Likewise.
1219         * bout.c: Likewise.
1220         * coff-alpha.c: Likewise.
1221         * coff-rs6000.c: Likewise.
1222         * coff64-rs6000.c: Likewise.
1223         * coffcode.h: Likewise.
1224         * i386msdos.c: Likewise.
1225         * i386os9k.c: Likewise.
1226         * ieee.c: Likewise.
1227         * ihex.c: Likewise.
1228         * libbfd-in.h: Likewise.
1229         * libecoff.h: Likewise.
1230         * mach-o-target.c: Likewise.
1231         * mmo.c: Likewise.
1232         * nlm-target.h: Likewise.
1233         * oasys.c: Likewise.
1234         * pef.c: Likewise.
1235         * plugin.c: Likewise.
1236         * ppcboot.c: Likewise.
1237         * som.c: Likewise.
1238         * srec.c: Likewise.
1239         * tekhex.c: Likewise.
1240         * versados.c: Likewise.
1241         * vms-alpha.c: Likewise.
1242         * xsym.c: Likewise.
1243         * elfxx-target.h: Use _bfd_elf_link_check_relocs.
1244         * linker.c (bfd_link_check_relocs): New function.
1245         (_bfd_generic_link_check_relocs): New function.
1246         * targets.c (BFD_JUMP_TABLE_LINK): Add initialization of
1247         _bfd_link_check_relocs field.
1248         (struct bfd_target)L Add _bfd_link_check_relocs field.
1249         * bfd-in2.h: Regenerate.
1250         * libbfd.h: Regenerate.
1251
1252 2016-04-20  H.J. Lu  <hongjiu.lu@intel.com>
1253
1254         * elf32-i386.c (elf_i386_gc_sweep_hook): Removed.
1255         (elf_backend_gc_sweep_hook): Likewise.
1256         * elf64-x86-64.c (elf_x86_64_gc_sweep_hook): Likewise.
1257         (elf_backend_gc_sweep_hook): Likewise.
1258
1259 2016-04-20  H.J. Lu  <hongjiu.lu@intel.com>
1260
1261         * elflink.c (_bfd_elf_link_check_relocs): Don't check relocations
1262         in excluded sections
1263
1264 2016-04-20  H.J. Lu  <hongjiu.lu@intel.com>
1265
1266         PR ld/19969
1267         * elf64-x86-64.c (check_relocs_failed): New.
1268         (elf_x86_64_need_pic): Moved before elf_x86_64_check_relocs.
1269         Support relocation agaist local symbol.  Set check_relocs_failed.
1270         (elf_x86_64_check_relocs): Use elf_x86_64_need_pic.  Check
1271         R_X86_64_32 relocation overflow.
1272         (elf_x86_64_relocate_section): Skip if check_relocs failed.
1273         Update one elf_x86_64_need_pic and remove one elf_x86_64_need_pic.
1274
1275 2016-04-20  H.J. Lu  <hongjiu.lu@intel.com>
1276
1277         * elf32-i386.c (elf_i386_check_relocs): Call
1278         _bfd_elf_create_ifunc_sections only for STT_GNU_IFUNC symbol.
1279         * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1280
1281 2016-04-20  H.J. Lu  <hongjiu.lu@intel.com>
1282
1283         * elf-bfd.h (_bfd_elf_link_check_relocs): New.
1284         * elflink.c (_bfd_elf_link_check_relocs): New function.
1285         (elf_link_add_object_symbols): Call _bfd_elf_link_check_relocs
1286         if check_relocs_after_open_input is FALSE.
1287
1288 2016-04-20  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>
1289
1290         * cache.c: Update old style function definitions.
1291         * elf32-m68k.c: Likewise.
1292         * elf64-mmix.c: Likewise.
1293         * stab-syms.c: Likewise.
1294
1295 2016-04-20  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>
1296
1297         * elf32-arm.c (put_thumb2_insn): Change argument type to bfd_byte *.
1298
1299 2016-04-15  H.J. Lu  <hongjiu.lu@intel.com>
1300
1301         * Makefile.in: Regenerated with automake 1.11.6.
1302         * aclocal.m4: Likewise.
1303         * doc/Makefile.in: Likewise.
1304
1305 2016-04-14  Andrew Burgess  <andrew.burgess@embecosm.com>
1306
1307         * reloc.c: Add BFD_RELOC_ARC_NPS_CMEM16 entry.
1308         * bfd-in2.h: Regenerate.
1309         * libbfd.h: Regenerate.
1310         * elf32-arc.c: Add 'opcode/arc.h' include.
1311         (struct arc_relocation_data): Add symbol_name.
1312         (arc_special_overflow_checks): New function.
1313         (arc_do_relocation): Use arc_special_overflow_checks, reindent as
1314         required, add an extra comment.
1315         (elf_arc_relocate_section): Setup symbol_name in reloc_data.
1316
1317 2016-04-14  Andrew Burgess  <andrew.burgess@embecosm.com>
1318
1319         * elf32-arc.c (tls_got_entries): Add 'TLS_GOT_' prefix to all
1320         entries.
1321         (elf_arc_relocate_section): Update enum uses.
1322         (elf_arc_check_relocs): Likewise.
1323         (elf_arc_finish_dynamic_symbol): Likewise.
1324
1325 2016-04-14  H.J. Lu  <hongjiu.lu@intel.com>
1326
1327         * elf.c (_bfd_elf_copy_private_bfd_data): Replace "link" with
1328         "sh_link".
1329
1330 2016-04-14  Nick Clifton  <nickc@redhat.com>
1331
1332         PR target/19938
1333         * elf-bbfd.h (struct elf_backend_data): New field:
1334         elf_strtab_flags.
1335         New field: elf_backend_set_special_section_info_and_link
1336         * elfxx-target.h (elf_backend_strtab_flags): Define if not already
1337         defined.
1338         (elf_backend_set_special_section_info_and_link): Define if not
1339         already defined.
1340         (elfNN_bed): Use elf_backend_set_special_section_info_and_link and
1341         elf_backend_strtab_flags macros to initialise fields in structure.
1342         * elf.c (_bfd_elf_make_section_from_shdr): Check for SHF_STRINGS
1343         being set even if SHF_MERGE is not set.
1344         (elf_fake_sections): Likewise.
1345         (section_match): New function.  Matches two ELF sections based
1346         upon fixed characteristics.
1347         (find_link): New function.  Locates a section in a BFD that
1348         matches a section in a different BFD.
1349         (_bfd_elf_copy_private_bfd_data): Copy the sh_info and sh_link
1350         fields of reserved sections.
1351         (bfd_elf_compute_section_file_positions): Set the flags for the
1352         .shstrtab section based upon the elf_strtab_flags field in the
1353         elf_backend_data structure.
1354         (swap_out_syms): Likewise for the .strtab section.
1355         * elflink.c (bfd_elf_final_link): Set the flags for the
1356         .strtab section based upon the elf_strtab_flags field in the
1357         elf_backend_data structure.
1358         * elf32-i386.c (elf32_i386_set_special_info_link): New function.
1359         (elf_backend_strtab_flags): Set to SHF_STRINGS for Solaris
1360         targets.
1361         (elf_backend_set_special_section_info_and_link): Define for
1362         Solaris targets.
1363         * elf32-sparc.c: Likewise.
1364         * elf64-x86-64.c: Likewise.
1365
1366 2016-04-11  H.J. Lu  <hongjiu.lu@intel.com>
1367
1368         PR ld/19939
1369         * elf-bfd.h (_bfd_elf_allocate_ifunc_dyn_relocs): Add a pointer
1370         to bfd_boolean.
1371         * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Updated.
1372         Set *readonly_dynrelocs_against_ifunc_p to TRUE if dynamic reloc
1373         applies to read-only section.
1374         * elf32-i386.c (elf_i386_link_hash_table): Add
1375         readonly_dynrelocs_against_ifunc.
1376         (elf_i386_allocate_dynrelocs): Updated.
1377         (elf_i386_size_dynamic_sections): Issue an error for read-only
1378         segment with dynamic IFUNC relocations only if
1379         readonly_dynrelocs_against_ifunc is TRUE.
1380         * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
1381         readonly_dynrelocs_against_ifunc.
1382         (elf_x86_64_allocate_dynrelocs): Updated.
1383         (elf_x86_64_size_dynamic_sections): Issue an error for read-only
1384         segment with dynamic IFUNC relocations only if
1385         readonly_dynrelocs_against_ifunc is TRUE.
1386         * elfnn-aarch64.c (elfNN_aarch64_allocate_ifunc_dynrelocs):
1387         Updated.
1388
1389 2016-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
1390
1391         * elf32-arm.c (elf32_arm_size_stubs): Move error_ret_free_local to be
1392         a fall through from error_ret_free_internal.  Free local_syms in
1393         error_ret_free_local if allocated from bfd_elf_get_elf_syms ().
1394
1395 2016-04-05  Cupertino Miranda  <cmiranda@synopsys.com>
1396
1397         * elf32-arc.c (plt_do_relocs_for_symbol): Changed.
1398         (relocate_plt_for_entry): Likewise.
1399
1400 2016-04-05  Cupertino Miranda  <cmiranda@synopsys.com>
1401
1402         * elf32-arc.c (elf_arc_check_relocs): Changed
1403
1404 2016-04-05  Cupertino Miranda  <cmiranda@synopsys.com>
1405
1406         * elf32-arc.c (name_for_global_symbol): Changed assert.
1407         (get_replace_function): Created.:
1408         (struct arc_relocation_data): Changed to signed types.
1409         (defines S, L, P, PDATA): Casted to signed type.
1410         (defines SECTSTART, _SDA_BASE_, TLS_REL): Likewise.
1411         (PRINT_DEBUG_RELOC_INFO_BEFORE): Changed.
1412         (arc_do_relocation): Changed.
1413
1414 2016-04-05  Cupertino Miranda  <cmiranda@synopsys.com>
1415
1416         * elf32-arc.c (name_for_global_symbol): Added assert to check for
1417         symbol index.
1418         (elf_arc_relocate_section): Added and changed asserts, validating
1419         the synamic symbol index.
1420         (elf_arc_finish_dynamic_symbol): Do not fill the dynamic
1421         relocation if symbol has dynindx set to -1.
1422
1423 2016-04-05  Maciej W. Rozycki  <macro@imgtec.com>
1424
1425         * elflink.c (elf_link_add_object_symbols): Always turn hidden
1426         and internal symbols which have a dynamic index into local
1427         ones.
1428
1429 2016-04-04  Nick Clifton  <nickc@redhat.com>
1430
1431         PR 19872
1432         * dwarf2.c (parse_comp_unit): Skip warning about unrecognised
1433         version number if the version is zero.
1434
1435 2016-04-01  Alan Modra  <amodra@gmail.com>
1436
1437         PR 19886
1438         * elflink.c (on_needed_list): Recursively check needed status.
1439         (elf_link_add_object_symbols): Adjust.
1440
1441 2016-03-30  Senthil Kumar Selvaraj  <senthil_kumar.selvaraj@atmel.com>
1442
1443         * elf32-avr.c (avr_elf32_load_records_from_section): Free
1444         internal_relocs only if they aren't cached.
1445
1446 2016-03-29  Nick Clifton  <nickc@redhat.com>
1447
1448         PR 17334
1449         * elf32-bfin.c (elf32_bfinfdpic_finish_dynamic_sections): Relax
1450         assertion on the size of the got section to allow it to be bigger
1451         than the number of relocs.
1452
1453 2016-03-29  Toni Spets  <toni.spets@iki.fi>
1454
1455         PR 19878
1456         * coffcode.h (coff_write_object_contents): Revert accidental
1457         2014-11-10 change.
1458
1459 2016-03-22  Alan Modra  <amodra@gmail.com>
1460
1461         PR 19850
1462         * dwarf2.c (read_attribute_value): Skip info_ptr check for
1463         DW_FORM_flag_present.
1464
1465 2016-03-22  Nick Clifton  <nickc@redhat.com>
1466
1467         * cpu-v850_rh850.c (arch_info_struct): Restore v850-rh850 as an
1468         architecture name for backwards compatibility.
1469
1470         * peXXigen.c (_bfd_XXi_write_codeview_record): Fix possible
1471         unbounded stack use.
1472
1473         * warning.m4 (GCC_WARN_CFLAGS): Only add -Wstack-usage if using a
1474         sufficiently recent version of GCC.
1475         * configure: Regenerate.
1476
1477 2016-03-22  Alan Modra  <amodra@gmail.com>
1478
1479         PR 19851
1480         * plugin.c (try_load_plugin): Avoid -Wstack-usage warning.
1481
1482 2016-03-21  Andrew Burgess  <andrew.burgess@embecosm.com>
1483
1484         * archures.c (bfd_mach_arc_nps400): Define.
1485         * bfd-in2.h: Regenerate.
1486         * cpu-arc.c (arch_info_struct): New entry for nps400, renumber
1487         some existing entries to make space.
1488         * elf32-arc.c (arc_elf_object_p): Add nps400 case.
1489         (arc_elf_final_write_processing): Likewise.
1490
1491 2016-03-21  Andrew Burgess  <andrew.burgess@embecosm.com>
1492
1493         * elf32-arc.c (arc_elf_print_private_bfd_data): Remove use of
1494         EF_ARC_CPU_GENERIC.
1495         (arc_elf_final_write_processing): Don't bother setting cpu field
1496         in e_flags, this will have been set elsewhere.
1497
1498 2016-03-21  Andrew Burgess  <andrew.burgess@embecosm.com>
1499
1500         * elf32-arc.c (arc_elf_final_write_processing): Switch to using
1501         EF_ARC_MACH_MSK.
1502
1503 2016-03-21  Nick Clifton  <nickc@redhat.com>
1504
1505         * warning.m4 (GCC_WARN_CFLAGS): Add -Wstack-usage=262144
1506         * configure: Regenerate.
1507         * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Replace use of
1508         alloca with call to xmalloc.
1509         * elf32-nds32.c: Likewise.
1510         * elf64-hppa.c: Likewise.
1511         * elfxx-mips.c: Likewise.
1512         * pef.c: Likewise.
1513         * pei-x86_64.c: Likewise.
1514         * som.c: Likewise.
1515         * xsym.c: Likewise.
1516
1517 2016-03-15  H.J. Lu  <hongjiu.lu@intel.com>
1518
1519         PR ld/19827
1520         * elf32-i386.c (elf_i386_check_relocs): Bind defined symbol
1521         locally in PIE.
1522         (elf_i386_relocate_section): Likewise.
1523         * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1524         (elf_x86_64_relocate_section): Likewise.
1525
1526 2016-03-15  H.J. Lu  <hongjiu.lu@intel.com>
1527
1528         PR ld/19807
1529         * elf64-x86-64.c (elf_x86_64_relocate_section): Check
1530         no_reloc_overflow_check to diable R_X86_64_32/R_X86_64_32S
1531         relocation overflow check.
1532
1533 2016-03-14  H.J. Lu  <hongjiu.lu@intel.com>
1534
1535         * bfd-in2.h: Regenerated.
1536
1537 2016-03-11  Dan Gissel  <dgisselq@ieee.org>
1538
1539         PR 19713
1540         * elf.c (_bfd_elf_section_offset): Ensure that the returned offset
1541         uses bytes not octets.
1542         * elflink.c (resolve_section): Likewise.
1543         Add a bfd parameter.
1544         (eval_section): Pass the input_bfd to resolve_section.
1545         (bfd_elf_perform_complex_relocation): Convert byte offset to
1546         octets before read and writing values.
1547         (elf_link_input_bfd): Add byte to octet conversions.
1548         (elf_reloc_link_order): Likewise.
1549         (elf_fixup_link_order): Likewise.
1550         (bfd_elf_final_link): Likewise.
1551         * reloc.c (_bfd_final_link_relocate): Likewise.
1552         * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
1553
1554 2016-03-10  Nick Clifton  <nickc@redhat.com>
1555
1556         * config.bfd: Mark the i370 target as obsolete.
1557
1558 2016-03-09  Pedro Alves  <palves@redhat.com>
1559
1560         * cpu-v850.c (N): Append ":old-gcc-abi" instead of " (using old
1561         gcc ABI)" to printable name.
1562         * cpu-v850_rh850.c (bfd_v850_rh850_arch): Use "v850:rh850" instead
1563         of "v850-rh850" as printable name.
1564
1565 2016-03-09  Leon Winter  <winter-gcc@bfw-online.de>
1566
1567         PR ld/19623
1568         * cofflink.c (_bfd_coff_generic_relocate_section): Do not apply
1569         relocations against absolute symbols.
1570
1571 2016-03-09  Alan Modra  <amodra@gmail.com>
1572
1573         PR binutils/19775
1574         * coff-alpha.c (alpha_ecoff_openr_next_archived_file): Allow zero
1575         length elements in the archive.
1576
1577 2016-03-08  H.J. Lu  <hongjiu.lu@intel.com>
1578
1579         PR ld/19789
1580         * elflink.c (elf_link_add_object_symbols): Create dynamic sections
1581         for -E/--dynamic-list only when not relocatable.
1582
1583 2016-03-08  H.J. Lu  <hongjiu.lu@intel.com>
1584
1585         PR ld/19784
1586         * elf32-i386.c (elf_i386_check_relocs): Increment PLT reference
1587         count for locally defined local IFUNC symbols in shared object.
1588         * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1589
1590 2016-03-08  H.J. Lu  <hongjiu.lu@intel.com>
1591
1592         PR ld/19579
1593         * elflink.c (_bfd_elf_merge_symbol): Group common symbol checking
1594         together.
1595
1596 2016-03-08  Cupertino Miranda  <Cupertino.Miranda@synopsys.com>
1597             Andrew Burgess  <andrew.burgess@embecosm.com>
1598
1599         * elf32-arc.c (arc_bfd_get_32): Becomes an alias for bfd_get_32.
1600         (arc_bfd_put_32): Becomes an alias for bfd_put_32.
1601         (arc_elf_howto_init): Added assert to validate relocations.
1602         (get_middle_endian_relocation): Delete.
1603         (middle_endian_convert): New function.
1604         (ME): Redefine, now does nothing.
1605         (IS_ME): New define.
1606         (arc_do_relocation): Extend the attached 'ARC_RELOC_HOWTO'
1607         definition to call middle_endian_convert.  Add a new local
1608         variable and make use of this throughout. Added call to
1609         arc_bfd_get_8 and arc_bfd_put_8 for 8 bit relocations.
1610
1611 2016-03-07  Nick Clifton  <nickc@redhat.com>
1612
1613         PR binutils/19775
1614         * archive.c (bfd_generic_openr_next_archived_file): Allow zero
1615         length elements in the archive.
1616
1617 2016-03-07  Jiong Wang  <jiong.wang@arm.com>
1618
1619         * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Always create .got
1620         section if the symbol "_GLOBAL_OFFSET_TABLE_" is referenced.
1621
1622 2016-03-04  H.J. Lu  <hongjiu.lu@intel.com>
1623
1624         PR ld/19579
1625         * elflink.c (_bfd_elf_merge_symbol): Treat common symbol in
1626         executable as definition if the new definition comes from a
1627         shared library.
1628
1629 2016-03-02  Alan Modra  <amodra@gmail.com>
1630
1631         * Makefile.in: Regenerate.
1632         * po/SRC-POTFILES.in: Regenerate.
1633
1634 2016-02-29  Cupertino Miranda  <cmiranda@synopsys.com>
1635
1636         * elf32-arc.c (elf_arc_relocate_section): Added rules to fix the
1637         relocation addend when sections get merged.
1638
1639 2016-02-29  Cupertino Miranda <Cupertino.Miranda@synopsys.com>
1640
1641         * elf32-arc.c (arc_elf_final_write_processing): Add condition to
1642         the flag change.
1643         (elf_arc_relocate_section): Fixes and conditions to support PIE.
1644         Assert for code sections dynamic relocs.
1645
1646 2016-02-26  Renlin Li  <renlin.li@arm.com>
1647
1648         * elfnn-aarch64.c (elfNN_aarch64_howto_table): Fix signed overflow
1649         check for MOVW_SABS_G0, MOVW_SABS_G1, MOVW_SABS_G2.
1650
1651 2016-02-26  H.J. Lu  <hongjiu.lu@intel.com>
1652
1653         PR ld/19609
1654         * elf32-i386.c (elf_i386_convert_load): Convert to R_386_32 for
1655         load with locally bound symbols if PIC is false or there is no
1656         base register.  Optimize branch to 0 if PIC is false.
1657         (elf_i386_relocate_section): Don't generate dynamic relocations
1658         against undefined weak symbols if PIC is false.
1659         * elf64-x86-64.c (elf_x86_64_convert_load): Disable optimization
1660         if we can't estimate relocation overflow with --no-relax.
1661         Convert to R_X86_64_32S/R_X86_64_32 for load with locally bound
1662         symbols if PIC is false.  Optimize branch to 0 if PIC is false.
1663         (elf_x86_64_relocate_section): Don't generate dynamic relocations
1664         against undefined weak symbols if PIC is false.
1665
1666 2016-02-26  H.J. Lu  <hongjiu.lu@intel.com>
1667
1668         PR ld/19645
1669         * bfd.c (bfd): Change flags to 20 bits.
1670         (BFD_CONVERT_ELF_COMMON): New.
1671         (BFD_USE_ELF_STT_COMMON): Likewise.
1672         (BFD_FLAGS_SAVED): Add BFD_CONVERT_ELF_COMMON and
1673         BFD_USE_ELF_STT_COMMON.
1674         (BFD_FLAGS_FOR_BFD_USE_MASK): Likewise.
1675         * configure.ac: Remove --enable-elf-stt-common.
1676         * elf.c (swap_out_syms): Choose STT_COMMON or STT_OBJECT for
1677         common symbol depending on BFD_CONVERT_ELF_COMMON and
1678         BFD_USE_ELF_STT_COMMON.
1679         * elfcode.h (elf_slurp_symbol_table): Set BSF_ELF_COMMON for
1680         STT_COMMON.
1681         * elflink.c (bfd_elf_link_mark_dynamic_symbol): Also check
1682         STT_COMMON.
1683         (elf_link_convert_common_type): New function.
1684         (elf_link_output_extsym): Choose STT_COMMON or STT_OBJECT for
1685         common symbol depending on BFD_CONVERT_ELF_COMMON and
1686         BFD_USE_ELF_STT_COMMON.  Set sym.st_info after sym.st_shndx.
1687         * elfxx-target.h (TARGET_BIG_SYM): Add BFD_CONVERT_ELF_COMMON
1688         and BFD_USE_ELF_STT_COMMON to object_flags.
1689         (TARGET_LITTLE_SYM): Likewise.
1690         * syms.c (BSF_KEEP_G): Renamed to ...
1691         (BSF_ELF_COMMON): This.
1692         * bfd-in2.h: Regenerated.
1693         * config.in: Likewise.
1694         * configure: Likewise.
1695
1696 2016-02-26  H.J. Lu  <hongjiu.lu@intel.com>
1697
1698         PR ld/19636
1699         PR ld/19704
1700         PR ld/19719
1701         * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
1702         (elf_i386_link_hash_entry): Add has_got_reloc and
1703         has_non_got_reloc.
1704         (elf_i386_link_hash_table): Add interp.
1705         (elf_i386_link_hash_newfunc): Initialize has_got_reloc and
1706         has_non_got_reloc.
1707         (elf_i386_copy_indirect_symbol): Copy has_got_reloc and
1708         has_non_got_reloc.
1709         (elf_i386_check_relocs): Set has_got_reloc and has_non_got_reloc.
1710         (elf_i386_fixup_symbol): New function.
1711         (elf_i386_pie_finish_undefweak_symbol): Likewise.
1712         (elf_i386_allocate_dynrelocs): Don't allocate space for dynamic
1713         relocations and discard relocations against resolved undefined
1714         weak symbols in executable.  Don't make resolved undefined weak
1715         symbols in executable dynamic.  Keep dynamic non-GOT/non-PLT
1716         relocation against undefined weak symbols in PIE.
1717         (elf_i386_size_dynamic_sections): Set interp to .interp section.
1718         (elf_i386_relocate_section): Don't generate dynamic relocations
1719         against resolved undefined weak symbols in PIE, except for
1720         R_386_PC32.
1721         (elf_i386_finish_dynamic_symbol): Keep PLT/GOT entries without
1722         dynamic PLT/GOT relocations for resolved undefined weak symbols.
1723         Don't generate dynamic relocation against resolved undefined weak
1724         symbol in executable.
1725         (elf_i386_finish_dynamic_sections): Call
1726         elf_i386_pie_finish_undefweak_symbol on all symbols in PIE.
1727         (elf_backend_fixup_symbol): New.
1728         * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
1729         (elf_x86_64_link_hash_entry): Add has_got_reloc and
1730         has_non_got_reloc.
1731         (elf_x86_64_link_hash_table): Add interp.
1732         (elf_x86_64_link_hash_newfunc): Initialize has_got_reloc and
1733         has_non_got_reloc.
1734         (elf_x86_64_copy_indirect_symbol): Copy has_got_reloc and
1735         has_non_got_reloc.
1736         (elf_x86_64_check_relocs): Set has_got_reloc and
1737         has_non_got_reloc.
1738         (elf_x86_64_fixup_symbol): New function.
1739         (elf_x86_64_pie_finish_undefweak_symbol): Likewise.
1740         (elf_x86_64_allocate_dynrelocs): Don't allocate space for dynamic
1741         relocations and discard relocations against resolved undefined
1742         weak symbols in executable.  Don't make resolved undefined weak
1743         symbols in executable dynamic.
1744         (elf_x86_64_size_dynamic_sections): Set interp to .interp section.
1745         (elf_x86_64_relocate_section): Check relocation overflow for
1746         dynamic relocations against unresolved weak undefined symbols.
1747         Don't generate dynamic relocations against resolved weak
1748         undefined symbols in PIE.
1749         (elf_x86_64_finish_dynamic_symbol): Keep PLT/GOT entries without
1750         dynamic PLT/GOT relocations for resolved undefined weak symbols.
1751         Don't generate dynamic relocation against resolved undefined weak
1752         symbol in executable.
1753         (elf_x86_64_finish_dynamic_sections): Call
1754         elf_x86_64_pie_finish_undefweak_symbol on all symbols in PIE.
1755         (elf_backend_fixup_symbol): New.
1756
1757 2016-02-26  Alan Modra  <amodra@gmail.com>
1758
1759         * elf64-ppc.c (create_linkage_sections): Create sfpr when
1760         save_restore_funcs, rest of sections when not relocatable.
1761         (ppc64_elf_init_stub_bfd): Always call create_linkage_sections.
1762         (sfpr_define): Define all symbols on emitted code.
1763         (ppc64_elf_func_desc_adjust): Adjust for sfpr now being created
1764         when relocatable.  Move sfpr_define loop earlier.
1765
1766 2016-02-24  H.J. Lu  <hongjiu.lu@intel.com>
1767
1768         * elf64-x86-64.c (elf_x86_64_need_pic): New function.
1769         (elf_x86_64_relocate_section): Use it.  Replace
1770         x86_64_elf_howto_table[r_type] with howto.
1771
1772 2016-02-24  H.J. Lu  <hongjiu.lu@intel.com>
1773
1774         PR ld/19698
1775         * elflink.c (bfd_elf_record_link_assignment): Set versioned if
1776         symbol version is unknown.
1777
1778 2016-02-24  H.J. Lu  <hongjiu.lu@intel.com>
1779
1780         * elf32-i386.c (elf_i386_allocate_dynrelocs): Set plt_got.offset
1781         to (bfd_vma) -1 when setting needs_plt to 0.
1782         * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
1783
1784 2016-02-23  H.J. Lu  <hongjiu.lu@intel.com>
1785
1786         * elflink.c (bfd_elf_record_link_assignment): Check for shared
1787         library, instead of PIC, and don't check PDE when making linker
1788         assigned symbol dynamic.
1789
1790 2016-02-23  Faraz Shahbazker  <faraz.shahbazker@imgtec.com>
1791
1792         * bfd/elfxx-mips.c (_bfd_mips_post_process_headers): Increment
1793         ABIVERSION for non-executable stack.
1794
1795 2016-02-23  Rich Felker  <bugdal@aerifal.cx>
1796
1797         PR target/19516
1798         * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol):
1799         Always produce a RELATIVE reloc for a local symbol.
1800
1801 2016-02-23  Hans-Peter Nilsson  <hp@axis.com>
1802
1803         Fix test-case ld-elf/pr19617b
1804         * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
1805         discard unused non-function symbols when --dynamic-list-data.
1806
1807 2016-02-22  H.J. Lu  <hongjiu.lu@intel.com>
1808
1809         * elflink.c (_bfd_elf_link_renumber_dynsyms): Always create the
1810         dynsym section, even if it is empty, with dynamic sections.
1811
1812 2016-02-22  H.J. Lu  <hongjiu.lu@intel.com>
1813
1814         * syms.c: Remove BSF_COMMON from comments.
1815         * bfd-in2.h: Regenerated.
1816
1817 2016-02-22  Jiong Wang  <jiong.wang@arm.com>
1818
1819         * elfnn-aarch64. (aarch64_type_of_stub): Remove redundation calcuation
1820         for destination.  Remove useless function parameters.
1821         (elfNN_aarch64_size_stubs): Update parameters for aarch64_type_of_stub.
1822
1823 2016-02-19  Nick Clifton  <nickc@redhat.com>
1824
1825         PR ld/19629
1826         * aoutx.h (aout_link_add_symbols): Check for out of range string
1827         table offsets.
1828
1829         PR ld/19628
1830         * reloc.c (bfd_generic_get_relocated_section_contents): Stop
1831         processing if we encounter a reloc without an associated symbol.
1832
1833 2016-02-18  H.J. Lu  <hongjiu.lu@intel.com>
1834
1835         PR ld/19617
1836         * elflink.c (elf_link_add_object_symbols): Always create dynamic
1837         sections for -E/--dynamic-list.
1838
1839 2016-02-17  H.J. Lu  <hongjiu.lu@intel.com>
1840
1841         * elf64-x86-64.c (elf_backend_omit_section_dynsym): New.  Defined
1842         to bfd_true.
1843
1844 2016-02-16  Joseph Myers  <joseph@codesourcery.com>
1845
1846         * plugin.c (plugin_vec): Set match priority to 255.
1847         * format.c (bfd_check_format_matches) [BFD_SUPPORTS_PLUGINS]: When
1848         matching against the plugin vector, take priority from there not
1849         from TEMP.
1850
1851 2016-02-15  Nick Clifton  <nickc@redhat.com>
1852
1853         * elf-bfd.h (struct bfd_elf_special_section): Use unsigned values
1854         for length and type fields.  Use a signed value for the
1855         suffix_length field.
1856
1857 2016-02-10  H.J. Lu  <hongjiu.lu@intel.com>
1858
1859         PR ld/19601
1860         * elf32-i386.c (elf_i386_relocate_section): Mask off the least
1861         significant bit in GOT offset for R_386_GOT32X.
1862
1863 2016-02-10  Nick Clifton  <nickc@redhat.com>
1864
1865         PR 19405
1866         * elf32-nios2.c (nios2_elf32_install_imm16): Allow for signed
1867         immediate values.
1868         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Limit the
1869         number of messages about FDE encoding preventing .eh_frame_hdr
1870         generation.
1871
1872 2016-02-09  Nick Clifton  <nickc@redhat.com>
1873
1874         * oasys.c (oasys_archive_p): Fix indentation.
1875         * elf32-nds32.c (nds32_elf_relax_section): Use an unsigned
1876         constant for left shifting.
1877
1878         * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Add a more
1879         helpful warning message to explain why certain AArch64 relocs
1880         might overflow.
1881
1882 2016-02-05  Simon Marchi  <simon.marchi@ericsson.com>
1883
1884         * pe-mips.c (coff_mips_reloc): Fix formatting.
1885
1886 2016-02-05  Cupertino Miranda  <Cupertino.Miranda@synopsys.com>
1887
1888         * cpu-arc.c: Change default archure from bfd_mach_arc_arcv2
1889         to bfd_mach_arc_arc600.
1890
1891 2016-02-04  Alan Modra  <amodra@gmail.com>
1892
1893         * elf64-ppc.c (ppc64_elf_relocate_section): Adjust last patch
1894         for big-endian.
1895
1896 2016-02-02  H.J. Lu  <hongjiu.lu@intel.com>
1897
1898         PR ld/19542
1899         * elf64-x86-64.c (elf_x86_64_convert_load): Store the estimated
1900         distances in the compressed_size field of the output section.
1901
1902 2016-02-02  Alan Modra  <amodra@gmail.com>
1903
1904         * elf64-ppc.c (ppc64_elf_relocate_section): Further restrict
1905         ELFv2 entry optimization.
1906
1907 2016-02-02  H.J. Lu  <hongjiu.lu@intel.com>
1908
1909         PR binutils/19547
1910         * elf.c (assign_section_numbers): Clear HAS_RELOC if there are
1911         no relocations in relocatable files.
1912
1913 2016-02-01  H.J. Lu  <hongjiu.lu@intel.com>
1914
1915         PR ld/19553
1916         * elflink.c (elf_link_add_object_symbols): Don't add DT_NEEDED
1917         if a symbol from a library loaded via DT_NEEDED doesn't match
1918         the symbol referenced by regular object.
1919
1920 2016-02-01  Nathaniel Smith  <njs@pobox.com>
1921
1922         * peicode.h (pe_ILF_build_a_bfd): Create an import symbol for both
1923         CODE and DATA.
1924
1925 2016-02-01  Alan Modra  <amodra@gmail.com>
1926
1927         * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Don't abort on
1928         an out of range reloc_index.
1929         * elf32-i386.c (elf_i386_get_plt_sym_val): Likewise.
1930
1931 2016-02-01  Kamil Rytarowski  <n54@gmx.com>
1932
1933         * Makefile.am (OPTIONAL_BACKENDS): Add netbsd-core.lo.
1934         (OPTIONAL_BACKENDS_CFILES): Add netbsd-core.c.
1935         * Makefile.in: Regenerated.
1936
1937 2016-02-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
1938
1939         * elf64-s390.c (elf_s390_reloc_name_lookup): Fix indentation.
1940
1941 2016-01-31  John David Anglin  <danglin@gcc.gnu.org>
1942
1943         PR ld/19526
1944         * elf32-hppa.c (elf32_hppa_final_link): Don't sort non-regular output
1945         files.
1946         * elf64-hppa.c (elf32_hppa_final_link): Likewise.  Remove retval.
1947
1948 2016-01-30  H.J. Lu  <hongjiu.lu@intel.com>
1949
1950         PR ld/19539
1951         * elf32-i386.c (elf_i386_reloc_type_class): Check relocation
1952         against STT_GNU_IFUNC symbol only with dynamic symbols.
1953         * elf64-x86-64.c (elf_x86_64_reloc_type_class): Likewise.
1954
1955 2016-01-28  H.J. Lu  <hongjiu.lu@intel.com>
1956
1957         PR binutils/19523
1958         * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Set BFD_DECOMPRESS to
1959         decompress debug sections.
1960
1961 2016-01-25  Maciej W. Rozycki  <macro@imgtec.com>
1962
1963         * elf32-arc.c (elf_arc_finish_dynamic_symbol): Rename `index' to
1964         `dynindx'.
1965
1966 2016-01-25  Nick Clifton  <nickc@redhat.com>
1967
1968         PR target/19435
1969         * mach-o.c (bfd_mach_o_close_and_cleanup): Suppress code to free
1970         dsym filename buffer.
1971
1972 2016-01-24  Maciej W. Rozycki  <macro@imgtec.com>
1973
1974         * elfxx-mips.c (BZ16_REG_FIELD): Simplify calculation.
1975
1976 2016-01-24  Maciej W. Rozycki  <macro@imgtec.com>
1977
1978         * elfxx-mips.c (BZ16_REG): Correct calculation.
1979
1980 2016-01-21  Nick Clifton  <nickc@redhat.com>
1981
1982         * elf32-arc.c (ADD_RELA): Fix compile time warning errors by
1983         changing the type of _loc to be bfd_byte *.
1984         (elf_arc_finish_dynamic_symbol): Likewise.
1985
1986 2016-01-21  Nick Clifton  <nickc@redhat.com>
1987
1988         PR ld/19455
1989         * elf32-arm.c (elf32_arm_create_dynamic_sections): Set the ELF
1990         class of the linker stub bfd.
1991         (elf32_arm_check_relocs): Skip check for pic format after
1992         processing a vxWorks R_ARM_ABS12 reloc.
1993         * elflink.c (bfd_elf_final_link): Check for ELFCLASSNONE when
1994         reporting a class mismatch.
1995
1996 2016-01-21  Jiong Wang  <jiong.wang@arm.com>
1997
1998         * elfnn-aarch64.c (aarch64_type_of_stub): Allow insert long branch
1999         veneer for sym_sec != input_sec.
2000         (elfNN_aarch64_size_stub): Support STT_SECTION symbol.
2001         (elfNN_aarch64_final_link_relocate): Take rela addend into account when
2002         calculation destination.
2003
2004 2016-01-21  Alan Modra  <amodra@gmail.com>
2005
2006         * elf-linux-core.h (swap_linux_prpsinfo32_out): New function.
2007         (swap_linux_prpsinfo64_out): New function.
2008         (LINUX_PRPSINFO32_SWAP_FIELDS): Delete.
2009         (LINUX_PRPSINFO64_SWAP_FIELDS): Delete.
2010         * elf.c (elfcore_write_linux_prpsinfo32): Adjust.  Don't memset.
2011         (elfcore_write_linux_prpsinfo64): Likewise.
2012         * elf32-ppc.c (swap_ppc_linux_prpsinfo32_out): New function.
2013         (PPC_LINUX_PRPSINFO32_SWAP_FIELDS): Delete.
2014         (elfcore_write_ppc_linux_prpsinfo32): Adjust.  Don't memset.
2015
2016 2016-01-21  Alan Modra  <amodra@gmail.com>
2017
2018         * elf-linux-core.h: Rename from elf-linux-psinfo.h.
2019         * elf.c: Adjust #include.
2020         * elf32-ppc.c: Don't #include elf-linux-psinfo.h
2021         * Makefile.am (SOURCE_HFILES): Update.
2022         * Makefile.in: Regenerate.
2023         * po/SRC-PORFILES.in: Regenerate.
2024
2025 2016-01-21  Alan Modra  <amodra@gmail.com>
2026
2027         * configure.ac: Move corefile selection later in file.  Move
2028         tdefaults code immediately after other target vector code.
2029         * configure: Regenerate.
2030
2031 2016-01-20  Mickael Guene  <mickael.guene@st.com>
2032
2033         * elf32-arm.c (elf32_arm_special_sections): Remove catch of noread
2034         section using '.text.noread' pattern.
2035
2036 2016-01-19  John Baldwin  <jhb@FreeBSD.org>
2037
2038         * elf.c (elfcore_grok_note): Recognize NT_FREEBSD_THRMISC notes.
2039
2040 2016-01-18  Miranda Cupertino  <Cupertino.Miranda@synopsys.com>
2041             Zissulescu Claudiu  <Claudiu.Zissulescu@synopsys.com>
2042
2043         * arc-plt.def: New file.
2044         * arc-plt.h: Likewise.
2045         * elf32-arc.c (elf_arc_abs_plt0_entry, elf_arc_abs_pltn_entry,
2046                        elf_arcV2_abs_plt0_entry, elf_arcV2_abs_pltn_entry,
2047                        elf_arc_pic_plt0_entry, elf_arc_pic_pltn_entry,
2048                        elf_arcV2_pic_plt0_entry, elf_arcV2_pic_pltn_entry): Remove.
2049         (name_for_global_symbol): Added.
2050         (ADD_RELA): Helper to create dynamic relocs.
2051         (new_got_entry_to_list): Create a new got entry in linked list.
2052         (symbol_has_entry_of_type): Search for specific type of entry in
2053         list.
2054         (is_reloc_for_GOT): return FALSE for any TLS related relocs.
2055         (is_reloc_for_TLS, arc_elf_set_private_flags)
2056         (arc_elf_print_private_bfd_data, arc_elf_copy_private_bfd_data)
2057         (arc_elf_merge_private_bfd_data): New functions.
2058         (debug_arc_reloc): Cleaned debug info printing.
2059         (PDATA reloc): Changed not to perform address alignment.
2060         (reverse_me): Added. Fix for ARC_32 relocs.
2061         (arc_do_relocation): Return bfd_reloc_of when no relocation should
2062         occur.
2063         (arc_get_local_got_ents): Renamed from arc_get_local_got_offsets.
2064         Changed function to access an array of list of GOT entries instead
2065         of just an array of offsets.
2066         (elf_arc_relocate_section): Added support for PIC and TLS related relocations.
2067         (elf_arc_check_relocs): Likewise.
2068         (elf_arc_adjust_dynamic_symbol, elf_arc_finish_dynamic_symbol,
2069         (elf_arc_finish_dynamic_sections): Likewise
2070         (arc_create_dynamic_sections): Modified conditions to create
2071         dynamic sections.
2072         (ADD_SYMBOL_REF_SEC_AND_RELOC): New macro.
2073         (plt_do_relocs_for_symbol, relocate_plt_for_symbol)
2074         (relocate_plt_for_entry): Changed to support new way to define PLT
2075         related code.
2076         (add_symbol_to_plt): Likewise.
2077         (arc_elf_link_hash_table_create): New function.
2078
2079 2016-01-18  Nick Clifton  <nickc@redhat.com>
2080
2081         PR ld/19440
2082         * coff-rs6000.c (_bfd_xcoff_swap_sym_in): Sign extend external
2083         section number into internal section number.
2084         * coff64-rs6000.c (_bfd_xcoff64_swap_sym_in): Likewise.
2085         * coffswap.h (coff_swap_sym_in): Likewise.
2086         * peXXigen.c (_bfd_XXi_swap_sym_in): Likewise.
2087         * coffcode.h (_coff_bigobj_swap_sym_in): Make sure that internal
2088         section number field is big enough to hold the external value.
2089
2090 2016-01-17  Alan Modra  <amodra@gmail.com>
2091
2092         * configure: Regenerate.
2093
2094 2016-01-12  Yury Usishchev  <y.usishchev@samsung.com>
2095
2096         * elf32-arm.c (elf32_arm_fix_exidx_coverage): Insert cantunwind
2097         when address in first unwind entry does not match start of
2098         section.
2099
2100 2016-01-08  Richard Sandiford  <richard.sandiford@arm.com>
2101             Jiong Wang  <jiong.wang@arm.com>
2102
2103         PR ld/19368
2104         * elf32-arm.c (elf32_arm_reloc_type_class): Map R_ARM_IRELATIVE to
2105         reloc_class_ifunc.
2106
2107 2016-01-06  Andrew Burgess  <andrew.burgess@embecosm.com>
2108
2109         * elf32-arc.c (reloc_type_to_name): Change ARC_RELOC_HOWTO to
2110         place 'R_' before the reloc name returned.
2111         (elf_arc_howto_table): Change ARC_RELOC_HOWTO to place 'R_' before
2112         the relocation string.
2113
2114 2016-01-04  Maciej W. Rozycki  <macro@imgtec.com>
2115
2116         * elfxx-mips.c (mips_elf_merge_obj_abiflags): New function,
2117         factored out from...
2118         (_bfd_mips_elf_merge_private_bfd_data): ... here.
2119
2120 2016-01-04  Maciej W. Rozycki  <macro@imgtec.com>
2121
2122         * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Move
2123         attribute check after ELF file header flag check.
2124
2125 2016-01-04  Maciej W. Rozycki  <macro@imgtec.com>
2126
2127         * elfxx-mips.c (mips_elf_merge_obj_attributes): Propagate the
2128         return status from `_bfd_elf_merge_object_attributes'.
2129
2130 2016-01-04  Maciej W. Rozycki  <macro@imgtec.com>
2131
2132         * elfxx-mips.c (mips_elf_merge_obj_e_flags): New function,
2133         factored out from...
2134         (_bfd_mips_elf_merge_private_bfd_data): ... here.
2135
2136 2016-01-04  Maciej W. Rozycki  <macro@imgtec.com>
2137
2138         * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Fold the
2139         handling of input MIPS ABI flags together.
2140
2141 2016-01-04  Maciej W. Rozycki  <macro@imgtec.com>
2142
2143         * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Suppress
2144         attribute checks for null input.
2145
2146 2016-01-04  Maciej W. Rozycki  <macro@imgtec.com>
2147
2148         * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Use local
2149         pointers to target data.
2150
2151 2016-01-04  Maciej W. Rozycki  <macro@imgtec.com>
2152
2153         * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Correct
2154         an FP ABI warning.
2155
2156 2016-01-01  Alan Modra  <amodra@gmail.com>
2157
2158         Update year range in copyright notice of all files.
2159
2160 For older changes see ChangeLog-2015 and doc/ChangeLog-0415
2161 \f
2162 Copyright (C) 2016 Free Software Foundation, Inc.
2163
2164 Copying and distribution of this file, with or without modification,
2165 are permitted in any medium without royalty provided the copyright
2166 notice and this notice are preserved.
2167
2168 Local Variables:
2169 mode: change-log
2170 left-margin: 8
2171 fill-column: 74
2172 version-control: never
2173 End: