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