xref: /netbsd-src/external/gpl3/gdb/dist/bfd/ChangeLog (revision fdd524d4ccd2bb0c6f67401e938dabf773eb0372)
12015-07-28  Iain Buclaw  <ibuclaw@gdcproject.org>
2
3	* configure.in: Add asprintf and vasprintf to AC_CHECK_DECLS.
4	* config.in, configure: Regenerate.
5
62015-07-06  Joel Brobecker  <brobecker@adacore.com>
7
8	* development.sh (development): Set to false.
9
102015-07-05  Richard Sandiford  <richard.sandiford@arm.com>
11
12	* elf64-ppc.c (toc_adjusting_stub_needed): Use the symbol value
13	plus addend rather than the original st_value when looking up
14	entries in opd->adjust.
15
162015-07-03   Kai Tietz  <ktietz@redhat.com>
17	     Nick Clifton  <nickc@redhat.com>
18
19	PR ld/11539
20	* coffcode.h (coff_bfd_gc_sections): Define default
21	to bfd_coff_gc_sections function.
22	(coff_gc_mark_hook_fn): New type.
23	* coffgen.c (init_reloc_cookie): Copy and adjust coff
24	related code about gc-sections from elflink.c to here.
25	(fini_reloc_cookie): Likewise.
26	(init_reloc_cookie_rels): Likewise.
27	(fini_reloc_cookie_rels): Likewise.
28	(init_reloc_cookie_for_section): Likewise.
29	(fini_reloc_cookie_for_section): Likewise.
30	(_bfd_coff_gc_mark_hook): Likewise.
31	(_bfd_coff_gc_mark_rsec): Likewise.
32	(_bfd_coff_gc_mark_reloc): Likewise.
33	(_bfd_coff_gc_mark): Likewise.
34	(_bfd_coff_gc_mark_extra_sections): Likewise.
35	(coff_gc_sweep_symbol_info): Likewise.
36	(coff_gc_sweep_symbol): Likewise.
37	(gc_sweep_hook_fn): Likewise.
38	(coff_gc_sweep): Likewise.
39	(bfd_coff_gc_sections): Likewise.
40	(_bfd_coff_gc_keep): Likewise.
41	* libcoff-in.h (coff_reloc_cookie): New struct.
42	(bfd_coff_gc_sections): New prototype.
43	* libcoff.h: Regenerate.
44
452015-07-01  Sandra Loosemore  <sandra@codesourcery.com>
46	    Cesar Philippidis  <cesar@codesourcery.com>
47
48	* bfd-in2.h: Regenerated.
49	* elf32-nios2.c (elf_nios2_howto_table_rel): Rename to...
50	(elf_nios2_r1_howto_table_rel): This.
51	(elf_nios2_r2_howto_table_rel): New.
52	(BFD_IS_R2): New.
53	(lookup_howto): Add ABFD parameter.  Adjust to look up in either
54	the R1 or R2 relocation table, as determined by ABFD.
55	(nios2_reloc_map): Add R2 relocations.
56	(nios2_elf32_bfd_reloc_type_lookup): Do lookup using lookup_howto.
57	Pass it the ABFD parameter.
58	(nios2_elf32_bfd_reloc_name_lookup): Use ABFD to decide whether to
59	return an R1 or R2 relocation.
60	(nios2_elf32_info_to_howto): Do lookup using lookup_howto.
61	Pass it the ABFD parameter.
62	(nios2_elf32_do_call26_relocate): Check for alignment on a 4-byte
63	boundary.
64	(nios2_elf32_relocate_section): Adjust call to lookup_howto.
65	* libbfd.h: Regenerated.
66	* reloc.c (BFD_RELOC_NIOS2_R2_S12): New.
67	(BFD_RELOC_NIOS2_R2_I10_1_PCREL): New.
68	(BFD_RELOC_NIOS2_R2_T1I7_1_PCREL): New.
69	(BFD_RELOC_NIOS2_R2_T1I7_2): New.
70	(BFD_RELOC_NIOS2_R2_T2I4): New.
71	(BFD_RELOC_NIOS2_R2_T2I4_1): New.
72	(BFD_RELOC_NIOS2_R2_T2I4_2): New.
73	(BFD_RELOC_NIOS2_R2_X1I7_2): New.
74	(BFD_RELOC_NIOS2_R2_X2L5): New.
75	(BFD_RELOC_NIOS2_R2_F1I5_2): New.
76	(BFD_RELOC_NIOS2_R2_L5I4X1): New.
77	(BFD_RELOC_NIOS2_R2_T1X1I6): New.
78	(BFD_RELOC_NIOS2_R2_T1X1I6_2): New.
79
802015-07-01  Sandra Loosemore  <sandra@codesourcery.com>
81	    Cesar Philippidis  <cesar@codesourcery.com>
82
83	* archures.c (bfd_mach_nios2r1, bfd_mach_nios2r2): New.
84	* bfd-in2.h: Regenerated.
85	* cpu-nios2.c (nios2_compatible): New.
86	(N): Use nios2_compatible instead of bfd_default_compatible.
87	(NIOS2R1_NEXT, NIOS2R2_NEXT): Define.
88	(arch_info_struct): New.
89	(bfd_nios2_arch): Chain to NIOS2R1_NEXT.
90	* elf32-nios2.c (is_nios2_elf): New.
91	(nios2_elf32_merge_private_bfd_data): New.
92	(nios2_elf32_object_p): New.
93	(bfd_elf32_bfd_merge_private_bfd_data): Define.
94	(elf_backend_object_p): Define.
95
962015-07-01  H.J. Lu  <hongjiu.lu@intel.com>
97
98	* elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Refactor.
99
1002015-06-30  Nick Clifton  <nickc@redhat.com>
101
102	PR binutils/18570
103	* elf-attrs.c (obj_attr_size): Use an unsigned int type for the tag.
104	(write_obj_attribute): Likewise.
105	(elf_new_obj_attr): Likewise.
106	(bfd_elf_get_obj_attr_int): Likewise.
107	(bfd_elf_add_obj_attr_int): Likewise.
108	(bfd_elf_add_obj_attr_string): Likewise.
109	(bfd_elf_add_obj_attr_int_string): Likewise.
110	(gnu_obj_attrs_arg_type): Likewise.
111	(_bfd_elf_obj_attrs_arg_type): Likewise.
112	(_bfd_elf_parse_attributes): Likewise.
113	(_bfd_elf_merge_unknown_attribute_list): Likewise.
114	* elf-bfd.h (struct obj_attribute_list): Likewise.
115	Update prototypes.
116
1172015-06-28  H.J. Lu  <hongjiu.lu@intel.com>
118
119	* bfd-in.h (compressed_debug_section_type): Remove
120	COMPRESS_DEBUG_ZLIB.
121	* bfd-in2.h : Regenerated.
122
1232015-06-26  Matthew Fortune  <matthew.fortune@imgtec.com>
124
125	* elfxx-mips.c (_bfd_mips_elf_create_dynamic_sections): Use executable
126	instead of !shared to indicate an application vs shared library.
127	(_bfd_mips_elf_size_dynamic_sections): Likewise.
128	(_bfd_mips_elf_finish_dynamic_sections): Handle DT_MIPS_RLD_MAP_REL.
129	(_bfd_mips_elf_get_target_dtag): Likewise.
130
1312015-06-25  DJ Delorie  <dj@redhat.com>
132
133	* elf32-msp430.c (msp430_final_link_relocate): Fix comments.  Fix
134	REL loads to match RELA stores.
135
1362015-06-25  H.J. Lu  <hongjiu.lu@intel.com>
137
138	* elf.c (_bfd_elf_compute_section_file_positions): Don't
139	initialize sh_size for .shstrtab here.
140
1412015-06-25  H.J. Lu  <hongjiu.lu@intel.com>
142
143	PR gas/18451
144	* elf-bfd.h (elf_sym_strtab): New.
145	(elf_link_hash_table): Add strtabcount, strtabsize and
146	strtab.
147	(_bfd_elf_stringtab_init): Removed.
148	* elf.c (_bfd_elf_stringtab_init): Removed.
149	(_bfd_elf_compute_section_file_positions): Replace
150	bfd_strtab_hash/_bfd_elf_stringtab_init/_bfd_stringtab_free/
151	_bfd_stringtab_size with
152	elf_strtab_hash/_bfd_elf_strtab_init/_bfd_elf_strtab_free/
153	_bfd_elf_strtab_size.  Use _bfd_elf_strtab_add,
154	_bfd_elf_strtab_finalize and _bfd_elf_strtab_offset to get
155	st_name.
156	(swap_out_syms): Likewise.
157	* elflink.c (elf_final_link_info): Replace bfd_strtab_hash
158	with elf_strtab_hash.  Remove symbuf, symbuf_count,
159	symbuf_size and shndxbuf_size.
160	(elf_link_flush_output_syms): Removed.
161	(elf_link_output_sym): Renamed to ...
162	(elf_link_output_symstrtab): This.  Replace _bfd_stringtab_add
163	with _bfd_elf_strtab_add.  Don't flush symbols to the file nor
164	swap out symbols.
165	(elf_link_swap_symbols_out): New.
166	(elf_link_output_extsym): Replace elf_link_output_sym with
167	elf_link_output_symstrtab.
168	(elf_link_input_bfd): Likewise.
169	(elf_final_link_free): Replace _bfd_stringtab_free with
170	_bfd_elf_strtab_free.  Remove symbuf.
171	(bfd_elf_final_link): Replace _bfd_elf_stringtab_init with
172	_bfd_elf_strtab_init.  Don't set symbuf, symbuf_count,
173	symbuf_size nor shndxbuf_size.  Initialize strtabsize and
174	strtab.  Initialize symshndxbuf to -1 when number of sections
175	>= 64K.  Replace elf_link_output_sym/elf_link_output_sym with
176	elf_link_output_symstrtab/elf_link_output_symstrtab. Don't
177	call elf_link_flush_output_syms.  Call _bfd_elf_strtab_finalize
178	and elf_link_swap_symbols_out.  Replace _bfd_stringtab_size
179	and _bfd_stringtab_emit with _bfd_elf_strtab_size and
180	_bfd_elf_strtab_emit.
181
1822015-06-24  H.J. Lu  <hongjiu.lu@intel.com>
183
184	* elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Silence older
185	GCC warning.
186
1872015-06-24  H.J. Lu  <hongjiu.lu@intel.com>
188
189	* elf32-i386.c (elf_i386_allocate_dynrelocs): Always allocate
190	space for the first .plt entry.
191	(elf_i386_size_dynamic_sections): Always add DT_PLTGOT for .plt
192	section.  Add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL only if
193	there are PLT relocations.
194	* elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Always
195	allocate space for the first .plt entry.
196	(elf_x86_64_size_dynamic_sections): Always add DT_PLTGOT for
197	.plt section.  Add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL only if
198	there are PLT relocations.
199
2002015-06-24  H.J. Lu  <hongjiu.lu@intel.com>
201
202	PR ld/18591
203	* elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Don't convert
204	R_X86_64_GOTPCREL to R_X86_64_PC32 if it will cause relocation
205	overflow.
206
2072015-06-23  Jiong Wang  <jiong.wang@arm.com>
208
209	* elfnn-aarch64.c (aarch64_readonly_dynrelocs): New function.
210	(elfNN_aarch64_size_dynamic_sections): Traverse hash table to check
211	relocations against read-only sections.
212
2132015-06-18  Nick Clifton  <nickc@redhat.com>
214
215	PR 18481
216	* elf32-arm.c (R_ARM_TLS_LE32): Set the special function to NULL.
217
2182015-06-15  Jon Turney  <jon.turney@dronecode.org.uk>
219
220	* bfd.c: Change struct bfd_build_id to use bfd_size_type.
221	* bfd-in2.h : Regenerate.
222
2232015-06-16  Alan Modra  <amodra@gmail.com>
224
225	* elf32-ppc.c (ppc_elf_relocate_section): Correct binary search of
226	dynamic relocs.
227
2282015-06-10  Jon Turney  <jon.turney@dronecode.org.uk>
229
230	* elf-bfd.h : Remove struct elf_build_id.
231	* bfd.c : Add struct bfd_build_id.
232	* bfd-in2.h: Regenerate.
233	* elf.c (elfobj_grok_gnu_build_id): Update to use bfd_build_id.
234	* libpei.h: Add protoype and macros for
235	bfd_XXi_slurp_codeview_record.
236	* peXXigen.c (_bfd_XXi_slurp_codeview_record): Make public
237	* peicode.h (pe_bfd_read_buildid): Add.
238	(pe_bfd_object_p): Use pe_bfd_read_buildid().
239
2402015-06-15  Renlin Li  <renlin.li@arm.com>
241
242	* reloc.c (BFD_RELOC_AARCH64_LD64_GOTOFF_LO15): New entry.
243	* bfd-in2.h: Regenerate.
244	* libbfd.h: Regenerate.
245	* elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
246	BFD_RELOC_AARCH64_LD64_GOTOFF_LO15.
247
2482015-06-15  Alan Modra  <amodra@gmail.com>
249
250	* cofflink.c (_bfd_coff_generic_relocate_section): Revert
251	2014-03-26 change.  Call _bfd_clear_contents for relocs against
252	local and global symbols defined in discarded input sections.
253
2542015-06-05  Nick Clifton  <nickc@redhat.com>
255
256	* elf32-msp430.c (rl78_sym_diff_handler): New function.
257	(msp430_howto_table): Use the new function for the SYM_DIFF reloc.
258	(msp430x_howto_table): Likewise.
259
2602015-06-05  Alan Modra  <amodra@gmail.com>
261
262	* elf64-ppc.c (ppc_elf_relocate_section): Move dynamic text
263	relocs with insns moved by --ppc476-workaround.  Correct
264	output of REL16 relocs.
265
2662015-06-01  Jiong Wang  <jiong.wang@arm.com>
267
268	* elfnn-aarch64.c (aarch64_reloc_got_type): Support
269	BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14.
270	(elfNN_aarch64_final_link_relocate): Ditto.
271	(elfNN_aarch64_gc_swap_hook): Ditto.
272	(elfNN_aarch64_check_relocs): Ditto.
273	* elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto.
274
2752015-06-01  Jiong Wang  <jiong.wang@arm.com>
276
277	* reloc.c (BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14): New entry.
278	* bfd-in2.h: Regenerate.
279	* libbfd.h: Regenerate.
280	* elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
281	BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14.
282
2832015-06-01  Jiong Wang  <jiong.wang@arm.com>
284
285	* elfnn-aarch64.c (elfNN_aarch64_howto_table): Set overflow type to
286	complain_overflow_unsigned for BFD_RELOC_AARCH64_TLSLE_ADD_LO12.
287	* elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Don't use
288	PGOFF for BFD_RELOC_AARCH64_TLSLE_ADD_LO12.
289
2902015-06-01  Jiong Wang  <jiong.wang@arm.com>
291
292	* elfnn-aarch64.c (aarch64_reloc_got_type): Support
293	BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15.
294	(elfNN_aarch64_final_link_relocate): Ditto.
295	(elfNN_aarch64_gc_swap_hook): Ditto.
296	(elfNN_aarch64_check_relocs): Ditto.
297	* elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto.
298
2992015-06-01  Jiong Wang  <jiong.wang@arm.com>
300
301	* reloc.c (BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15): New entry.
302	* bfd-in2.h: Regenerate.
303	* libbfd.h: Regenerate.
304	* elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
305	BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15.
306
3072015-05-28  Catherine Moore  <clm@codesourcery.com>
308	    Bernd Schmidt <bernds@codesourcery.com>
309	    Paul Brook <paul@codesourcery.com>
310
311	bfd/
312	* bfd-in2.h: Regenerated.
313	* elf-bfd.h (DWARF2_EH_HDR, COMPACT_EH_HDR): Define.
314	(COMPACT_EH_CANT_UNWIND_OPCODE): Define.
315	(dwarf_eh_frame_hdr_info): Move dwarf-specific fields from
316	eh_frame_hdr_info.
317	(compact_eh_frame_hdr_info): Declare.
318	(eh_frame_hdr_info):  Redeclare with union for dwarf-specific
319	fields and compact-eh fields.
320	(elf_backend_data): Add cant_unwind_opcode and compact_eh_encoding.
321	(bfd_elf_section_data): Add eh_frame_entry_field.
322	(elf_section_eh_frame_entry): Define.
323	(bfd_elf_parse_eh_frame_entries): Declare.
324	(_bfd_elf_parse_eh_frame_entry): Declare.
325	(_bfd_elf_end_eh_frame_parsing): Declare.
326	(_bfd_elf_write_section_eh_frame_entry): Declare.
327	(_bfd_elf_eh_frame_entry_present): Declare.
328	(_bfd_elf_section_for_symbol): Declare.
329	* elf-eh-frame.c (bfd_elf_discard_eh_frame_entry): New function.
330	(bfd_elf_record_eh_frame_entry): New function.
331	(_bfd_elf_parse_eh_frame_entry): New function.
332	(_bfd_elf_parse_eh_frame): Update hdr_info field references.
333	(cmp_eh_frame_hdr): New function.
334	(add_eh_frame_hdr_terminator): New function.
335	(_bfd_elf_end_eh_frame_parsing): New function.
336	(find_merged_cie): Update hdr_info field references.
337	(_bfd_elf_discard_section_eh_frame): Likewise.
338	(_bfd_elf_discard_section_eh_frame_hdr): Add Compact EH support.
339	(_bfd_elf_eh_frame_entry_present): New function.
340	(_bfd_elf_maybe_strip_eh_frame_hdr): Add Compact EH support.
341	(_bfd_elf_write_section_eh_frame_entry): New function.
342	(_bfd_elf_write_section_eh_frame): Update hdr_info field references.
343	(_bfd_elf_fixup_eh_frame_hdr): New function.
344	(write_compact_eh_frame_hdr): New function.
345	(write_dwarf_eh_frame_hdr): New function.
346	(_bfd_elf_write_section_eh_frame_hdr): Add Compact EH support.
347	* elflink.c (_bfd_elf_section_for_symbol): New function.
348	(elf_section_ignore_discarded_relocs): Add Compact EH support.
349	(elf_link_input_bfd): Likewise.
350	(bfd_elf_final_link): Likewise.
351	(_bfd_elf_gc_mark): Likewise.
352	(bfd_elf_parse_eh_frame_entries): New function.
353	(bfd_elf_gc_sections): Add Compact EH support.
354	(bfd_elf_discard_info): Likewise.
355	* elfxx-mips.c: Include dwarf2.h.
356	(_bfd_mips_elf_compact_eh_encoding): New function.
357	(_bfd_mips_elf_cant_unwind_opcode): New function.
358	* elfxx-mips.h (_bfd_mips_elf_compact_eh_encoding): Declare.
359	(_bfd_mips_elf_cant_unwind_opcode): Declare.
360	(elf_backend_compact_eh_encoding): Define.
361	(elf_backend_cant_unwind_opcode): Define.
362	* elfxx-target.h (elf_backend_compact_eh_encoding): Provide default.
363	(elf_backend_cant_unwind_opcode): Provide default.
364	(elf_backend_data elfNN_bed): Add elf_backend_compact_eh_encoding and
365	elf_backend_cant_unwind_opcode.
366	* section.c (SEC_INFO_TYPE_EH_FRAME_ENTRY): Add definition.
367
3682015-05-27  H.J. Lu  <hongjiu.lu@intel.com>
369
370	PR binutils/18458
371	* elf32-i386.c (elf_i386_check_relocs): Create .plt.got section
372	for now binding only if pointer equality isn't needed.
373	(elf_i386_allocate_dynrelocs): Use .plt.got section for now
374	binding only if pointer equality isn't needed.
375	* elf64-x86-64.c (elf_x86_64_check_relocs): Create .plt.got
376	section for now binding only if pointer equality isn't needed.
377	(elf_x86_64_allocate_dynrelocs): Use .plt.got section for now
378	binding only if pointer equality isn't needed.
379
3802015-05-26  H.J. Lu  <hongjiu.lu@intel.com>
381
382	PR binutils/18437
383	* elf32-i386.c (elf_i386_get_plt_sym_val): Skip extra relocations
384	in .rel.plt/.rela.plt.
385	* elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
386
3872015-05-19  Jiong Wang  <jiong.wang@arm.com>
388
389	* elfnn-aarch64.c (aarch64_tls_transition_without_check): Sort
390	relocation case labels alphabetically.
391	(elfNN_aarch64_final_link_relocate): Ditto.
392	(elfNN_aarch64_tls_relax): Ditto.
393	(elfNN_aarch64_relocate_section): Ditto.
394	(elfNN_aarch64_gc_sweep_hook): Ditto.
395	(elfNN_aarch64_check_relocs): Ditto.
396	* elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto.
397	(_bfd_aarch64_elf_resolve_relocation): Ditto.
398
3992015-05-18  Jiong Wang  <jiong.wang@arm.com>
400
401	* elfnn-aarch64.c (elfNN_aarch64_adjust_dynamic_symbol): Rewrite
402	comments.
403
4042015-05-16  H.J. Lu  <hongjiu.lu@intel.com>
405
406	* elf32-i386.c (elf_i386_check_relocs): Create .plt.got section
407	for now binding.
408	(elf_i386_allocate_dynrelocs): Use .plt.got section for now
409	binding.
410	* elf64-x86-64.c (elf_x86_64_check_relocs): Create .plt.got
411	section for now binding.
412	(elf_x86_64_allocate_dynrelocs): Use .plt.got section for now
413	binding.
414
4152015-05-14  H.J. Lu  <hongjiu.lu@intel.com>
416
417	* bfd.c (bfd_update_compression_header): Also write the zlib
418	header if the SHF_COMPRESSED bit cleared..
419	(bfd_check_compression_header): Return the uncompressed size.
420	* compress.c (decompress_contents): Don't skip the zlib header.
421	(bfd_compress_section_contents): Properly handle ELFCOMPRESS_ZLIB,
422	which doesn't have the zlib header.
423	(bfd_init_section_decompress_status): Likewise.
424	(bfd_get_full_section_contents): Updated.
425	(bfd_is_section_compressed): Likewise.
426	(bfd_is_section_compressed_with_header): Return the uncompressed
427	size.
428	* elf.c (_bfd_elf_make_section_from_shdr): Updated.
429	* bfd-in2.h: Regenerated.
430
4312015-05-14  Jiong Wang  <jiong.wang@arm.com>
432
433	* elfnn-aarch64.c (elfNN_aarch64_relocate_section): Remove overflow
434	check restrictions.
435
4362015-05-14  Max Filippov  <jcmvbkbc@gmail.com>
437
438	* elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Treat PLT reference
439	as GOT reference when plt.refcount is not positive.
440
4412015-05-12  H.J. Lu  <hongjiu.lu@intel.com>
442
443	* elf32-i386.c (elf_i386_allocate_dynrelocs): Allocate space
444	for the first .plt entry only if needed.
445	* elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
446
4472015-05-11  H.J. Lu  <hongjiu.lu@intel.com>
448
449	* Makefile.am (ALL_MACHINES): Add cpu-iamcu.lo.
450	(ALL_MACHINES_CFILES): Likewise.
451	* archures.c (bfd_mach_iamcu): New.
452	(bfd_mach_i386_iamcu): Likewise.
453	(bfd_mach_i386_iamcu_intel_syntax): Likewise.
454	(bfd_iamcu_arch): Likewise.
455	(bfd_archures_list): Add &bfd_iamcu_arch.
456	* config.bfd (targ_selvecs): Add iamcu_elf32_vec to
457	i386_elf32_vec.
458	(targ_archs): Add bfd_iamcu_arch if needed.
459	* configure.ac: Support iamcu_elf32_vec.
460	* cpu-iamcu.c: New file.
461	* elf32-i386.c (elf32_iamcu_elf_object_p): New function.
462	Add support for iamcu_elf32_vec and elf32_iamcu_bed.
463	* targets.c (iamcu_elf32_vec): New.
464	(_bfd_target_vector): Add iamcu_elf32_vec.
465	* Makefile.in: Regenerated.
466	* bfd-in2.h: Likewise.
467	* configure: Likewise.
468
4692015-05-11  H.J. Lu  <hongjiu.lu@intel.com>
470
471	* elfcode.h (elf_object_p): Replace EM_486 with EM_IAMCU.
472
4732015-05-10  H.J. Lu  <hongjiu.lu@intel.com>
474
475	* elf32-i386.c (elf_i386_convert_mov_to_lea): Replace input_bfd
476	and output_bfd with abfd.
477	* elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise.
478
4792015-05-06  Toni Spets  <toni.spets@iki.fi>
480
481	PR ld/18372
482	* peXXigen.c (rsrc_process_section): Skip discarded resource
483	sections.
484
4852015-05-01  H.J. Lu  <hongjiu.lu@intel.com>
486
487	* config.bfd: Support i[3-7]86-*-elf*.
488
4892015-04-30  H.J. Lu  <hongjiu.lu@intel.com>
490
491	* elf32-i386.c (elf_backend_post_process_headers): Undef for
492	Solaris 2.
493
4942015-04-30  Nick Clifton  <nickc@redhat.com>
495
496	PR 18317
497	* elf32-mep.c (MEPREL): Use bfd_elf_generic_reloc instead of
498	mep_reloc.
499	(mep_reloc): Delete unused function.
500
5012015-04-29  Nick Clifton  <nickc@redhat.com>
502
503	PR 17099
504	* coff-i386.c (coff_i386_rtype_to_howto): Allow absolute PCRLONG
505	relocs.
506
5072015-04-27  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
508
509	* elf-s390-common.c (elf_s390_merge_obj_attributes): New function.
510	* elf32-s390.c (elf32_s390_merge_private_bfd_data): Call
511	elf_s390_merge_obj_attributes.
512	* elf64-s390.c (elf64_s390_merge_private_bfd_data): New function.
513
5142015-04-24  Jiong Wang  <jiong.wang@arm.com>
515
516	PR ld/18270
517	* elfnn-aarch64.c (elfNN_aarch64_size_dynamic): Count local symbol for
518	GOT_NORMAL for both sgot/srelgot section.
519	(elfNN_aarch64_final_link_relocate): Relocate against GOT entry address
520	and generate necessary runtime relocation for GOT entry.
521
5222015-04-24  H.J. Lu  <hongjiu.lu@intel.com>
523
524	PR binutils/18209
525	* archive.c (_bfd_get_elt_at_filepos): Copy is_linker_input.
526
5272015-04-24  Jiong Wang  <jiong.wang@arm.com>
528
529	* elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Reject
530	PC-relative relocation for external symbol.
531
5322015-04-24  Nick Clifton  <nickc@redhat.com>
533
534	PR 18313
535	* compress.c (decompress_contents): Zero initialse the z_stream
536	structure.
537
5382015-04-24  Nick Clifton  <nickc@redhat.com>
539
540	* elf.c (_bfd_elf_is_local_label_name): Extend test for assembler
541	local labels to include local labels with a numeric suffix and
542	fake symbols.
543
5442015-04-24  H.J. Lu  <hongjiu.lu@intel.com>
545
546	PR binutils/18316
547	* section.c (SEC_MEP_VLIW): New.
548	* bfd-in2.h: Regenerated.
549
5502015-04-23  H.J. Lu  <hongjiu.lu@intel.com>
551
552	PR ld/18277
553	* compress.c (bfd_compress_section_contents): Remove the
554	write_compress argument.
555	(bfd_init_section_compress_status): Updated.
556	(bfd_compress_section): Likewise.
557	* elf.c (_bfd_elf_set_reloc_sh_name): New.
558	(_bfd_elf_init_reloc_shdr): Add delay_st_name_p.  Set sh_name
559	to (unsigned int) -1 if delay_st_name_p is TRUE.  Use
560	_bfd_elf_set_reloc_sh_name.
561	(elf_fake_sections): Don't rename DWARF debug section for
562	linker output if it will be compressed.  Instead, set
563	delay_st_name_p to TRUE and pass it to _bfd_elf_init_reloc_shdr.
564	(assign_section_numbers): Call _bfd_elf_strtab_addref only if
565	sh_name != (unsigned int) -1.  Don't finalize nor assign
566	shstrtab section here.  Delay setting output section names to
567	_bfd_elf_write_object_contents.
568	(_bfd_elf_compute_section_file_positions): Update comments on
569	sh_offset for shstrtab section.
570	(assign_file_positions_for_non_load_sections): Set sh_offset to
571	-1 for shstrtab section.
572	(assign_file_positions_except_relocs): Likewise.
573	(_bfd_elf_assign_file_positions_for_non_load): Set up sh_name
574	when compressing DWARF debug sections.  Place shstrtab section
575	after DWARF debug sections have been compressed.
576	(_bfd_elf_write_object_contents): Setting sh_name for output
577	sections.
578
5792015-04-23  H.J. Lu  <hongjiu.lu@intel.com>
580
581	PR binutils/18209
582	* bfd.c (bfd): Add is_linker_input.
583	* elf.c (convert_debug_to_zdebug): New.
584	(convert_zdebug_to_debug): Likewise.
585	(_bfd_elf_make_section_from_shdr): Don't convert .debug_* to
586	.zdebug_* here.  Use convert_zdebug_to_debug.  Set SEC_ELF_RENAME.
587	(_bfd_elf_init_reloc_shdr): Pass a pointer to section name
588	instead of a pointer to section.
589	(elf_fake_sections): Rename the section name if SEC_ELF_RENAME
590	is set.
591	* section.c (SEC_ELF_RENAME): New.
592	* bfd-in2.h: Regenerated.
593
5942015-04-23  Alan Modra  <amodra@gmail.com>
595
596	* elf64-ppc.c (TOC_BASE_ALIGN): Define.
597	(ppc64_elf_next_toc_section): Align multi-got toc base.
598	(ppc64_elf_set_toc): Likewise initial toc base and .TOC. symbol.
599
6002015-04-22  H.J. Lu  <hongjiu.lu@intel.com>
601
602	PR ld/18289
603	* elf32-i386.c (elf_i386_link_hash_entry): Add gotoff_ref.
604	(elf_i386_link_hash_newfunc): Initialize gotoff_ref to 0.
605	(elf_i386_create_dynamic_sections): Always allow copy relocs for
606	building executables.
607	(elf_i386_copy_indirect_symbol): Also copy gotoff_ref.
608	(elf_i386_check_relocs): Set gotoff_ref for R_386_GOTOFF.
609	(elf_i386_adjust_dynamic_symbol): Also allocate copy relocs for
610	PIE and R_386_GOTOFF.
611	(elf_i386_relocate_section): Allow R_386_GOTOFF in executable.
612
6132015-04-20  H.J. Lu  <hongjiu.lu@intel.com>
614
615	* elf.c (assign_section_numbers): Always set up sh_name.
616
6172015-04-20  H.J. Lu  <hongjiu.lu@intel.com>
618
619	* elf.c (assign_file_positions_for_non_load_sections): Iterate
620	sections by pointer.
621	(_bfd_elf_assign_file_positions_for_non_load): Likewise.
622
6232015-04-14  H.J. Lu  <hongjiu.lu@intel.com>
624
625	* bfd-in.h (compressed_debug_section_type): New.
626	* compress.c (bfd_compress_section_contents): Add an argument
627	for linker write compression and always generate .zdebug_*
628	section when linking.
629	(bfd_init_section_compress_status): Pass FALSE to
630	bfd_compress_section_contents.
631	(bfd_compress_section): New function.
632	* elf.c (elf_fake_sections): For linking, set SEC_ELF_COMPRESS
633	on DWARF debug sections if COMPRESS_DEBUG is set and rename
634	section if COMPRESS_DEBUG_GABI_ZLIB isn't set.
635	(assign_file_positions_for_non_load_sections): Set sh_offset
636	to -1 if SEC_ELF_COMPRESS is set.
637	(assign_file_positions_except_relocs): Likwise.
638	(_bfd_elf_assign_file_positions_for_relocs): Renamed to ...
639	(_bfd_elf_assign_file_positions_for_non_load): This.  Change
640	return time to bfd_boolean.  Compress the section if
641	SEC_ELF_COMPRESS is set.
642	(_bfd_elf_write_object_contents): Updated.
643	(_bfd_elf_set_section_contents): Write section contents to
644	the buffer if SEC_ELF_COMPRESS is set.
645	* merge.c: Include "elf-bfd.h".
646	(sec_merge_emit): Add arguments for contents and offset.  Write
647	to contents with offset if contents isn't NULL.
648	(_bfd_write_merged_section): Write section contents to the
649	buffer if SEC_ELF_COMPRESS is set.  Pass contents and
650	output_offset to sec_merge_emit.
651	* elflink.c (bfd_elf_final_link): Allocate the buffer for
652	output section contents if SEC_ELF_COMPRESS is set.
653	* section.c (SEC_ELF_COMPRESS): New.
654	* bfd-in2.h: Regenerated.
655
6562015-04-15  Alan Modra  <amodra@gmail.com>
657
658	* elf32-rl78.c (rl78_elf_relocate_section): Typo fix.
659
6602015-04-14  Nick Clifton  <nickc@redhat.com>
661
662	* elf32-rl78.c (RL78_OP_REL): New macro.
663	(rl78_elf_howto_table): Use it for complex relocs.
664	(get_symbol_value): Handle the cases when the info or status
665	arguments are NULL.
666	(get_romstart): Cache the status returned by get_symbol_value.
667	(get_ramstart): Likewise.
668	(RL78_STACK_PUSH): Generate an error message if the stack
669	overflows.
670	(RL78_STACK_POP): Likewise for underflows.
671	(rl78_compute_complex_reloc): New function.  Contains the basic
672	processing code for all RL78 complex relocs.
673	(rl78_special_reloc): New function.  Provides special reloc
674	handling for complex relocs.
675	(rl78_elf_relocate_section): Use rl78_compute_complex_reloc.
676	(rl78_offset_for_reloc): Likewise.
677
6782015-04-14  H.J. Lu  <hongjiu.lu@intel.com>
679
680	PR ld/pr17709
681	* elflink.c (_bfd_elf_adjust_dynamic_copy): Check
682	info->extern_protected_data when warning copy relocs against
683	protected symbols.
684	(_bfd_elf_symbol_refs_local_p): Check info->extern_protected_data
685	when checking protected non-function symbols.
686
6872015-04-13  John Baldwin  <jhb@FreeBSD.org>
688
689	* elf.c (elfcore_grok_note): Recognize NT_X86_XSTATE on
690	FreeBSD.
691	(elfcore_write_xstatereg): Use correct note name on FreeBSD.
692
6932015-04-13  H.J. Lu  <hongjiu.lu@intel.com>
694
695	PR ld/18250
696	* elflink.c (elf_link_is_defined_archive_symbol): Return FALSE
697	if the object has been claimed by plugin.
698
6992015-04-11  H.J. Lu  <hongjiu.lu@intel.com>
700
701	* elf32-i386.c (elf_i386_relocate_section): Replace SYMBOLIC_BIND
702	with SYMBOL_REFERENCES_LOCAL when checking R_386_GOTOFF against
703	protected data symbol when building shared library.
704	* elf64-x86-64.c (elf_x86_64_relocate_section): Check
705	R_X86_64_GOTOFF64 against undefined symbol and replace
706	SYMBOLIC_BIND with SYMBOL_REFERENCES_LOCAL when checking
707	R_X86_64_GOTOFF64 against protected data symbol when building
708	shared library.
709
7102015-04-10  H.J. Lu  <hongjiu.lu@intel.com>
711
712	PR ld/pr17709
713	* elf32-i386.c (elf_i386_relocate_section): Also check R_386_GOTOFF
714	against protected data symbol when building shared library.
715	* elf64-x86-64.c (elf_x86_64_relocate_section): Also check
716	R_X86_64_GOTOFF64 against protected data symbol when building
717	shared library.
718
7192015-04-10  H.J. Lu  <hongjiu.lu@intel.com>
720
721	PR ld/pr15228
722	PR ld/pr17709
723	* elf-bfd.h (elf_backend_data): Add extern_protected_data.
724	* elf32-i386.c (elf_backend_extern_protected_data): New.
725	Defined to 1.
726	* elf64-x86-64.c (elf_backend_extern_protected_data): Likewise.
727	* elflink.c (_bfd_elf_adjust_dynamic_copy): Don't error on
728	copy relocs against protected symbols if extern_protected_data
729	is true.
730	(_bfd_elf_symbol_refs_local_p): Don't return true on protected
731	non-function symbols if extern_protected_data is true.
732	* elfxx-target.h (elf_backend_extern_protected_data): New.
733	Default to 0.
734	(elfNN_bed): Initialize extern_protected_data with
735	elf_backend_extern_protected_data.
736
7372015-04-10  H.J. Lu  <hongjiu.lu@intel.com>
738
739	* compress.c (bfd_compress_section_contents): Replace bfd_malloc
740	and free with bfd_alloc and bfd_release on compressed buffer.
741	Release buffer if compressed section isn't smaller.
742
7432015-04-10  Alan Modra  <amodra@gmail.com>
744
745	PR ld/18222
746	* elflink.c (_bfd_elf_adjust_dynamic_copy): Don't report an error
747	on adding a protected visibility variable to .dynbss.
748
7492015-04-10  Alan Modra  <amodra@gmail.com>
750
751	Revert 2015-03-05  H.J. Lu  <hongjiu.lu@intel.com>
752	PR ld/pr15228
753	PR ld/pr17709
754	* elf-bfd.h (elf_backend_data): Delete extern_protected_data.
755	* elf32-i386.c (elf_backend_extern_protected_data): Delete.
756	* elf64-x86-64.c (elf_backend_extern_protected_data): Likewise.
757	* elflink.c (_bfd_elf_adjust_dynamic_copy): Remove
758	extern_protected_data test.
759	(_bfd_elf_symbol_refs_local_p): Likewise.
760	* elfxx-target.h (elf_backend_extern_protected_data): Delete.
761	(elfNN_bed): Delete elf_backend_extern_protected_data init.
762
7632015-04-09  H.J. Lu  <hongjiu.lu@intel.com>
764
765	* compress.c (bfd_compress_section_contents): Update comments.
766	(bfd_init_section_decompress_status): Likewise.
767	(bfd_init_section_compress_status): Likewise.
768
7692015-04-09  H.J. Lu  <hongjiu.lu@intel.com>
770
771	* elfxx-target.h (TARGET_BIG_SYM): Add BFD_COMPRESS_GABI to
772	object_flags.
773	(TARGET_LITTLE_SYM): Likewise.
774
7752015-04-09  Max Filippov  <jcmvbkbc@gmail.com>
776
777	* elf32-xtensa.c (splay-tree.h): include header.
778	(text_action_struct): drop next pointer.
779	(text_action_list_struct): drop head pointer, add count and
780	tree fields.
781	(find_fill_action): instead of linear search in text_action_list
782	search in the tree.
783	(text_action_compare, action_first, action_next): new functions.
784	(text_action_add, text_action_add_literal): instead of linear
785	search and insertion insert new node into the tree.
786	(removed_by_actions): pass additional parameter: action_list,
787	use it to traverse the tree.
788	(offset_with_removed_text): pass additional action_list parameter
789	to removed_by_actions.
790	(map_action_fn_context): new typedef.
791	(map_action_fn_context_struct): new structure.
792	(map_action_fn): new function.
793	(map_removal_by_action): use splay_tree_foreach to build map.
794	(find_insn_action): replace linear search in text_action_list
795	with series of splay_tree_lookups.
796	(print_action, print_action_list_fn): new functions.
797	(print_action_list): use splay_tree_foreach.
798	(init_xtensa_relax_info): drop action_list.head initialization.
799	Initialize the tree.
800	(compute_text_actions): use non-zero action_list_count instead of
801	non-NULL action list.
802	(xlate_map_context): new typedef.
803	(xlate_map_context_struct): new structure.
804	(xlate_map_fn): new function.
805	(build_xlate_map): use splay_tree_foreach to build map.
806	(action_remove_bytes_fn): new function.
807	(relax_section): use zero action_list_count instead of NULL
808	action list. Use splay_tree_foreach to count final section size.
809	Drop unused variable 'removed'.
810
8112015-04-09  Max Filippov  <jcmvbkbc@gmail.com>
812
813	* elf32-xtensa.c (removed_literal_map_entry): new typedef.
814	(removed_literal_map_entry_struct): new structure.
815	(removed_literal_list_struct): add new fields: n_map and map.
816	(map_removed_literal, removed_literal_compare): new functions.
817	(find_removed_literal): build index array for literals ordered
818	by VMA, use binary search to find removed literal.
819
8202015-04-09  Max Filippov  <jcmvbkbc@gmail.com>
821
822	* elf32-xtensa.c (removal_by_action_entry_struct,
823	removal_by_action_map_struct): new structures.
824	(removal_by_action_entry, removal_by_action_map): new typedefs.
825	(text_action_list_struct): add new field: map.
826	(map_removal_by_action, removed_by_actions_map,
827	offset_with_removed_text_map): new functions.
828	(relax_section): replace offset_with_removed_text with
829	offset_with_removed_text_map.
830	(translate_reloc, relax_property_section, relax_section_symbols):
831	replace removed_by_actions with removed_by_actions_map.
832
8332015-04-09  Max Filippov  <jcmvbkbc@gmail.com>
834
835	* elf32-xtensa.c (reloc_range_list, reloc_range_list_entry,
836	reloc_range): new typedef.
837	(reloc_range_list_struct, reloc_range_list_entry_struct,
838	reloc_range_struct): new structures.
839	(reloc_range_compare, build_reloc_ranges,
840	reloc_range_list_append, reloc_range_list_remove,
841	reloc_range_list_update_range, free_reloc_range_list): new
842	functions.
843	(compute_text_actions): precompute relocation opcodes before the
844	loop. Add relevant_relocs variable, initialize it before the
845	loop, pass it to the check_section_ebb_pcrels_fit.
846	(check_section_ebb_pcrels_fit): add new parameter:
847	relevant_relocs. Update address range in the relevant_relocs if
848	it's non-NULL and iterate only over relevant relocations.
849
8502015-04-09  Nick Clifton  <nickc@redhat.com>
851
852	* elf32-rx.c (describe_flags): Report the settings of the string
853	insn using bits.
854	(rx_elf_merge_private_bfd_data): Handle merging of the string insn
855	using bits.
856
8572015-04-08  H.J. Lu  <hongjiu.lu@intel.com>
858
859	* compress.c (bfd_compress_section_contents): Work around a GCC
860	uninitialized warning bug fixed in GCC 4.7.
861
8622015-04-08  H.J. Lu  <hongjiu.lu@intel.com>
863
864	* archive.c (_bfd_get_elt_at_filepos): Also copy BFD_COMPRESS_GABI
865	bit.
866	* bfd.c (bfd::flags): Increase size to 18 bits.
867	(BFD_COMPRESS_GABI): New.
868	(BFD_FLAGS_SAVED): Add BFD_COMPRESS_GABI.
869	(BFD_FLAGS_FOR_BFD_USE_MASK): Likewise.
870	(bfd_update_compression_header): New fuction.
871	(bfd_check_compression_header): Likewise.
872	(bfd_get_compression_header_size): Likewise.
873	(bfd_is_section_compressed_with_header): Likewise.
874	* compress.c (MAX_COMPRESSION_HEADER_SIZE): New.
875	(bfd_compress_section_contents): Return the uncompressed size if
876	the full section contents is compressed successfully.  Support
877	converting from/to .zdebug* sections.
878	(bfd_get_full_section_contents): Call
879	bfd_get_compression_header_size to get compression header size.
880	(bfd_is_section_compressed): Renamed to ...
881	(bfd_is_section_compressed_with_header): This.  Add a pointer
882	argument to return compression header size.
883	(bfd_is_section_compressed): Use it.
884	(bfd_init_section_decompress_status): Call
885	bfd_get_compression_header_size to get compression header size.
886	Return FALSE if uncompressed section size is 0.
887	* elf.c (_bfd_elf_make_section_from_shdr): Support converting
888	from/to .zdebug* sections.
889	* bfd-in2.h: Regenerated.
890
8912015-04-07  Alan Modra  <amodra@gmail.com>
892
893	* elf.c (_bfd_elf_get_reloc_section): Allow for .got.plt being
894	mapped to output .got section.
895
8962015-04-07  Alan Modra  <amodra@gmail.com>
897
898	* elf32-ppc.c (struct ppc_elf_link_hash_entry): Add has_addr16_ha
899	and has_addr16_lo.  Make has_sda_refs a bitfield.
900	(ppc_elf_check_relocs): Set new flags.
901	(ppc_elf_link_hash_table_create): Update default_params.
902	(ppc_elf_adjust_dynamic_symbol): Clear protected_def in cases
903	where we won't be making .dynbss entries or editing code.  Set
904	params->pic_fixup when we'll edit code for protected var access.
905	(allocate_dynrelocs): Allocate got entry for edited code and
906	discard dyn_relocs.
907	(struct ppc_elf_relax_info): Add picfixup_size.
908	(ppc_elf_relax_section): Rename struct one_fixup to struct
909	one_branch_fixup.  Rename fixups to branch_fixups.  Size space for
910	pic fixups.
911	(ppc_elf_relocate_section): Edit non-PIC accessing protected
912	visibility variables to PIC.  Don't emit dyn_relocs for code
913	we've edited.
914	* elf32-ppc.h (struct ppc_elf_params): Add pic_fixup.
915
9162015-04-07  Nick Clifton  <nickc@redhat.com>
917
918	* elf.c (_bfd_elf_is_local_label_name): Treat assembler generated
919	local labels as local.
920
9212015-04-06  H.J. Lu  <hongjiu.lu@intel.com>
922
923	* compress.c (get_uncompressed_size): Removed.
924	(bfd_compress_section_contents): Use bfd_putb64 to write
925	uncompressed section size.
926	(bfd_init_section_decompress_status): Replace
927	get_uncompressed_size with bfd_getb64.
928
9292015-04-04  H.J. Lu  <hongjiu.lu@intel.com>
930
931	* elf.c (_bfd_elf_init_private_section_data): Also preserve the
932	SHF_COMPRESSED bit if not decompress.
933
9342015-04-04  H.J. Lu  <hongjiu.lu@intel.com>
935
936	* compress.c (get_uncompressed_size): New.  Extracted from ...
937	(bfd_init_section_decompress_status): This.  Use it.
938
9392015-04-02  Andrew Turner  <andrew@freebsd.org>
940
941	* config.bfd: Add aarch64-*-freebsd* target triple.
942
9432015-04-02  H.J. Lu  <hongjiu.lu@intel.com>
944
945	* configure: Regenerated.
946
9472015-04-01  Tejas Belagod  <tejas.belagod@arm.com>
948	    Marcus Shawcroft  <marcus.shawcroft@arm.com>
949	    Jiong Wang  <jiong.wang@arm.com>
950
951	* bfd-in.h (bfd_elf64_aarch64_set_options)
952	(bfd_elf32_aarch64_set_options): Add parameter.
953	* bfd-in2.h: Regenerated.
954	* elfnn-aarch64.c (aarch64_erratum_843419_stub)
955	(_bfd_aarch64_adrp_p, _bfd_aarch64_erratum_843419_sequence_p)
956	(_bfd_aarch64_erratum_843419_stub_name)
957	(_bfd_aarch64_erratum_843419_fixup)
958	(_bfd_aarch64_erratum_843419_scan)
959	(_bfd_aarch64_erratum_843419_branch_to_stub)
960	(_bfd_aarch64_erratum_843419_p): Define.
961	(enum elf_aarch64_stub_type): Define
962	aarch64_stub_erratum_843419_veneer.
963	(struct elf_aarch64_stub_hash_entry): Define adrp_offset.
964	(struct elf_aarch64_link_hash_table): Define fix_erratum_843419
965	and fix_erratum_843419_adr.
966	(stub_hash_newfunc): Initialize adrp_offset;
967	(_bfd_aarch64_add_stub_entry_after): Define.
968	(aarch64_map_one_stub, aarch64_build_one_stub)
969	(aarch64_size_one_stub): Handle
970	aarch64_stub_erratum_843419_veneer.
971	(_bfd_aarch64_resize_stubs): Round stub section size.
972	(elfNN_aarch64_size_stubs): Add scan for 843419.
973	(bfd_elfNN_aarch64_set_options): Add parameter. Initialize
974	fix_erratum_843419 and fix_erratum_843419_adr.
975	(struct erratum_835769_branch_to_stub_data): Add info.
976	(elfNN_aarch64_write_section): Initialise info.  Handle 843419.
977	(elfNN_aarch64_size_dynamic_sections): Handle 843419.
978	* elfxx-aarch64.c (_bfd_aarch64_decode_adrp_imm)
979	(_bfd_aarch64_sign_extend): Define.
980	(reencode_adr_imm): Remove static. Rename to:
981	(_bfd_aarch64_reencode_adr_imm): Define.
982	(_bfd_aarch64_elf_put_addend): Call _bfd_aarch64_reencode_adr_imm.
983	* elfxx-aarch64.h (AARCH64_ADR_OP, AARCH64_ADRP_OP)
984	(AARCH64_ADRP_OP_MASK, _bfd_aarch64_sign_extend)
985	(_bfd_aarch64_decode_adrp_imm, _bfd_aarch64_reencode_adr_imm):
986	Define.
987
9882015-04-01  H.J. Lu  <hongjiu.lu@intel.com>
989
990	* configure: Regenerated.
991
9922015-03-31  Ed Schouten  <ed@nuxi.nl>
993
994	* config.bfd (targ_defvec): Set to x86_64_elf64_cloudabi_vec
995	for x86_64-*-cloudabi*.
996	* configure.ac: Handle x86_64_elf64_cloudabi_vec.
997	* configure: Regenerated.
998	* elf64-x86-64.c (TARGET_LITTLE_SYM): Support x86_64-*-cloudabi*.
999	(TARGET_LITTLE_NAME): Likewise.
1000	(ELF_OSABI): Likewise.
1001	(elf64_bed): Likewise.
1002	* targets.c (x86_64_elf64_cloudabi_vec): New.
1003	(_bfd_target_vector): Add x86_64_elf64_cloudabi_vec.
1004
10052015-03-31  H.J. Lu  <hongjiu.lu@intel.com>
1006
1007	* configure.ac: Revert the AM_ZLIB change.
1008	* Makefile.in: Regenerated.
1009	* aclocal.m4: Likewise.
1010	* configure: Likewise.
1011	* doc/Makefile.in: Likewise.
1012
10132015-03-30  H.J. Lu  <hongjiu.lu@intel.com>
1014
1015	PR ld/18169
1016	* elf-bfd.h (elf_backend_data): Add get_reloc_section.
1017	(_bfd_elf_get_reloc_section): New.
1018	* elf.c (_bfd_elf_get_reloc_section): Likewise.
1019	(assign_section_numbers): Call get_reloc_section to look up the
1020	section the relocs apply.
1021	* elfxx-target.h (elf_backend_get_reloc_section): Likewise.
1022	(elfNN_bed): Initialize get_reloc_section with
1023	elf_backend_get_reloc_section.
1024
10252015-03-29  H.J. Lu  <hongjiu.lu@intel.com>
1026
1027	* Makefile.am (ZLIB): New.
1028	(ZLIBINC): Likewise.
1029	(AM_CFLAGS): Add $(ZLIBINC).
1030	(libbfd_la_LIBADD): Add $(ZLIB).
1031	* compress.c: Don't check HAVE_ZLIB_H to include <zlib.h>.
1032	(decompress_contents): Don't check HAVE_ZLIB_H.
1033	(bfd_compress_section_contents): Likewise.
1034	(bfd_get_full_section_contents): Likewise.
1035	(bfd_init_section_decompress_status): Likewise.
1036	(bfd_init_section_compress_status): Likewise.
1037	* configure.ac (AM_ZLIB): Removed.
1038	(zlibdir): New.  AC_SUBST.
1039	(zlibinc): Likewise.
1040	Add --with-system-zlib.
1041	* Makefile.in: Regenerated.
1042	* acinclude.m4: Likewise.
1043	* config.in: Likewise.
1044	* configure: Likewise.
1045	* doc/Makefile.in: Likewise.
1046
10472015-03-27  Alan Modra  <amodra@gmail.com>
1048
1049	PR ld/15228
1050	PR ld/18167
1051	* elflink.c (elf_merge_st_other): Add "sec" parameter.  Don't set
1052	protected_def when symbol section is read-only.  Adjust all calls.
1053	* elf-bfd.h (struct elf_link_hash_entry): Update protected_def comment.
1054
10552015-03-26  Tejas Belagod  <tejas.belagod@arm.com>
1056
1057	* elfnn-aarch64.c (aarch64_build_one_stub): Replace the call to generic
1058	_bfd_final_link_relocate with aarch64_relocate.
1059
10602015-03-26  H.J. Lu  <hongjiu.lu@intel.com>
1061
1062	PR ld/18160
1063	* elflink.c (elf_gc_sweep): Skip if relocation is incompatible.
1064	(bfd_elf_gc_sections): Likewise.
1065
10662015-03-25  Marcus Shawcroft  <marcus.shawcroft@arm.com>
1067
1068	* elfnn-aarch64.c (_bfd_aarch64_resize_stubs): Adjust stub section
1069	size for initial branch.
1070	(elfNN_aarch64_build_stubs): Write initial branch.
1071	_bfd_aarch64_decode_(elfNN_aarch64_output_arch_local_syms): Write
1072	mapping symbol on initial branch.
1073
10742015-03-25  Marcus Shawcroft  <marcus.shawcroft@arm.com>
1075
1076	* elfnn-aarch64.c (_bfd_aarch64_erratum_835769_scan):
1077	Update erratum count.
1078
10792015-03-25  Senthil Kumar Selvaraj  <senthil_kumar.selvaraj@atmel.com>
1080
1081	* elflink.c (_bfd_elf_gc_mark_extra_sections): Don't break on
1082	first matching debug section.
1083
10842015-03-24  H.J. Lu  <hongjiu.lu@intel.com>
1085
1086	PR gas/18087
1087	* compress.c (bfd_compress_section_contents): Don't write the
1088	zlib header and set contents as well as compress_status if
1089	compression didn't make the section smaller.
1090	(bfd_init_section_compress_status): Don't check compression
1091	size here.
1092
10932015-03-24  Nick Clifton  <nickc@redhat.com>
1094
1095	PR binutils/17512
1096	* coffgen.c (coff_get_normalized_symtab): Fix test for out of
1097	range auxillary sections.
1098
10992015-03-24  Marcus Shawcroft  <marcus.shawcroft@arm.com>
1100
1101	* elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Factor
1102	code into:
1103	(_bfd_aarch64_get_stub_for_link_section): Define.
1104
11052015-03-24  Marcus Shawcroft  <marcus.shawcroft@arm.com>
1106
1107	* elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Adjust
1108	update of section_group[].stub_sec.
1109
11102015-03-24  Marcus Shawcroft  <marcus.shawcroft@arm.com>
1111
1112	* elfnn-aarch64.c (struct aarch64_erratum_835769_fix) Remove.
1113	(erratum_835769_scan) Drop fix_table_size_p and fixes_p arguments.
1114	Delete fixes, fix_table_size and associated code.  Call
1115	_bfd_aarch64_add_stub_entry_in_group. Rename to...
1116	(bfd_aarch64_erratum_835769_scan): Define.
1117	(elfNN_aarch64_size_stubs): Delete erratum_835769_fixes,
1118	erratum_835769_fix_table_size, i and associated code.  Relocate
1119	call to _bfd_aarch64_erratum_835769_scan.  Delete adhoc stub size
1120	correction.  Delete construction of stub entry from
1121	erratum_835769_fixes array.
1122
11232015-03-24  Marcus Shawcroft  <marcus.shawcroft@arm.com>
1124
1125	* elfnn-aarch64.c (elfNN_aarch64_size_stubs): Use
1126	_bfd_aarch64_add_stub_entry_in_group.
1127
11282015-03-24  Alan Modra  <amodra@gmail.com>
1129
1130	* elf64-ppc.c (ppc64_elf_relocate_section): Report overflow to
1131	stubs, even those for undefined weak symbols.  Otherwise, don't
1132	report relocation overflow on branches to undefined strong
1133	symbols.  Fix memory leak.
1134	* elf32-ppc.c (ppc_elf_relocate_section): Don't report relocation
1135	overflow on branches to undefined strong symbols.
1136
11372015-03-23  Keith Seitz  <keiths@redhat.com>
1138
1139	* elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Add
1140	missing ';'.
1141
11422015-03-23  Marcus Shawcroft  <marcus.shawcroft@arm.com>
1143
1144	* elfnn-aarch64.c (erratum_835769_scan): Factor stub name
1145	construction into...
1146	(_bfd_aarch64_erratum_835769_stub_name): Define.
1147
11482015-03-23  Marcus Shawcroft  <marcus.shawcroft@arm.com>
1149
1150	* elfnn-aarch64.c (elfNN_aarch64_size_stubs): Factor out
1151	stub resize code into...
1152	(bfd_aarch64_resize_stubs): Define.
1153
11542015-03-23  Marcus Shawcroft  <marcus.shawcroft@arm.com>
1155
1156	* elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Factor stub
1157	creation code into...
1158	(bfd_aarch64_create_stub_section): Define.
1159
11602015-03-23  Marcus Shawcroft  <marcus.shawcroft@arm.com>
1161
1162	* elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Rename
1163	from elf_aarch64_create_or_find_stub_sec.
1164	(_bfd_aarch64_add_stub_entry_in_group): Rename from
1165	elfNN_aarch64_add_stub.  Call
1166	_bfd_aarch64_create_or_find_stub_sec.
1167	(elfNN_aarch64_size_stubs, elfNN_aarch64_size_stubs): Call
1168	_bfd_aarch64_add_stub_entry_in_group.
1169
11702015-03-23  Marcus Shawcroft  <marcus.shawcroft@arm.com>
1171
1172	* elfnn-aarch64.c (erratum_835769_scan) Add comment.  Reverse
1173	sense of boolean return.
1174	(elfNN_aarch64_size_stubs): Adjust for above.
1175
11762015-03-23  Marcus Shawcroft  <marcus.shawcroft@arm.com>
1177
1178	* elfnn-aarch64.c (elf_aarch64_create_or_find_stub_sec):
1179	Remove unused parameter.
1180	(elfNN_aarch64_size_stubs): Adjust for above.
1181
11822015-03-23  Marcus Shawcroft  <marcus.shawcroft@arm.com>
1183
1184	* elfnn-aarch64.c (elfNN_aarch64_size_stubs): Remove bfd_indx.
1185
11862015-03-23  Marcus Shawcroft  <marcus.shawcroft@arm.com>
1187
1188	* elfnn-aarch64.c (aarch64_erratum_835769_fixes)
1189	(num_aarch64_erratum_835769_fixes): Remove.
1190	(elfNN_aarch64_size_stubs): Remove assignments to above.
1191
11922015-03-23  Marcus Shawcroft  <marcus.shawcroft@arm.com>
1193
1194	* elfnn-aarch64.c (aarch64_mem_op_p): Update comment. Rename rtn
1195	to rt2.
1196	(aarch64_erratum_seqeunce): Rename rtn to rt2.
1197
11982015-03-23  Marcus Shawcroft  <marcus.shawcroft@arm.com>
1199
1200	* elfnn-aarch64.c (elfNN_aarch64_write_section): Adjust layout.
1201
12022015-03-19  Nick Clifton  <nickc@redhat.com>
1203
1204	* elf32-rl78.c (rl78_cpu_name): New function.  Prints the name of
1205	the RL78 core based upon the flags.
1206	(rl78_elf_merge_private_bfd_data): Handle merging of G13 and G14
1207	flags.
1208	(rl78_elf_print_private_bfd_data): Use rl78_cpu_name.
1209	(elf32_rl78_machine): Always return bfd_mach_rl78.
1210
12112015-03-19  Nick Clifton  <nickc@redhat.com>
1212
1213	PR 18078
1214	* compress.c (bfd_compress_section_contents): Do not define this
1215	function if it is not used.
1216
12172015-03-18  H.J. Lu  <hongjiu.lu@intel.com>
1218
1219	* compress.c (bfd_compress_section_contents): Make it static.
1220	* bfd/bfd-in2.h: Regenerated.
1221
12222015-03-18  Eric Youngdale  <eyoungdale@ptc.com>
1223
1224	PR ld/16598
1225	* peicode.h (pe_ILF_build_a_bfd): Add support for creating relocs
1226	suitable for the AMD64.
1227
12282015-03-18  Jon Turney  <jon.turney@dronecode.org.uk>
1229	    Nick Clifton  <nickc@redhat.com>
1230
1231	PR binutils/18087
1232	* coffgen.c (make_a_section_from_file): Only prepend a z to a
1233	debug section's name if the section was actually compressed.
1234	* elf.c (_bfd_elf_make_section_from_shdr): Likewise.
1235	* compress.c (bfd_init_section_compress_status): Do not compress
1236	the section if doing so would make it bigger.  In such cases leave
1237	the section alone and return COMPRESS_SECTION_NONE.
1238
12392015-03-17  Alan Modra  <amodra@gmail.com>
1240
1241	* elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Return count of 0
1242	on nothing to do, before malloc of returned symbol array.
1243
12442015-03-16  Nick Clifton  <nickc@redhat.com>
1245
1246	* elf32-rx.c (elf32_rx_relax_delete_bytes): If the relocs are not
1247	stored in the elf_section_data structure then load them as
1248	necessary.
1249
12502015-03-14  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
1251
1252	* elf-s390-common.c (elf_s390_elf_sort_relocs_p): Don't sort
1253	relocs against code sections.
1254	* elf32-s390.c: Define elf_backend_sort_relocs_p.
1255	* elf64-s390.c: Likewise.
1256
12572015-03-11  Alan Modra  <amodra@gmail.com>
1258
1259	* elf32-ppc.c (ppc_elf_get_synthetic_symtab): Examine stubs in
1260	reverse order.  Account for larger size of __tls_get_addr_opt stub.
1261
12622015-03-10  Yuri Gribov  <y.gribov@samsung.arm>
1263
1264	PR ld/16572
1265	* elf32-arm.c (elf32_arm_final_link_relocate): Remove support for
1266	ELF_ARM_HASENTRY.
1267	(elf32_arm_print_private_bfd_data): Likewise.
1268
12692015-03-06  Nick Clifton  <nickc@redhat.com>
1270
1271	PR binutils/17765
1272	* elflink.c (put_value): Like previous delta, but for the 32-bit
1273	case.
1274
12752015-03-05  Nick Clifton  <nickc@redhat.com>
1276
1277	PR binutils/17765
1278	* elflink.c (put_value): Avoid using an undefined shift
1279	operation.
1280
12812015-03-05  H.J. Lu  <hongjiu.lu@intel.com>
1282
1283	PR ld/pr15228
1284	PR ld/pr17709
1285	* elf-bfd.h (elf_backend_data): Add extern_protected_data.
1286	* elf32-i386.c (elf_backend_extern_protected_data): New.
1287	Defined to 1.
1288	* elf64-x86-64.c (elf_backend_extern_protected_data): Likewise.
1289	* elflink.c (_bfd_elf_adjust_dynamic_copy): Don't error on
1290	copy relocs against protected symbols if extern_protected_data
1291	is true.
1292	(_bfd_elf_symbol_refs_local_p): Don't return true on protected
1293	non-function symbols if extern_protected_data is true.
1294	* elfxx-target.h (elf_backend_extern_protected_data): New.
1295	Default to 0.
1296	(elfNN_bed): Initialize extern_protected_data with
1297	elf_backend_extern_protected_data.
1298
12992015-03-05  Nick Clifton  <nickc@redhat.com>
1300
1301	PR binutils/18025
1302	* coffgen.c (coff_find_nearest_line_with_names): If the dwarf2
1303	lookup fails, check for an address bias in the dwarf info, and if
1304	one exists, retry the lookup with the biased value.
1305	* dwarf2.c (_bfd_dwarf2_find_symbol_bias): New function.
1306	Determines if a bias exists bewteen the addresses of functions
1307	based on DWARF information vs symbol table information.
1308	* libbfd-in.h (_bfd_dwarf2_find_symbol_bias): Prototype.
1309	* libbfd.h: Regenerate.
1310
13112015-03-04  Marcus Shawcroft  <marcus.shawcroft@arm.com>
1312
1313	* elfxx-aarch64.c (decode_add_imm, decode_movw_imm)
1314	(decode_tst_branch_ofs_14, decode_ld_lit_ofs_19)
1315	(decode_cond_branch_ofs_19, decode_branch_ofs_26): Remove.
1316
13172015-03-04  Marcus Shawcroft  <marcus.shawcroft@arm.com>
1318
1319	* elfnn-aarch64.c (aarch64_build_one_stub): Call abort.
1320	(aarch64_size_one_stub): Likewise.
1321	(aarch64_map_one_stub): Likewise.
1322
13232015-03-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1324
1325	* cpu-s390.c (N): New macro.
1326	(bfd_s390_31_arch): New.  Define only if default target word size
1327	is 64 bits.  Otherwise define...
1328	(bfd_390_64_arch): ...this.  Make static.
1329	(bfd_s390_arch): Define according to the default target word size.
1330	Let the 'next' field point to the alternate arch.
1331
13322015-03-04  Richard Sandiford  <richard.sandiford@arm.com>
1333
1334	PR gas/17843
1335	* elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Expect
1336	R_AARCH64_TLSLE_MOVW_TPREL_G0_NC and R_AARCH64_TLSLE_MOVW_TPREL_G1_NC
1337	to be used with MOVK rather than MOVZ.
1338
13392015-03-03  DJ Delorie  <dj@redhat.com>
1340
1341	* elf32-rl78.c (rl78_elf_relax_section): Only relax ADDR16's if
1342	there's a symbol.
1343
13442015-02-28  Alan Modra  <amodra@gmail.com>
1345
1346	* elf32-ppc.c (ppc_elf_tls_setup): Set no_tls_get_addr_opt if
1347	not PLT_NEW.
1348
13492015-02-27  H.J. Lu  <hongjiu.lu@intel.com>
1350
1351	* elf32-i386.c (need_convert_mov_to_lea): New.
1352	(elf_i386_check_relocs): Set need_convert_mov_to_lea if needed.
1353	(elf_i386_convert_mov_to_lea): Return TRUE if
1354	need_convert_mov_to_lea is unset.
1355	* elf64-x86-64.c (need_convert_mov_to_lea): New.
1356	(elf_x86_64_check_relocs): Set need_convert_mov_to_lea if needed.
1357	(elf_x86_64_convert_mov_to_lea): Return TRUE if
1358	need_convert_mov_to_lea is unset.
1359
13602015-02-27  Nick Clifton  <nickc@redhat.com>
1361
1362	PR binutils/17910
1363	* coffgen.c (_bfd_coff_internal_syment_name): Only check for
1364	string length overflow when the string table length is actually
1365	set.
1366
13672015-02-27  Marcus Shawcroft  <marcus.shawcroft@arm.com>
1368
1369	* bfd/bfd-in2.h: Regenerate.
1370	* bfd/libbfd.h: Regenerate.
1371
13722015-02-26  Marcus Shawcroft  <marcus.shawcroft@arm.com>
1373
1374	* elfnn-aarch64.c (elfNN_aarch64_howto_table): Fix
1375	TLSDESC_LD_PREL19 field width and masks.
1376	(aarch64_tls_transition_without_check)
1377	(aarch64_reloc_got_type, elfNN_aarch64_final_link_relocate)
1378	(elfNN_aarch64_tls_relax, elfNN_aarch64_relocate_section)
1379	(elfNN_aarch64_gc_sweep_hook, elfNN_aarch64_check_relocs): Handle
1380	BFD_RELOC_AARCH64_TLSDESC_LD_PREL19.
1381	* elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
1382	(_bfd_aarch64_elf_resolve_relocation): Likewise.
1383
13842015-02-26  Marcus Shawcroft  <marcus.shawcroft@arm.com>
1385
1386	* elfnn-aarch64.c (IS_AARCH64_TLSDESC_RELOC): Reorder R_TYPE
1387	tests.
1388	(aarch64_tls_transition_without_check)
1389	(aarch64_reloc_got_type, elfNN_aarch64_final_link_relocate)
1390	(elfNN_aarch64_tls_relax, elfNN_aarch64_relocate_section)
1391	(elfNN_aarch64_gc_sweep_hook, elfNN_aarch64_check_relocs): Handle
1392	BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21.
1393	* elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
1394	(_bfd_aarch64_elf_resolve_relocation): Likewise.
1395	* reloc.c (BFD_RELOC_AARCH64_TLSGD_ADR_PREL21): Define.
1396
13972015-02-26  Marcus Shawcroft  <marcus.shawcroft@arm.com>
1398
1399	* elfnn-aarch64.c (IS_AARCH64_TLS_RELOC)
1400	(elfNN_aarch64_howto_table, aarch64_tls_transition_without_check)
1401	(aarch64_reloc_got_type, elfNN_aarch64_final_link_relocate)
1402	(elfNN_aarch64_tls_relax, elfNN_aarch64_relocate_section)
1403	(elfNN_aarch64_gc_sweep_hook, elfNN_aarch64_check_relocs): Handle
1404	BFD_RELOC_AARCH64_TLSGD_ADR_PREL21.
1405	* elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
1406	(_bfd_aarch64_elf_resolve_relocation): Likewise.
1407	* reloc.c (BFD_RELOC_AARCH64_TLSGD_ADR_PREL21): Define.
1408
14092015-02-26  Marcus Shawcroft  <marcus.shawcroft@arm.com>
1410
1411	* elfnn-aarch64.c: (TLSIE_LD_GOTTREL_PREL19): Fix HOWTO bit field width.
1412	(aarch64_tls_transition_without_check, aarch64_reloc_got_type)
1413	(elfNN_aarch64_final_link_relocate, elfNN_aarch64_tls_relax)
1414	(elfNN_aarch64_relocate_section, elfNN_aarch64_gc_sweep_hook)
1415	(elfNN_aarch64_check_relocs): Handle
1416	BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19.
1417
1418	* elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
1419	(_bfd_aarch64_elf_resolve_relocation): Likewise.
1420
14212015-02-26  Marcus Shawcroft  <marcus.shawcroft@arm.com>
1422
1423	* elfnn-aarch64.c: (TLSDESC_CALL): Fix HOWTO bit field width.
1424
14252015-02-26  Marcus Shawcroft  <marcus.shawcroft@arm.com>
1426
1427	* elfnn-aarch64.c (TLSLE_MOVW_TPREL_G2)
1428	(TLSLE_MOVW_TPREL_G1, TLSLE_MOVW_TPREL_G1_NC)
1429	(TLSLE_MOVW_TPREL_G0, TLSLE_MOVW_TPREL_G0_NC): Fix bit field
1430	width.
1431
14322015-02-26  Marcus Shawcroft  <marcus.shawcroft@arm.com>
1433
1434	* elfnn-aarch64.c: (TLSIE_MOVW_GOTTPREL_G0_NC): Fix HOWTO bit
1435	field width.
1436
14372015-02-26  Nick Clifton  <nickc@redhat.com>
1438
1439	PR binutils/17512
1440	* coffcode.h (coff_compute_section_file_positions): Report
1441	negative page sizes.
1442	* elf.c (elf_fake_sections): Handle excessive alignmment powers.
1443	(assign_file_positions_for_non_load_sections): Replace assertion
1444	with an error message.
1445	(rewrite_elf_program_header): Handle excessive segment
1446	alignments.
1447	* mach-o.c (bfd_mach_o_read_section_32): Likewise.
1448	(bfd_mach_o_read_section_64): Likewise.
1449	* peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Use %B to
1450	print a bfd name, not %A.
1451
14522015-02-26  Alan Modra  <amodra@gmail.com>
1453
1454	* elf64-ppc.c (plt_stub_size, build_plt_stub): Don't build
1455	thread-safe stubs for iplt.
1456	(build_tls_get_addr_stub): Restore r2 immediately after call.
1457
14582015-02-26  Terry Guo  <terry.guo@arm.com>
1459
1460	* elf32-arm.c (elf32_arm_merge_eabi_attributes): Update how we
1461	merge Tag_ABI_HardFP_use.
1462
14632015-02-26  Alan Modra  <amodra@gmail.com>
1464
1465	* elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Heed -z nocopyreloc.
1466	Use text relocs rather than giving an error on trying to use
1467	.dynbss for protected shared lib vars.
1468	* elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
1469
14702015-02-25  Andrew Burgess  <andrew.burgess@embecosm.com>
1471
1472	* elf32-avr.c (struct elf_avr_section_data): New structure.
1473	(struct avr_relax_info): New structure.
1474	(elf_avr_new_section_hook): New function.
1475	(struct elf_avr_section_data): Add relax_info.
1476	(get_avr_relax_info): New function.
1477	(init_avr_relax_info): New function.
1478	(elf32_avr_relax_delete_bytes): Find next property record before
1479	deleting bytes.  When deleting don't move bytes beyond the next
1480	property record.
1481	(avr_elf32_assign_records_to_section): New function.
1482	(avr_property_record_compare): New function.
1483	(avr_load_all_property_sections): New function.
1484	(elf32_avr_relax_section): Load property data.  After relaxing the
1485	section, move any .align directives that have enough deleted bytes
1486	before them.
1487	(bfd_elf32_new_section_hook): Define.
1488
14892015-02-25  Andrew Burgess  <andrew.burgess@embecosm.com>
1490
1491	* elf32-avr.h (struct avr_property_header): New strucure.
1492	(avr_elf32_load_property_records): Declare.
1493	(avr_elf32_property_record_name): Declare.
1494	* elf32-avr.c: Add bfd_stdint.h include.
1495	(retrieve_local_syms): New function.
1496	(get_elf_r_symndx_section): New function.
1497	(get_elf_r_symndx_offset): New function.
1498	(internal_reloc_compare): New function.
1499	(struct avr_find_section_data): New structure.
1500	(avr_is_section_for_address): New function.
1501	(avr_find_section_for_address): New function.
1502	(avr_elf32_load_records_from_section): New function.
1503	(avr_elf32_load_property_records): New function.
1504	(avr_elf32_property_record_name): New function.
1505
15062015-02-25  Andrew Burgess  <andrew.burgess@embecosm.com>
1507
1508	* elf32-avr.h (AVR_PROPERTY_RECORD_SECTION_NAME): Define.
1509	(AVR_PROPERTY_RECORDS_VERSION): Define.
1510	(AVR_PROPERTY_SECTION_HEADER_SIZE): Define.
1511	(struct avr_property_record): New structure.
1512
15132015-02-24  Nick Clifton  <nickc@redhat.com>
1514
1515	* elf32-v850.c (v850_set_note): New function.  Creates a Renesas
1516	style note entry.
1517	(v850_elf_make_note_section): New function.  Creates a note
1518	section.
1519	(v850_elf_create_sections): New function.  Create a note section
1520	if one is not already present.
1521	(v850_elf_set_note): New function.  Adds a note to a bfd.
1522	(v850_elf_copy_private_bfd_data): New function.  Copies V850
1523	notes.
1524	(v850_elf_merge_notes): New function.  Merges V850 notes.
1525	(print_v850_note): New function.  Displays a V850 note.
1526	(v850_elf_print_notes): New function. Displays all notes attached
1527	to a bfd.
1528	(v850_elf_merge_private_bfd_data): Call v850_elf_merge_notes.
1529	(v850_elf_print_private_bfd_data): Call v850_elf_print_notes.
1530	(v850_elf_fake_sections): Set the type of the V850 note section.
1531	* bfd-in.h (v850_elf_create_sections): Add prototype.
1532	(v850_elf_set_note): Add prototype.
1533	* bfd-in2.h: Regenerate.
1534
15352015-02-24  Nick Clifton  <nickc@redhat.com>
1536
1537	* configure.ac (AC_CHECK_HEADERS): Add wctype.h.
1538	* configure: Regenerate.
1539	* config.in: Regenerate.
1540	* peXXigen.c: Include wctype.h if HAVE_WCTYPE_H is defined.
1541	(u16_mbtowc): Use wint_t types if HAVE_WCTYPE_H is defined.
1542	(rsrc_cmp): Use towlower instead of wcsncasecmp if HAVE_WCTYPE_H
1543	is defined.
1544
15452015-02-24  Nick Clifton  <nickc@redhat.com>
1546
1547	* pdp11.c (set_section_contents): Pad the .text and .data sections
1548	to their aligned sizes.
1549
15502015-02-23  Yoshinori Sato <ysato@users.sourceforge.jp>
1551
1552	* config.bfd: Add h8300-*-linux.
1553	* configure.ac: Add h8300_elf32_linux_vec.
1554	* configure: Regenerate.
1555	* elf32-h8300.c: Likewise.
1556	* targets.c(_bfd_target_vector): Likewise.
1557
15582015-02-23  Nick Clifton  <nickc@redhat.com>
1559
1560	PR 17914
1561	* cpu-w65.c: Correct typos in license notice.
1562
1563	PR 17940
1564	* elf32-msp430.c (msp430_elf_relax_delete_bytes): Adjust debug
1565	symbols at end of sections.  Adjust function sizes.
1566
15672015-02-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1568
1569	* elf-bfd.h (elfcore_write_s390_vxrs_low): Add prototype.
1570	(elfcore_write_s390_vxrs_high): Likewise.
1571	* elf.c (elfcore_grok_s390_vxrs_low): New function.
1572	(elfcore_grok_s390_vxrs_high): New function.
1573	(elfcore_grok_note): Call them.
1574	(elfcore_write_s390_vxrs_low): New function.
1575	(elfcore_write_s390_vxrs_high): New function.
1576	(elfcore_write_register_note): Call them.
1577
15782015-02-19  Branko Drevensek  <branko.drevensek@gmail.com>
1579
1580	PR 17995
1581	* verilog.c (verilog_write_record): Correct buffer size.
1582
15832015-02-19  Alan Modra  <amodra@gmail.com>
1584
1585	* elflink.c (_bfd_elf_define_linkage_sym): Set 'bed' earlier.
1586
15872015-02-19  Alan Modra  <amodra@gmail.com>
1588
1589	PR ld/4317
1590	* elflink.c (elf_link_input_bfd): Drop undefined local syms.
1591	(elf_link_output_extsym): Drop local and global undefined syms.
1592	Tidy.  Expand comment.
1593
15942015-02-17  Alan Modra  <amodra@gmail.com>
1595
1596	PR ld/17975
1597	* elflink.c (struct elf_outext_info): Remove need_second_pass
1598	and second_pass.
1599	(elf_link_output_extsym): Delete code handling second forced
1600	local pass.  Move code emitting NULL STT_FILE symbol later, so
1601	that it can be omitted if forced local is stripped.  Don't
1602	emit the NULL STT_FILE if no file symbols have been output.
1603	(bfd_elf_final_link): Remove second forced local pass.
1604	* elf32-ppc.c (add_stub_sym): Set linker_def on linker syms.
1605	(ppc_elf_size_dynamic_sections): Likewise.
1606	* elf64-ppc.c (ppc_build_one_stub): Likewise.
1607	(build_global_entry_stubs): Likewise.
1608	(ppc64_elf_build_stubs): Likewise.
1609
16102015-02-16  H.J. Lu  <hongjiu.lu@intel.com>
1611
1612	PR ld/17975
1613	* elflink.c (elf_link_output_extsym): Only check filesym_count
1614	when outputting a NULL FILE symbol.  Set second_pass_sym to
1615	h->forced_local && !h->root.linker_def.
1616
16172015-02-15  H.J. Lu  <hongjiu.lu@intel.com>
1618
1619	* elf32-i386.c (elf_i386_always_size_sections): Set root.linker_def
1620	on _TLS_MODULE_BASE_.
1621	* elf64-x86-64.c (elf_x86_64_always_size_sections): Likewise.
1622
16232015-02-15  Alan Modra  <amodra@gmail.com>
1624
1625	* dwarf2.c (read_rangelist): Correct buffer overflow check
1626	Whitespace throughout file.
1627
16282015-02-14  Alan Modra  <amodra@gmail.com>
1629
1630	PR ld/17973
1631	* bfd.c (struct bfd): Add lto_output.
1632	* linker.c (_bfd_handle_already_linked): Explicitly test for
1633	objects added by the lto plugin.
1634	* opncls.c (_bfd_new_bfd_contained_in): Copy lto_output and
1635	no_export flags from archive.
1636	* archive.c (open_nested_file): New function, setting lto_output
1637	and no_export, extracted from..
1638	(find_nested_archive): ..here.  Flip params.  Rename from
1639	_bfd_find_nested_archive.
1640	(_bfd_get_elt_at_filepos): Correct var typo.  Use open_nested_file.
1641	(_bfd_look_for_bfd_in_cache): Copy no_export.
1642	* elflink.c (elf_link_add_object_symbols): Remove now unnecessary
1643	my_archive->no_export test.
1644	(elf_link_input_bfd): Drop existing lto_output STT_FILE syms.
1645	Don't use the file name when adding lto_output STT_FILE sym.
1646	* bfd-in2.h: Regenerate.
1647
16482015-02-13  Alan Modra  <amodra@gmail.com>
1649
1650	PR binutils/17512
1651	* elf64-ppc.c (opd_entry_value): Tighten offset check.  Remove
1652	now redundant assert.
1653
16542015-02-12  Nick Clifton  <nickc@redhat.com>
1655
1656	PR binutils/17512
1657	* dwarf.c (read_1_byte, read_1_signed_byte, read_2_bytes)
1658	(read_4_bytes, read_8_bytes, read_n_bytes, read_string)
1659	(read_indirect_string, read_alt_indirect_string)
1660	(read_alt_indirect_ref, read_address, read_abbrevs)
1661	(read_attribute_value, read_attribute, decode_line_info)
1662	(find_abstract_instance_name, read_rangelist)
1663	(scan_unit_for_symbols, parse_comp_unit)
1664	(_bfd_dwarf2_find_nearest_line): Harden DWARF reading code.  Pass
1665	end pointers to reading functions and check for offsets taking
1666	pointers out of range.  Replace calls to read_*_leb128 with calls
1667	to safe_read_leb128.
1668
1669	(* elf64-ppc.c (opd_entry_value): Add a check for an overlarge
1670	offset.
1671	* syms.c (_bfd_stab_section_find_nearest_line): Add checks for
1672	computed file_name address being before the start of the string
1673	table.
1674
16752015-02-11  H.J. Lu  <hongjiu.lu@intel.com>
1676
1677	PR ld/17878
1678	* bfd.c (bfd_plugin_format): New.
1679	(bfd): Add plugin_format and plugin_dummy_bfd.
1680	* plugin.c (try_load_plugin): Take a pointer to bfd_boolean
1681	argument to return TRUE if any plugin is found.  Set plugin_format.
1682	(has_plugin): New.
1683	(bfd_plugin_target_p): New.
1684	(bfd_plugin_specified_p): Likewise.
1685	(bfd_plugin_target_p): Likewise.
1686	(register_ld_plugin_object_p): Likewise.
1687	(bfd_plugin_set_plugin): Set has_plugin.
1688	(load_plugin): Cache try_load_plugin result.
1689	(bfd_plugin_object_p): Try ld_plugin_object_p first.  Check
1690	plugin_format.
1691	* plugin.h (bfd_plugin_target_p): New.
1692	(bfd_plugin_specified_p): Likewise.
1693	(register_ld_plugin_object_p): Likewise.
1694	* bfd-in2.h: Regenerated.
1695
16962015-02-11  Pedro Alves  <palves@redhat.com>
1697
1698	* libbfd-in.h [__cplusplus]: Open extern "C" scope.
1699	* libcoff-in.h [__cplusplus]: Open extern "C" scope.
1700	* libbfd.h: Regenerate.
1701	* libcoff.h: Regenerate.
1702
1703	* elf-bfd.h [__cplusplus]: Wrap in extern "C".
1704	* mach-o.h [__cplusplus]: Wrap in extern "C".
1705	* som.h [__cplusplus]: Wrap in extern "C".
1706
17072015-02-10  Nick Clifton  <nickc@redhat.com>
1708
1709	PR binutils/17512
1710	* coffcode.h (styp_to_sec_flags): Use an unsigned long type to
1711	hold the flag bits.
1712	* peXXigen.c (pe_print_reloc): Use unsigned types to hold the
1713	size and number of relocs.
1714	(pe_print_debugdata): Use a 32-bit aligned buffer to store the
1715	codeview record.
1716	* versados.c (process_otr): Check the esdid value before using it
1717	to access the EDATA.
1718
17192015-02-09  Ed Maste  <emaste@freebsd.org>
1720
1721	* elf32-i386.c (elf_i386_get_plt_sym_val): Avoid incrementing
1722	uninitialized and unused variable.
1723	* elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
1724
17252015-02-09  Alan Modra  <amodra@gmail.com>
1726
1727	* elf32-ppc.c (ppc_elf_relocate_section): Don't segfault on NULL
1728	tls_sec.
1729	* elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1730	* elflink.c (elf_link_output_extsym): Don't assert on NULL tls_sec.
1731
17322015-02-09  Alan Modra  <amodra@gmail.com>
1733
1734	* elflink.c: Whitespace, formatting fixes.
1735	(elf_link_input_bfd): Clarify comment.
1736	(elf_link_output_extsym): Exclude symbols in linker created
1737	sections when testing for plugin symbols.
1738
17392015-02-07  H.J. Lu  <hongjiu.lu@intel.com>
1740
1741	PR ld/17935
1742	* elf32-i386.c (elf_i386_readonly_dynrelocs): Also issue a
1743	warning for relocation in readonly section for -z text.
1744	(elf_i386_size_dynamic_sections): Likewise.
1745	* elf64-x86-64.c (elf_x86_64_readonly_dynrelocs): Likewise.
1746	(elf_x86_64_size_dynamic_sections): Likewise.
1747
17482015-02-06  H.J. Lu  <hongjiu.lu@intel.com>
1749
1750	PR ld/12365
1751	PR ld/14272
1752	* elflink.c (_bfd_elf_fix_symbol_flags): Revert the last change.
1753	(elf_link_input_bfd): Mark the plugin symbol undefined if it is
1754	referenced from a non-IR file.
1755
17562015-02-06  Nick Clifton  <nickc@redhat.com>
1757
1758	PR binutils/17512
1759	* peXXigen.c (rsrc_print_resource_entries): Add range check for
1760	addresses that wrap around the address space.
1761	(rsrc_parse_entry): Likewise.
1762
17632015-02-03  H.J. Lu  <hongjiu.lu@intel.com>
1764
1765	PR ld/12365
1766	PR ld/14272
1767	* elflink.c (_bfd_elf_fix_symbol_flags): Mark the plugin symbol
1768	undefined if it is referenced from a non-IR file.
1769
17702015-02-03  Nick Clifton  <nickc@redhat.com>
1771
1772	PR binutils/17512
1773	* ecoff.c: Use bfd_alloc2 to allocate space for structure arrays.
1774	(_bfd_ecoff_slurp_symbol_table): Check for a negative symbol
1775	index or an out of range fdr index.
1776	* elf-m10300.c (mn10300_info_to_howto): Fix typo in error message.
1777	* elf32-arc.c (arc_info_to_howto_rel): Likewise.
1778	* elf32-avr.c (avr_info_to_howto_rela): Likewise.
1779	* elf32-cr16.c (elf_cr16_info_to_howto): Likewise.
1780	* elf32-cr16c.c (elf_cr16c_info_to_howto_rel): Likewise.
1781	* elf32-cris.c (cris_info_to_howto_rela): Likewise.
1782	* elf32-crx.c (elf_crx_info_to_howto): Likewise.
1783	* elf32-d10v.c (d10v_info_to_howto_rel): Likewise.
1784	* elf32-d30v.c (d30v_info_to_howto_rel): Likewise.
1785	* elf32-epiphany.c (epiphany_info_to_howto_rela): Likewise.
1786	* elf32-fr30.c (fr30_info_to_howto_rela): Likewise.
1787	* elf32-frv.c (frv_info_to_howto_rela): Likewise.
1788	* elf32-i370.c (i370_elf_info_to_howto): Likewise.
1789	* elf32-i960.c (elf32_i960_info_to_howto_rel): Likewise.
1790	* elf32-ip2k.c (ip2k_info_to_howto_rela): Likewise.
1791	* elf32-iq2000.c (iq2000_info_to_howto_rela): Likewise.
1792	* elf32-lm32.c (lm32_info_to_howto_rela): Likewise.
1793	* elf32-m32c.c (m32c_info_to_howto_rela): Likewise.
1794	* elf32-m32r.c (m32r_info_to_howto_rel): Likewise.
1795	* elf32-m68hc11.c (m68hc11_info_to_howto_rel): Likewise.
1796	* elf32-m68hc12.c (m68hc11_info_to_howto_rel): Likewise.
1797	* elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
1798	* elf32-mep.c (mep_info_to_howto_rela): Likewise.
1799	* elf32-metag.c (metag_info_to_howto_rela): Likewise.
1800	* elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
1801	* elf32-moxie.c (moxie_info_to_howto_rela): Likewise.
1802	* elf32-msp430.c (msp430_info_to_howto_rela): Likewise.
1803	* elf32-mt.c (mt_info_to_howto_rela): Likewise.
1804	* elf32-nds32.c (nds32_info_to_howto_rel): Likewise.
1805	* elf32-or1k.c (or1k_info_to_howto_rela): Likewise.
1806	* elf32-pj.c (pj_elf_info_to_howto): Likewise.
1807	* elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
1808	* elf32-rl78.c (rl78_info_to_howto_rela): Likewise.
1809	* elf32-rx.c (rx_info_to_howto_rela): Likewise.
1810	* elf32-sh.c (sh_elf_info_to_howto): Likewise.
1811	* elf32-spu.c (spu_elf_info_to_howto): Likewise.
1812	* elf32-v850.c (v850_elf_perform_relocation): Likewise.
1813	* elf32-vax.c (rtype_to_howto): Likewise.
1814	* elf32-visium.c (visium_info_to_howto_rela): Likewise.
1815	* elf32-xgate.c (xgate_info_to_howto_rel): Likewise.
1816	* elf32-xtensa.c (elf_xtensa_info_to_howto_rela): Likewise.
1817	* elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
1818	* elf64-mmix.c (mmix_info_to_howto_rela): Likewise.
1819	* mach-o.c: Use bfd_alloc2 to allocate space for structure arrays.
1820	(bfd_mach_o_canonicalize_one_reloc): Fix check on out
1821	of range symbol indicies.
1822	(bfd_mach_o_canonicalize_relocs): Check for out of range alloc.
1823	(bfd_mach_o_canonicalize_dynamic_reloc): Likewise.
1824	(bfd_mach_o_build_dysymtab): Likewise.
1825	(bfd_mach_o_write_symtab_content): Set the string table size to
1826	zero upon error.
1827	(bfd_mach_o_read_symtab_symbols): Reset the nsyms value if the
1828	read fails.
1829	* peXXigen.c (pe_print_edata):  Check for numeric overflow in edt
1830	fields.
1831	* tekhex.c (first_phase): Check for src pointer reaching end of
1832	buffer.
1833
18342015-02-03  Will Newton  <will.newton@linaro.org>
1835
1836	* elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol):
1837	Set st_value to zero for undefined symbols if the reference
1838	is weak or pointer_equality_needed is FALSE.
1839
1840	* elf32-arm.c (elf32_arm_finish_dynamic_symbol): Improve
1841	  comment discussing why we clear st_value for some symbols.
1842
18432015-02-02  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
1844
1845	* elf32-nds32.c (nds32_get_section_contents): Add one more argument.
1846	(nds32_elf_relocate_section): Do not relocate R_NDS32_LONGJUMP7.
1847
18482015-01-29  Alan Modra  <amodra@gmail.com>
1849
1850	* elf64-ppc.c (ppc64_elf_relocate_section): Correct GOT_TLSLD
1851	optimization.  Tidy mask for GOT_TLSGD optimization.
1852	* elf32-ppc.c (ppc_elf_relocate_section): Likewise.  Correct
1853	location of nop zapping high insn too.
1854
18552015-01-28  Alan Modra  <amodra@gmail.com>
1856
1857	* elf64-ppc.h (struct ppc64_elf_params): Add "object_in_toc".
1858	* elf64-ppc.c (ppc64_elf_add_symbol_hook): Assume that global symbols
1859	in .toc indicate xlc compiled code that might require a rw .toc.
1860
18612015-01-28  James Bowman  <james.bowman@ftdichip.com>
1862
1863	* Makefile.am: Add FT32 files.
1864	* archures.c (enum bfd_architecture): Add bfd_arch_ft32.
1865	(bfd_mach_ft32): Define.
1866	(bfd_ft32_arch): Declare.
1867	(bfd_archures_list): Add bfd_ft32_arch.
1868	* config.bfd: Handle FT32.
1869	* configure.ac: Likewise.
1870	* cpu-ft32.c: New file.
1871	* elf32-ft32.c: New file.
1872	* reloc.c (BFD_RELOC_FT32_10, BFD_RELOC_FT32_20, BFD_RELOC_FT32_17,
1873	BFD_RELOC_FT32_18): Define.
1874	* targets.c (_bfd_target_vector): Add ft32_elf32_vec.
1875	* bfd-in2.h: Regenerate.
1876	* libbfd.h: Regenerate.
1877	* Makefile.in: Regenerate.
1878	* configure: Regenerate.
1879	* po/SRC-POTFILES.in: Regenerate.
1880
18812015-01-27  Nick Clifton  <nickc@redhat.com>
1882
1883	PR binutils/17512
1884	* pdp11.c (aout_get_external_symbols): Return false if there are
1885	no symbols.
1886
1887	* dwarf2.c (concat_filename): Check for an empty directory table.
1888	(scan_unit_for_symbols): Check for reading off the end of the
1889	unit.
1890	(parse_comp_unit): Check for a DW_AT_comp_dir attribute with a
1891	non-string form.
1892	* elf64-ppc.c (opd_entry_value): Fail if there are no relocs
1893	available.
1894
18952015-01-26  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
1896
1897	* elf32-nds32.c (nds32_elf_pick_relax): Fix again setting.
1898
18992015-01-22  DJ Delorie  <dj@redhat.com>
1900
1901	* elf32-m32c.c (m32c_apply_reloc_24): New.
1902	(m32c_elf_howto_table): Use it for R_M32C_24.
1903	(m32c_elf_relocate_section): Handle R_M32C_24 specially.
1904
19052015-01-22  Nick Clifton  <nickc@redhat.com>
1906
1907	PR binutils/17512
1908	* coffcode.h (handle_COMDAT): When searching for the section
1909	symbol, make sure that there is space left in the symbol table.
1910	* vms-alpha.c (_bfd_vms_slurp_ehdr): Add range checks.
1911
19122015-01-21  Nick Clifton  <nickc@redhat.com>
1913
1914	PR binutils/17512
1915	* coffcode.h (coff_set_arch_mach_hook): Check return value from
1916	bfd_malloc.
1917	(coff_slurp_line_table): Return FALSE if the line number
1918	information was corrupt.
1919	(coff_slurp_symbol_table): Return FALSE if the symbol information
1920	was corrupt.
1921	* mach-o.c (bfd_mach_o_bfd_copy_private_header_data): Always
1922	initialise the fields of the dyld_info structure.
1923	(bfd_mach_o_build_exec_seg_command): Replace assertion with an
1924	error message and a return value.
1925	(bfd_mach_o_layout_commands): Change the function to boolean.
1926	Return FALSE if the function fails.
1927	(bfd_mach_o_build_commands): Fail if bfd_mach_o_layout_commands
1928	fails.
1929	(bfd_mach_o_read_command): Fail if an unrecognised command is
1930	encountered.
1931	* peXXigen.c (_bfd_XXi_swap_aouthdr_in): Set bfd_error if the
1932	read fails.
1933	(slurp_symtab): Check the return from bfd_malloc.
1934	(_bfd_XX_bfd_copy_private_bfd_data_common): Fail if the copy
1935	encountered an error.
1936	(_bfd_XXi_final_link_postscript): Fail if a section could not be
1937	copied.
1938	* peicode.h (pe_bfd_object_p): Fail if the header could not be
1939	swapped in.
1940	* tekhex.c (first_phase): Fail if the section is too big.
1941	* versados.c (struct esdid): Add content_size field.
1942	(process_otr): Use and check the new field.
1943	(versados_get_section_contents): Check that the section exists and
1944	that the requested data is available.
1945
19462015-01-20  Chung-Lin Tang  <cltang@codesourcery.com>
1947
1948	* elf32-nios2.c (elf_backend_default_execstack): Define as 0.
1949
19502015-01-20  Alan Modra  <amodra@gmail.com>
1951
1952	PR ld/17615
1953	* elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Don't drop
1954	ELF_COMMON_DEF syms.
1955
19562015-01-19  Alan Modra  <amodra@gmail.com>
1957
1958	PR ld/17615
1959	* elf-bfd.h (ELF_COMMON_DEF_P): Note that this might be true for
1960	linker script assignments too.
1961	* elflink.c (elf_gc_sweep_symbol): Don't drop ELF_COMMON_DEF syms.
1962	(bfd_elf_gc_mark_dynamic_ref_symbol): Similarly.
1963
19642015-01-19  Alan Modra  <amodra@gmail.com>
1965
1966	* elf32-bfin.c (bfin_bfd_reloc_type_lookup): Correct loop iteration
1967	to allow return of first howto.
1968	* elf32-fr30.c (fr30_reloc_type_lookup): Likewise.
1969	* elf32-m32c.c (m32c_reloc_type_lookup): Likewise.
1970	* elf32-moxie.c (moxie_reloc_type_lookup): Likewise.
1971	* elf32-or1k.c (or1k_reloc_type_lookup): Likewise.
1972	* elf32-rl78.c (rl78_reloc_type_lookup): Likewise.
1973	* elf32-rx.c (rx_reloc_type_lookup): Likewise.
1974	* elf32-tilepro.c (tilepro_reloc_type_lookup): Likewise.
1975	* elf32-xstormy16.c (xstormy16_reloc_type_lookup): Likewise.
1976	* elfxx-tilegx.c (tilegx_reloc_type_lookup): Likewise.
1977	* elf32-nios2.c (nios2_reloc_map): Add mapping for R_NIOS2_NONE.
1978	* elf32-spu.c (spu_elf_bfd_to_reloc_type): Allow return of R_SPU_NONE.
1979	(spu_elf_reloc_type_lookup): Adjust to suit.
1980
19812015-01-19  Alan Modra  <amodra@gmail.com>
1982
1983	* bfd-in.h (bfd_get_section_limit_octets): New define, extracted from..
1984	(bfd_get_section_limit): ..here.
1985	* reloc.c (bfd_perform_relocation): Correct bfd_reloc_outofrange check.
1986	(bfd_install_relocation, _bfd_final_link_relocate): Add same check here.
1987	* elf32-sh.c (sh_elf_reloc): Correct bfd_reloc_outofrange check.
1988	* elf32-ppc.c (ppc_elf_addr16_ha_reloc): Remove duplicated
1989	bfd_reloc_outofrange check.
1990	* bfd-in2.h: Regenerate.
1991
1992	* cpu-ns32k.c (_bfd_do_ns32k_reloc_contents): Return bfd_reloc_ok
1993	on zero size relocs.
1994	* ecoff.c (ecoff_reloc_link_order): Likewise.
1995	* elf32-nds32.c (nds32_relocate_contents): Likewise.
1996	* elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
1997
1998	* reloc.c (_bfd_relocate_contents): Don't bomb on zero size relocs.
1999	(_bfd_clear_contents): Likewise.
2000	* elfxx-mips.c (mips_elf_obtain_contents): Likewise.
2001	(mips_elf_perform_relocation): Likewise.
2002
2003	* aoutx.h (aout_link_reloc_link_order): Allow for NULL return
2004	from malloc on zero size alloc.
2005	* cofflink.c (_bfd_coff_reloc_link_order): Likewise.
2006	* elflink.c (elf_reloc_link_order): Likewise.
2007	* linker.c (_bfd_generic_reloc_link_order): Likewise.
2008	* pdp11.c (aout_link_reloc_link_order): Likewise.
2009	* xcofflink.c (xcoff_reloc_link_order): Likewise.
2010
2011	* aoutx.h (howto_table_ext): Ensure NONE relocs have size 3,
2012	bitsize 0, and complain_overflow_dont.
2013	* coff-sparc.c (coff_sparc_howto_table): Likewise.
2014	* elf-hppa.h (elf_hppa_howto_table): Likewise.
2015	* elf-m10200.c (elf_mn10200_howto_table): Likewise.
2016	* elf-m10300.c (elf_mn10300_howto_table): Likewise.
2017	* elf32-arc.c (elf_arc_howto_table): Likewise.
2018	* elf32-arm.c (elf32_arm_howto_table_1): Likewise.
2019	* elf32-avr.c (elf_avr_howto_table): Likewise.
2020	* elf32-bfin.c (bfin_howto_table): Likewise.
2021	* elf32-cr16.c (cr16_elf_howto_table): Likewise.
2022	* elf32-cris.c (cris_elf_howto_table): Likewise.
2023	* elf32-crx.c (crx_elf_howto_table): Likewise.
2024	* elf32-d10v.c (elf_d10v_howto_table): Likewise.
2025	* elf32-d30v.c (elf_d30v_howto_table): Likewise.
2026	* elf32-dlx.c (dlx_elf_howto_table): Likewise.
2027	* elf32-epiphany.c (epiphany_elf_howto_table): Likewise.
2028	* elf32-fr30.c (fr30_elf_howto_table): Likewise.
2029	* elf32-frv.c (elf32_frv_howto_table): Likewise.
2030	* elf32-h8300.c (h8_elf_howto_table): Likewise.
2031	* elf32-i370.c (i370_elf_howto_raw): Likewise.
2032	* elf32-i386.c (elf_howto_table): Likewise.
2033	* elf32-i860.c (elf32_i860_howto_table): Likewise.
2034	* elf32-i960.c (elf32_i960_relocate): Likewise.
2035	* elf32-ip2k.c (ip2k_elf_howto_table): Likewise.
2036	* elf32-iq2000.c (iq2000_elf_howto_table): Likewise.
2037	* elf32-lm32.c (lm32_elf_howto_table): Likewise.
2038	* elf32-m32c.c (m32c_elf_howto_table): Likewise.
2039	* elf32-m32r.c (m32r_elf_howto_table): Likewise.
2040	* elf32-m68hc11.c (elf_m68hc11_howto_table): Likewise.
2041	* elf32-m68hc12.c (elf_m68hc11_howto_table): Likewise.
2042	* elf32-m68k.c (howto_table): Likewise.
2043	* elf32-mcore.c (mcore_elf_howto_raw): Likewise.
2044	* elf32-mep.c (mep_elf_howto_table): Likewise.
2045	* elf32-metag.c (elf_metag_howto_table): Likewise.
2046	* elf32-microblaze.c (microblaze_elf_howto_raw): Likewise.
2047	* elf32-mips.c (elf_mips_howto_table_rel): Likewise.
2048	* elf32-moxie.c (moxie_elf_howto_table): Likewise.
2049	* elf32-msp430.c (elf_msp430_howto_table): Likewise.
2050	* elf32-mt.c (mt_elf_howto_table): Likewise.
2051	* elf32-nds32.c (nds32_elf_howto_table): Likewise.
2052	* elf32-nios2.c (elf_nios2_howto_table_rel): Likewise.
2053	* elf32-or1k.c (or1k_elf_howto_table): Likewise.
2054	* elf32-pj.c (pj_elf_howto_table): Likewise.
2055	* elf32-ppc.c (ppc_elf_howto_raw): Likewise.
2056	* elf32-rl78.c (rl78_elf_howto_table): Likewise.
2057	* elf32-rx.c (rx_elf_howto_table): Likewise.
2058	* elf32-s390.c (elf_howto_table): Likewise.
2059	* elf32-score.c (elf32_score_howto_table): Likewise.
2060	* elf32-score7.c (elf32_score_howto_table): Likewise.
2061	* elf32-sh-relocs.h (R_SH_NONE): Likewise.
2062	* elf32-spu.c (elf_howto_table): Likewise.
2063	* elf32-tic6x.c (elf32_tic6x_howto_table): Likewise.
2064	* elf32-tilepro.c (tilepro_elf_howto_table): Likewise.
2065	* elf32-v850.c (v850_elf_howto_table): Likewise.
2066	* elf32-vax.c (howto_table): Likewise.
2067	* elf32-visium.c (visium_elf_howto_table): Likewise.
2068	* elf32-xc16x.c (xc16x_elf_howto_table): Likewise.
2069	* elf32-xgate.c (elf_xgate_howto_table): Likewise.
2070	* elf32-xstormy16.c (xstormy16_elf_howto_table): Likewise.
2071	* elf32-xtensa.c (elf_howto_table): Likewise.
2072	* elf64-alpha.c (elf64_alpha_howto_table): Likewise.
2073	* elf64-mips.c (mips_elf64_howto_table_rel): Likewise.
2074	* elf64-mmix.c (elf_mmix_howto_table): Likewise.
2075	* elf64-ppc.c (ppc64_elf_howto_raw): Likewise.
2076	* elf64-s390.c (elf_howto_table): Likewise.
2077	* elf64-sh64.c (sh_elf64_howto_table): Likewise.
2078	* elf64-x86-64.c (x86_64_elf_howto_table): Likewise.
2079	* elfn32-mips.c (elf_mips_howto_table_rel): Likewise.
2080	* elfnn-aarch64.c (elfNN_aarch64_howto_table): Likewise.
2081	(elfNN_aarch64_howto_none): Likewise.
2082	* elfxx-ia64.c (ia64_howto_table): Likewise.
2083	* elfxx-sparc.c (_bfd_sparc_elf_howto_table): Likewise.
2084	* elfxx-tilegx.c (tilegx_elf_howto_table): Likewise.
2085	* nlm32-sparc.c (nlm32_sparc_howto_table): Likewise.
2086
20872015-01-15  H.J. Lu  <hongjiu.lu@intel.com>
2088
2089	PR ld/17847
2090	* elf64-x86-64.c (elf_x86_64_relocate_section): Don't complain
2091	about -fPIC if the symbol is undefined when building executable.
2092
20932015-01-15  Nick Clifton  <nickc@redhat.com>
2094
2095	PR binutils/17512
2096	* elf-m10300.c (mn10300_info_to_howto): Replace assertion with an
2097	error message.  Never return an invalid howto pointer.
2098	* elf32-cr16.c (cr16_info_to_howto): Likewise.
2099	* elf32-crx.c (elf_crx_info_to_howto): Likewise.
2100	* elf32-i370.c (i370_elf_info_to_howto): Likewise.
2101	* elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
2102	* elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
2103	* elf32-mips.c (mips_elf32_rtype_to_howto): Likewise.
2104	* elf32-pj.c (pj_elf_info_to_howto): Likewise.
2105	* elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
2106	* elf32-spu.c (spu_elf_info_to_howto): Likewise.
2107	* elf32-v850.c (v850_elf_info_to_howto_rela): Likewise.
2108	* elf32-vax.c (rtype_to_howto): Likewise.
2109	* elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
2110	* elf64-mips.c (mips_elf64_rtype_to_howto): Likewise.
2111	* elfn32-mips.c (sh_elf_info_to_howto): Likewise.
2112	* elf32-sh.c (sh_elf_info_to_howto): Likewise.
2113	(sh_elf_reloc): Check that the reloc is in range.
2114	* reloc.c (bfd_perform_relocation): Check that the section is big
2115	enough for the entire reloc.
2116	(bfd_generic_get_relocated_section_contents): Report unexpected
2117	return values from perform_reloc.
2118
21192015-01-15  Nick Clifton  <nickc@redhat.com>
2120
2121	* elf32-msp430.c (msp430_elf_relax_section): Skip unhandled
2122	relocs.  Include PC-relative adjustment for R_MSP430X_ABS16
2123	relaxation.
2124
21252015-01-15  Alan Modra  <amodra@gmail.com>
2126
2127	* elflink.c (_bfd_elf_link_omit_section_dynsym): Return true for
2128	any output section matching a linker created dynobj section.
2129
21302015-01-15  Alan Modra  <amodra@gmail.com>
2131
2132	PR 17842
2133	* elflink.c (elf_link_output_sym): Assert elf_onesymtab set.
2134	(bfd_elf_final_link): Always create a symbol table when emit_relocs.
2135	Don't assign symtab file position unless symbols will be output.
2136	Merge blocks with condition in common.  Don't call
2137	elf_backend_output_arch_local_syms or elf_backend_output_arch_syms
2138	unless other symbols are output.  Move assignment of symtab_shndx
2139	file position.  Localize variable.
2140
21412015-01-14  Jiong Wang  <jiong.wang@arm.com>
2142
2143	* elf32-arm.c (elf32_arm_final_link_relocate): Reject R_ARM_32/_NOI when
2144	trying to defer them to runtime.
2145
21462015-01-13  Thomas Preud'homme <thomas.preudhomme@arm.com>
2147
2148	* elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use SYMBOLIC_BIND
2149	to check if a symbol should be bound symbolically.
2150
21512015-01-13  Jiong Wang  <jiong.wang@arm.com>
2152
2153	* elfnn-aarch64.c: (elfNN_aarch64_howto_table): Enable overflow check
2154	for TLSLE_MOVW_TPREL_G2.
2155
21562015-01-13  Jiong Wang  <jiong.wang@arm.com>
2157
2158	PR ld/17415
2159	* elfnn-aarch64.c (elfNN_aarch64_howto_table): Mark
2160	R_AARCH64_TLSLE_ADD_TPREL_HI12 as complain_overflow_unsigned.
2161	* elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Correct the
2162	bit mask.
2163
21642015-01-12  Terry Guo  <terry.guo@arm.com>
2165
2166	* elflink.c (_bfd_elf_gc_mark_debug_special_section_group): New
2167	function.
2168	(_bfd_elf_gc_mark_extra_sections): Use it.
2169
21702015-01-11  H.J. Lu  <hongjiu.lu@intel.com>
2171
2172	PR ld/17827
2173	* elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): For PIE,
2174	only discard space for pc-relative relocs symbols which turn
2175	out to need copy relocs.
2176
21772015-01-09  Nick Clifton  <nickc@redhat.com>
2178
2179	* tekhex.c (getvalue): Fix thinko in test for correct extraction
2180	of value.
2181	(getsym): Return false if there was not enough data to extract the
2182	symbol.
2183
21842015-01-09  Anthony Green  <green@moxielogic.com>
2185
2186	* elf32-moxie.c (ELF_MACHINE_ALT1): Define.
2187
21882015-01-08  Nick Clifton  <nickc@redhat.com>
2189
2190	* elf32-msp430.c (msp430_elf_relax_section): Add relaxation of
2191	16-bit absolute BR instructions to 10-bit pc-relative JMP
2192	instructions.
2193
21942015-01-08  Nick Clifton  <nickc@redhat.com>
2195
2196	PR binutils/17512
2197	* coffcode.h (coff_slurp_symbol_table): Return false if we failed
2198	to load the line table.
2199	* elf.c (_bfd_elf_map_sections_to_segments): Enforce a minimum
2200	maxpagesize of 1.
2201	* peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Fail if
2202	the Data Directory Size is too large.
2203
22042015-01-06  H.J. Lu  <hongjiu.lu@intel.com>
2205
2206	PR binutils/17512
2207	* elf32-i386.c (elf_i386_get_plt_sym_val): Skip unknown relocation.
2208	* elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
2209
22102015-01-06  Nick Clifton  <nickc@redhat.com>
2211
2212	PR binutils/17512
2213	* mach-o.c (bfd_mach_o_read_symtab_strtab): Zero terminate the
2214	string table.
2215
2216	* reloc.c (bfd_get_reloc_size): Handle a reloc size of -1.
2217	(bfd_perform_relocation): Include the size of the reloc in the
2218	test for an out of range relocation.
2219	(bfd_generic_get_relocated_section_contents): Remove reloc range
2220	test.
2221
2222	* coff-i860.c (CALC_ADDEND): Always set an addend value.
2223	* tekhex.c (getvalue): Add an end pointer parameter.  Use it to
2224	avoid reading off the end of the buffer.
2225	(getsym): Likewise.
2226	(first_phase): Likewise.
2227	(pass_over): Pass an end pointer to the invoked function.
2228
22292015-01-05  H.J. Lu  <hongjiu.lu@intel.com>
2230
2231	PR binutils/17512
2232	* elf32-i386.c (elf_i386_get_plt_sym_val): Return NULL on corrupt
2233	input.
2234	* elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
2235
22362015-01-05  Nick Clifton  <nickc@redhat.com>
2237
2238	PR binutils/17512
2239	* archive.c (do_slurp_bsd_armap): Make sure that the parsed sized
2240	is at least big enough for the header to be read.
2241	* elf32-i386.c (elf_i386_get_plt_sym_val): Skip unknown relocs.
2242	* mach-o.c (bfd_mach_o_get_synthetic_symtab): Add range checks.
2243	(bfd_mach_o_read_command): Prevetn duplicate error messages about
2244	unrecognized commands.
2245	* syms.c (_bfd_stab_section_find_nearest_line): Add range checks
2246	when indexing into the string table.
2247
22482015-01-01  Alan Modra  <amodra@gmail.com>
2249
2250	Update year range in copyright notice of all files.
2251
2252For older changes see ChangeLog-2014
2253
2254Copyright (C) 2015 Free Software Foundation, Inc.
2255
2256Copying and distribution of this file, with or without modification,
2257are permitted in any medium without royalty provided the copyright
2258notice and this notice are preserved.
2259
2260Local Variables:
2261mode: change-log
2262left-margin: 8
2263fill-column: 74
2264version-control: never
2265End:
2266