9f5c9a11f05d097284cdb41012a2cfdd2c5aa6f2
[deliverable/binutils-gdb.git] / bfd / ChangeLog
1 2017-07-04 Tristan Gingold <gingold@adacore.com>
2
3 * version.m4: Bump version to 2.29.51
4 * configure: Regenerate.
5
6 2017-07-04 Jiong Wang <jiong.wang@arm.com>
7
8 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Remove the
9 sanity check at the head of this function.
10
11 2017-07-04 Jan Kratochvil <jan.kratochvil@redhat.com>
12
13 * dwarf2.c (struct dwarf2_debug): Add fields dwarf_line_str_buffer and
14 dwarf_line_str_size.
15 (struct attr_abbrev): Add field implicit_const.
16 (dwarf_debug_sections): Add .debug_line_str.
17 (enum dwarf_debug_section_enum): Add debug_line_str and debug_max.
18 (dwarf_debug_section_assert): Add static assertion.
19 (read_indirect_line_string): New.
20 (read_abbrevs): Support DW_FORM_implicit_const.
21 (is_str_attr): Support DW_FORM_line_strp.
22 (read_attribute_value): Support DW_FORM_line_strp and
23 DW_FORM_implicit_const.
24 (read_attribute): Support DW_FORM_implicit_const.
25 (line_info_add_include_dir, line_info_add_include_dir_stub):
26 (line_info_add_file_name, read_formatted_entries): New.
27 (decode_line_info, parse_comp_unit): Support DWARF 5.
28 (_bfd_dwarf2_cleanup_debug_info): Free dwarf_line_str_buffer.
29
30 2017-07-03 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
31
32 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove the
33 abort statement that was put for symbols that are not dynamic.
34
35 2017-07-03 Tristan Gingold <gingold@adacore.com>
36
37 * po/bfd.pot: Regenerate
38
39 2017-07-03 Alan Modra <amodra@gmail.com>
40
41 * bfd.c (_doprnt): Rewrite "ll" and "L" modifiers to "I64" for
42 __MSVCRT__. Support "L" modifier for bfd_vma. Formatting.
43 * elf.c (setup_group): Use "Lx" to print sh_size.
44 (_bfd_elf_setup_sections): Remove unnecessary cast and print
45 unknown section type in hex.
46 (copy_special_section_fields): Style fix.
47 (bfd_section_from_shdr): Correct format for sh_link. Use a
48 common error message for all the variants of unrecognized
49 section types.
50 (assign_file_positions_for_load_sections): Use "Lx" for lma
51 adjust error message.
52 (assign_file_positions_for_non_load_sections): Formatting.
53 (rewrite_elf_program_header): Formatting. Use "Lx" for
54 bfd_vma values in error messages.
55 * elfcode.h (elf_slurp_reloc_table_from_section): Cast
56 ELF_R_SYM value to type expected by format.
57 * elflink.c (elf_link_read_relocs_from_section): Use "Lx"
58 in error messages.
59 (elf_link_add_object_symbols): Use "Lu" for symbol sizes.
60 (elf_link_input_bfd): Use "Lx" for r_info.
61 (bfd_elf_gc_record_vtinherit): Use "Lx" for offset.
62
63 2017-07-03 Alan Modra <amodra@gmail.com>
64
65 * bfd.c (bfd_scan_vma): Don't use long long unless HAVE_LONG_LONG.
66 * coff-rs6000.c (FMT20): Handle hosts with 64-bit long and
67 Microsoft C library variant of long long format specifier.
68 (PRINT20): Cast value to bfd_uint64_t not long long.
69 * coffcode.h (coff_print_aux): Use BFD_VMA_FMT.
70 * coff-x86_64.c (coff_amd64_reloc): Use bfd_uint64_t rather than
71 long long. Don't cast to bfd_vma.
72 * elf32-score.c (score3_bfd_getl48): Likewise.
73 * vms-alpha.c (_bfd_vms_slurp_eisd): Likewise.
74
75 2017-07-03 Alan Modra <amodra@gmail.com>
76
77 * elf.c (_bfd_elf_print_private_bfd_data): Use BFD_VMA_FMT to
78 print d_tag.
79 (bfd_elf_print_symbol): Don't cast symbol->flags.
80 (_bfd_elf_symbol_from_bfd_symbol): Likewise.
81 * elf32-ppc.c (ppc_elf_begin_write_processing): Correct
82 _bfd_error_handler argument order.
83 (ppc_elf_merge_private_bfd_data): Don't cast flags.
84
85 2017-07-03 Alan Modra <amodra@gmail.com>
86
87 * configure.ac: Invoke AC_CHECK_TYPES for long long. Invoke
88 AC_TYPE_LONG_DOUBLE.
89 * configure: Regenerate.
90 * config.in: Regenerate.
91
92 2017-06-29 Andrew Waterman <andrew@sifive.com>
93
94 * elfnn-riscv.c (riscv_elf_adjust_dynamic_symbol): Fix TLS copy
95 relocs.
96
97 2017-06-29 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
98
99 * elfxx-sparc.c (allocate_dynrelocs): Don't make a symbol dynamic
100 unless it is undefined weak.
101 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Set the flag
102 relative_reloc to direct non-dynamic symbols to R_SPARC_RELATIVE
103 relocation.
104 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): If symbol
105 is not dynamic in PIC, abort.
106
107 2017-06-29 Jiong Wang <jiong.wang@arm.com>
108
109 PR ld/21402
110 * elfnn-aarch64.c (elfNN_aarch64_allocate_dynrelocs): Only make
111 undefined weak symbols into dynamic.
112 (elfNN_aarch64_final_link_relocate): Generate runtime RELATIVE
113 relocation for non-dynamic symbols.
114 (elfNN_aarch64_finish_dynamic_symbol): Add sanity check.
115
116 2017-06-29 Jiong Wang <jiong.wang@arm.com>
117
118 * elfnn-aarch64.c (aarch64_relocation_aginst_gp_p): New function.
119 (elfNN_aarch64_final_link_relocate): Delete duplicated code for
120 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15, BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
121 BFD_RELOC_AARCH64_MOVW_GOTOFF_G1.
122 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Optimize the
123 support for them.
124
125 2017-06-29 Andreas Arnez <arnez@linux.vnet.ibm.com>
126
127 * elf-bfd.h (elfcore_write_s390_gs_cb): Add prototype.
128 (elfcore_write_s390_gs_bc): Likewise.
129 * elf.c (elfcore_grok_s390_gs_cb): New function.
130 (elfcore_grok_s390_gs_bc): New function.
131 (elfcore_grok_note): Call them.
132 (elfcore_write_s390_gs_cb): New function.
133 (elfcore_write_s390_gs_bc): New function.
134 (elfcore_write_register_note): Call them.
135
136 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
137
138 * libbfd.c (_bfd_generic_get_section_contents): Don't call
139 bfd_get_file_size. Check archive element size.
140 (_bfd_generic_get_section_contents_in_window): Likewise.
141
142 2017-06-28 H.J. Lu <hongjiu.lu@intel.com>
143
144 * bfd-in2.h: Regenerated.
145 * bfdio.c (bfd_get_size): Change return type to ufile_ptr.
146 (bfd_get_file_size): Likewise.
147
148 2017-06-28 Maciej W. Rozycki <macro@imgtec.com>
149 Matthew Fortune <matthew.fortune@imgtec.com>
150
151 * archures.c (bfd_mach_mips_interaptiv_mr2): New macro.
152 * cpu-mips.c (I_interaptiv_mr2): New enum value.
153 (arch_info_struct): Add "mips:interaptiv-mr2" entry.
154 * elfxx-mips.c (_bfd_elf_mips_mach) <E_MIPS_MACH_IAMR2>: New
155 case.
156 (mips_set_isa_flags) <bfd_mach_mips_interaptiv_mr2>: Likewise.
157 (bfd_mips_isa_ext) <bfd_mach_mips_interaptiv_mr2>: Likewise.
158 (print_mips_isa_ext) <AFL_EXT_INTERAPTIV_MR2>: Likewise.
159 (mips_mach_extensions): Add `bfd_mach_mipsisa32r3' and
160 `bfd_mach_mips_interaptiv_mr2' entries.
161 * bfd-in2.h: Regenerate.
162
163 2017-06-27 Nick Clifton <nickc@redhat.com>
164
165 * tekhex.c (pass_over): Revert accidental conversion of a local
166 array to a static array.
167
168 2017-06-27 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
169
170 PR ld/13402
171 * elf32-avr.c (elf32_avr_adjust_diff_reloc_value): Adjust
172 reloc addend if necessary. Adjust diff only if
173 shrinked_insn_address < end_address.
174
175 2017-06-27 Alan Modra <amodra@gmail.com>
176
177 PR binutils/21665
178 * libbfd.c (_bfd_generic_get_section_contents): Warning fix.
179 (_bfd_generic_get_section_contents_in_window): Likewise.
180
181 2017-06-26 Kuan-Lin Chen <rufus@andestech.com>
182
183 * elfnn-riscv.c (perform_relocation): Support the new
184 R_RISCV_32_PCREL relocation.
185 (riscv_elf_relocate_section): Likewise.
186 * elfxx-riscv.c (howto_table): Likewise.
187 (riscv_reloc_map): Likewise.
188 * bfd-in2.h (BFD_RELOC_RISCV_32_PCREL): New relocation.
189 * libbfd.h: Regenerate.
190
191 2017-06-27 Alan Modra <amodra@gmail.com>
192
193 PR binutils/21665
194 * libbfd.c (_bfd_generic_get_section_contents): Delete abort.
195 Use unsigned file pointer type, and remove cast.
196 * libbfd.c (_bfd_generic_get_section_contents_in_window): Likewise.
197 Add "count", not "sz".
198
199 2017-06-26 Pedro Alves <palves@redhat.com>
200
201 PR binutils/21665
202 * libbfd.c (_bfd_generic_get_section_contents): Add "count", not
203 "sz".
204
205 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
206
207 PR binutils/21665
208 * libbfd.c (_bfd_generic_get_section_contents_in_window): Add
209 a missing line.
210
211 2017-06-26 Maciej W. Rozycki <macro@imgtec.com>
212
213 * cpu-mips.c (arch_info_struct): Mark the 4010 32-bit.
214 * elfxx-mips.c (mips_set_isa_flags) <bfd_mach_mips4010>: Set
215 E_MIPS_ARCH_2 rather than E_MIPS_ARCH_3 in `e_flags'.
216 (mips_mach_extensions): Mark `bfd_mach_mips4010' as extending
217 `bfd_mach_mips6000' rather than `bfd_mach_mips4000'.
218
219 2017-06-26 H.J. Lu <hongjiu.lu@intel.com>
220
221 PR binutils/21665
222 * compress.c (bfd_get_full_section_contents): Don't check the
223 file size here.
224 * libbfd.c (_bfd_generic_get_section_contents): Check for and
225 reject a section whose size + offset is greater than the size
226 of the entire file.
227 (_bfd_generic_get_section_contents_in_window): Likewise.
228
229 2017-06-26 Nick Clifton <nickc@redhat.com>
230
231 PR binutils/21670
232 * tekhex.c (getvalue): Check for the source pointer exceeding the
233 end pointer before the first byte is read.
234
235 2017-06-26 Nick Clifton <nickc@redhat.com>
236
237 PR binutils/21665
238 * opncls.c (get_build_id): Check that the section is big enough
239 to contain the whole note.
240 * compress.c (bfd_get_full_section_contents): Check for and reject
241 a section whose size is greater than the size of the entire file.
242 * elf32-v850.c (v850_elf_copy_notes): Allow for the ouput to not
243 contain a notes section.
244
245 2017-06-26 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
246
247 * elf64-s390.c (elf_s390_additional_program_headers): Add NULL
248 pointer checks.
249 (elf_s390_modify_segment_map): Likewise.
250 (bfd_elf_s390_set_options): Lisewise.
251
252 2017-06-26 Alan Modra <amodra@gmail.com>
253
254 * elflink.c (_bfd_elf_link_create_dynstrtab): Don't make dynobj
255 a --just-syms bfd.
256 (_bfd_elf_size_group_sections): Skip --just-syms bfds.
257 (bfd_elf_size_dynamic_sections): Ignore .note.GNU-stack and
258 .preinit_array on --just-syms bfds.
259 (_bfd_elf_gc_mark_extra_sections): Skip --just-syms bfds.
260 (elf_gc_sweep, bfd_elf_parse_eh_frame_entries): Likewise.
261 (bfd_elf_gc_sections, bfd_elf_discard_info): Likewise.
262
263 2017-06-25 Sergei Trofimovich <slyfox@gentoo.org>
264
265 * elf.c (find_link): Bounds check "hint".
266
267 2017-06-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
268
269 * elf32-arm.c (using_thumb_only): Update list of architectures in
270 BFD_ASSERT for which the logic is valid.
271 (using_thumb2_bl): Likewise.
272 (using_thumb2): Likewise and return true for ARMv8-R.
273 (arch_has_arm_nop): Likewise.
274 (tag_cpu_arch_combine): New v8r table for ARMv8-R Tag_CPU_arch
275 merging logic. Update commentis for value 15 of v8m_baseline,
276 v8m_mainline and v4t_plus_v6_m arrays. Use v8r array to decide
277 merging of value 15 of Tag_CPU_arch.
278
279 2017-06-23 Jiong Wang <jiong.wang@arm.com>
280
281 * reloc.c (BFD_RELOC_AARCH64_ADR_GOTPAGE): Rename to
282 BFD_RELOC_AARCH64_ADR_GOT_PAGE
283 * bfd-in2.h: Regenerate.
284
285 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
286
287 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Move
288 the error_alignment label forward. Properly align program
289 property note section.
290
291 2017-06-22 Eric Christopher <echristo@gmail.com>
292
293 * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than
294 abs to fix a truncation warning.
295
296 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
297
298 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Resolve
299 local undefined weak symbol to 0.
300 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Likewise.
301
302 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
303
304 * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk
305 is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
306 (elf_i386_link_setup_gnu_properties): If info->shstk is set,
307 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
308 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If
309 info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
310 (elf_x86_64_link_setup_gnu_properties): If info->shstk is set,
311 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
312
313 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
314
315 * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
316 (elf_i386_lazy_ibt_plt_entry): Likewise.
317 (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
318 (elf_i386_non_lazy_ibt_plt_entry): Likewise.
319 (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
320 (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
321 (elf_i386_lazy_plt_layout): Likewise.
322 (elf_i386_non_lazy_plt_layout): Likewise.
323 (elf_i386_link_hash_entry): Add plt_second.
324 (elf_i386_link_hash_table): Add plt_second and
325 plt_second_eh_frame.
326 (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
327 (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
328 the second PLT. Check the second PLT.
329 (elf_i386_relocate_section): Use the second PLT to resolve
330 PLT reference if needed.
331 (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
332 needed.
333 (elf_i386_finish_dynamic_sections): Set sh_entsize on the
334 second PLT. Generate unwind info for the second PLT.
335 (elf_i386_plt_type): Add plt_second.
336 (elf_i386_get_synthetic_symtab): Support the second PLT.
337 (elf_i386_parse_gnu_properties): Support
338 GNU_PROPERTY_X86_FEATURE_1_AND.
339 (elf_i386_merge_gnu_properties): Support
340 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
341 on GNU_PROPERTY_X86_FEATURE_1_IBT
342 (elf_i386_link_setup_gnu_properties): If info->ibt is set,
343 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
344 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
345 is set on all relocatable inputs.
346 * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
347 (elf_x32_lazy_ibt_plt_entry): Likewise.
348 (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
349 (elf_x32_non_lazy_ibt_plt_entry): Likewise.
350 (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
351 (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
352 (elf_x86_64_lazy_ibt_plt): Likewise.
353 (elf_x32_lazy_ibt_plt): Likewise.
354 (elf_x86_64_non_lazy_ibt_plt): Likewise.
355 (elf_x32_non_lazy_ibt_plt): Likewise.
356 (elf_x86_64_get_synthetic_symtab): Support the second PLT.
357 (elf_x86_64_parse_gnu_properties): Support
358 GNU_PROPERTY_X86_FEATURE_1_AND.
359 (elf_x86_64_merge_gnu_properties): Support
360 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
361 on GNU_PROPERTY_X86_FEATURE_1_IBT
362 (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
363 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
364 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
365 is set on all relocatable inputs.
366
367 2017-06-22 Nick Clifton <nickc@redhat.com>
368
369 PR binutils/21649
370 * som.c (setup_sections): NUL terminate the space_strings buffer.
371 Check that the space.name field does not index beyond the end of
372 the space_strings buffer.
373
374 2017-06-21 Nick Clifton <nickc@redhat.com>
375
376 PR binutils/21646
377 * coff-sh.c (sh_reloc): Check for an out of range reloc.
378
379 2017-06-21 Nick Clifton <nickc@redhat.com>
380
381 PR binutils/21639
382 * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
383 type of the size parameter.
384 (_bfd_vms_save_counted_string): Add second parameter - the maximum
385 length of the counted string.
386 * vms.h (_bfd_vms_save_sized_string): Update prototype.
387 (_bfd_vms_save_counted_string): Likewise.
388 * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
389 _bfd_vms_save_counted_string.
390 (_bfd_vms_slurp_ehdr): Likewise.
391 (_bfd_vms_slurp_egsd): Likewise.
392 (Parse_module): Likewise.
393
394 2017-06-21 Alan Modra <amodra@gmail.com>
395
396 * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
397 calls before tocsave calls.
398 (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
399 following nop.
400
401 2017-06-21 Nick Clifton <nickc@redhat.com>
402
403 PR binutils/21645
404 * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
405 bfd_get_full_section_contents returns no contents.
406
407 2017-06-21 Nick Clifton <nickc@redhat.com>
408
409 PR binutils/21638
410 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
411 record.
412
413 2017-06-21 Nick Clifton <nickc@redhat.com>
414
415 PR binutils/21637
416 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
417 list.
418 (image_set_ptr): Likewise.
419 (alpha_vms_fix_sec_rel): Likewise.
420 (alpha_vms_slurp_relocs): Likewise.
421
422 2017-06-21 Nick Clifton <nickc@redhat.com>
423
424 PR binutils/21633
425 * ieee.c (ieee_slurp_sections): Check for a NULL return from
426 read_id.
427 (ieee_archive_p): Likewise.
428 (ieee_object_p): Likewise.
429
430 2017-06-21 Nick Clifton <nickc@redhat.com>
431
432 PR binutils/21640
433 * elf.c (setup_group): Zero the group section pointer list after
434 allocation so that loops can be caught. Check for NULL pointers
435 when processing a group list.
436
437 2017-06-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
438
439 * elf-s390.h: New file.
440 * elf64-s390.c (struct elf_s390_link_hash_table): Add params
441 field.
442 (elf_s390_additional_program_headers): New function.
443 (elf_s390_modify_segment_map): New function.
444 (bfd_elf_s390_set_options): New function.
445 (elf_backend_additional_program_headers)
446 (elf_backend_modify_segment_map): Add macro definitions.
447
448 2017-06-19 H.J. Lu <hongjiu.lu@intel.com>
449
450 PR ld/21626
451 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
452 the DYNAMIC bit instead of bfd_count_sections.
453
454 2017-06-19 Nick Clifton <nickc@redhat.com>
455
456 PR binutils/21618
457 * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
458 length.
459 (evax_bfd_print_eeom): Likewise.
460 (evax_bfd_print_egsd): Check for an overlarge record length.
461 (evax_bfd_print_etir): Likewise.
462
463 2017-06-19 Nick Clifton <nickc@redhat.com>
464
465 PR binutils/21612
466 * libieee.h (struct common_header_type): Add end_p field.
467 * ieee.c (this_byte_and_next): Do not advance input_p beyond
468 end_p.
469 (read_id): Check for a length that exceeds the remaining bytes in
470 the input buffer.
471 (ieee_seek): Initialise end_p.
472 (ieee_archive_p): Likewise.
473 (ieee_object_p): Likewise.
474
475 2017-06-19 Nick Clifton <nickc@redhat.com>
476
477 PR binutils/21611
478 * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
479 before reading the EIHS structure entries.
480
481 2017-06-19 Nick Clifton <nickc@redhat.com>
482
483 PR binutils/21615
484 * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
485 gsd_size. Check that there are enough bytes remaining to read the
486 type and size of the next egsd. Check that the size of the egsd
487 does not exceed the size of the record.
488
489 2017-06-19 Alan Modra <amodra@gmail.com>
490
491 * config.bfd: Correct targ_underscore for cris.
492
493 2017-06-18 Alan Modra <amodra@gmail.com>
494
495 * config.bfd: Correct targ_underscore for epiphany, ip2k,
496 m32c, mn10200, pru, rl78, rx, crisv32 and v850.
497
498 2017-06-16 Nick Clifton <nickc@redhat.com>
499
500 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
501 bucketlist is empty because there are no symbols to add to the
502 list.
503
504 2017-06-16 Alan Modra <amodra@gmail.com>
505
506 PR ld/20022
507 PR ld/21557
508 PR ld/21562
509 PR ld/21571
510 * targets.c (struct bfd_target): Add _bfd_define_start_stop.
511 (BFD_JUMP_TABLE_LINK): Likewise.
512 * elf-bfd.h (bfd_elf_define_start_stop): Declare.
513 * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
514 (bfd_elf_define_start_stop): New function.
515 * linker.c (bfd_generic_define_start_stop): New function.
516 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
517 new field.
518 * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
519 * aout-target.h (MY_bfd_define_start_stop): Define.
520 * aout-tic30.c (MY_bfd_define_start_stop): Define.
521 * binary.c (binary_bfd_define_start_stop): Define.
522 * bout.c (b_out_bfd_define_start_stop): Define.
523 * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
524 * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
525 * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
526 * coffcode.h (coff_bfd_define_start_stop): Define.
527 * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
528 * i386msdos.c (msdos_bfd_define_start_stop): Define.
529 * i386os9k.c (os9k_bfd_define_start_stop): Define.
530 * ieee.c (ieee_bfd_define_start_stop): Define.
531 * ihex.c (ihex_bfd_define_start_stop): Define.
532 * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
533 * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
534 * mmo.c (mmo_bfd_define_start_stop): Define.
535 * nlm-target.h (nlm_bfd_define_start_stop): Define.
536 * oasys.c (oasys_bfd_define_start_stop): Define.
537 * pef.c (bfd_pef_bfd_define_start_stop): Define.
538 * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
539 * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
540 * som.c (som_bfd_define_start_stop): Define.
541 * srec.c (srec_bfd_define_start_stop): Define.
542 * tekhex.c (tekhex_bfd_define_start_stop): Define.
543 * versados.c (versados_bfd_define_start_stop): Define.
544 * vms-alpha.c (vms_bfd_define_start_stop): Define.
545 (alpha_vms_bfd_define_start_stop): Define.
546 * xsym.c (bfd_sym_bfd_define_start_stop): Define.
547 * bfd-in2.h: Regenerate.
548 * libbfd.h: Regenerate.
549
550 2017-06-16 Jiong Wang <jiong.wang@arm.com>
551
552 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
553 SYMBOL_REFERENCES_LOCAL.
554
555 2017-06-15 Jiong Wang <jiong.wang@arm.com>
556
557 PR ld/21532
558 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
559 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
560 runtime for if there needs copy relocation elimination.
561 (need_copy_relocation_p): New function. Return true for symbol with
562 pc-relative references and if it's against read-only sections.
563 (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
564 (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
565 that are related with accessing external objects.
566 (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
567 in elfNN_aarch64_check_relocs.
568
569 2017-06-15 Nick Clifton <nickc@redhat.com>
570
571 PR binutils/21582
572 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
573 bugs.
574 PR binutils/21581
575 (ieee_archive_p): Likewise.
576
577 2017-06-15 Nick Clifton <nickc@redhat.com>
578
579 PR binutils/21579
580 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
581
582 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
583
584 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
585 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
586 keep both windowed and call0 ABI PLT definitions.
587 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
588 elf_xtensa_*_plt_entry endex.
589 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
590
591 2017-06-14 Nick Clifton <nickc@redhat.com>
592
593 PR binutils/21578
594 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
595 flag value.
596
597 2017-06-14 Nick Clifton <nickc@redhat.com>
598
599 PR binutils/21589
600 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
601 maximum value for the ascic pointer. Check that name processing
602 does not read beyond this value.
603 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
604 end of etir record.
605
606 2017-06-14 Nick Clifton <nickc@redhat.com>
607
608 PR binutils/21591
609 * versados.c (versados_mkobject): Zero the allocated tdata structure.
610 (process_otr): Check for an invalid offset in the otr structure.
611
612 2017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
613
614 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
615
616 2017-06-13 H.J. Lu <hongjiu.lu@intel.com>
617
618 PR ld/20022
619 PR ld/21557
620 PR ld/21562
621 PR ld/21571
622 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
623 vtable field to a union.
624 (_bfd_elf_is_start_stop): Removed.
625 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
626 __start_SECNAME and __stop_SECNAME symbols.
627 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
628 * elflink.c (_bfd_elf_is_start_stop): Removed.
629 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
630 _bfd_elf_is_start_stop.
631 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
632 __stop_SECNAME symbols. Updated.
633 (elf_gc_smash_unused_vtentry_relocs): Likewise.
634 (bfd_elf_gc_record_vtinherit): Likewise.
635 (bfd_elf_gc_record_vtentry): Likewise.
636
637 2017-06-13 Nick Clifton <nickc@redhat.com>
638
639 PR ld/21524
640 * elflink.c (elf_link_adjust_relocs): Generate an error when
641 encountering a reloc against a symbol removed by garbage
642 collection.
643
644 2017-06-12 H.J. Lu <hongjiu.lu@intel.com>
645
646 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
647 to merge_gnu_properties.
648 * elf-properties.c (elf_merge_gnu_properties): Add struct
649 bfd_link_info * and pass it to merge_gnu_properties.
650 (elf_merge_gnu_property_list): Add struct bfd_link_info *
651 and pass it to elf_merge_gnu_properties.
652 (_bfd_elf_link_setup_gnu_properties): Pass info to
653 elf_merge_gnu_property_list.
654 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
655 bfd_link_info *.
656 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
657
658 2017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
659
660 PR 21564
661 * binary.c (binary_set_section_contents): Scale lma by octets
662 per byte to set filepos.
663
664 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
665
666 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
667 dynamic sections.
668
669 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
670
671 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
672 require TEXTREL.
673
674 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
675
676 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
677 patched section contents for TLS IE reloc.
678 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
679
680 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
681
682 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
683 RELOC_FOR_GLOBAL_SYMBOL macro.
684
685 2018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
686
687 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
688 changes.
689
690 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
691
692 * config/tc-arc.c (md_undefined_symbol): Changed.
693 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
694
695 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
696
697 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
698 symbols.
699
700 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
701
702 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
703 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
704
705 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
706
707 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
708 object is created.
709
710 2017-06-08 Richard Earnshaw <rearnsha@arm.com>
711
712 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
713 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
714 is non-zero. Add clarifying comments.
715
716 2017-06-08 H.J. Lu <hongjiu.lu@intel.com>
717
718 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
719 name. Use local IFUNC symbol name string to report unsupported
720 non-PIC call to IFUNC function.
721 (elf_i386_relocate_section): Dump local IFUNC name with minfo
722 when generating R_386_IRELATIVE relocation.
723 (elf_i386_finish_dynamic_symbol): Likewise.
724 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
725 IFUNC symbol name.
726 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
727 when generating R_X86_64_IRELATIVE relocation.
728 (elf_x86_64_finish_dynamic_symbol): Likewise.
729
730 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
731
732 * elf.c (setup_group): Make sure BFD sections are created for all
733 group sections in the input file when processing SHF_GROUP
734 sections.
735 (bfd_section_from_shdr): Avoid duplicating logic already
736 implemented in `setup_group'.
737
738 2017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
739
740 PR binutils/21546
741 * peXXigen.c (pe_print_idata): Use the address of the first thunk
742 if the hint address is zero.
743
744 2017-06-06 James Clarke <jrtc27@jrtc27.com>
745
746 PR ld/19579
747 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
748 ELF_COMMON_DEF_P for common symbols.
749
750 2017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
751
752 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
753 SEC_GROUP sections as SEC_EXCLUDE.
754 (bfd_elf_set_group_contents): Replace use of abort with an assert.
755 (assign_section_numbers): Use resolve_section_groups flag instead
756 of relocatable link type.
757 (_bfd_elf_init_private_section_data): Use resolve_section_groups
758 flag instead of checking the final_link flag for part of the
759 checks in here. Fix white space as a result.
760 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
761 instead of relocatable link type.
762 (bfd_elf_final_link): Likewise.
763
764 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
765
766 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
767 variable `bed'.
768 * elf32-score.c (score_elf_final_link_relocate): Likewise.
769 (s3_bfd_score_elf_check_relocs): Likewise.
770 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
771 (score_elf_final_link_relocate): Likewise.
772 (s7_bfd_score_elf_check_relocs): Likewise.
773
774 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
775
776 * elflink.c (init_reloc_cookie_rels): Remove unused variable
777 `bed'.
778
779 2017-06-06 Maciej W. Rozycki <macro@imgtec.com>
780
781 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
782 from `reloc_count' rather than decrementing it.
783 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
784 `reloc_count' by `int_rels_per_ext_rel'.
785 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
786 `reloc_count' by `int_rels_per_ext_rel' for last relocation
787 entry determination.
788 (s3_bfd_score_elf_check_relocs): Likewise.
789 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
790 (s7_bfd_score_elf_relocate_section): Likewise.
791 (s7_bfd_score_elf_check_relocs): Likewise.
792 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
793 prototype and function.
794 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
795 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
796 triple rather than once the sum of REL and RELA relocation entry
797 counts.
798 (bfd_elf64_get_reloc_upper_bound): Remove macro.
799 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
800 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
801 storage allocation size determination.
802 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
803 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
804 by `int_rels_per_ext_rel' for last relocation entry
805 determination.
806 (bfd_elf_final_link): Do not multiply `reloc_count' by
807 `int_rels_per_ext_rel' for internal relocation storage
808 allocation size determination.
809 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
810 `int_rels_per_ext_rel' for last relocation entry determination.
811 (elf_gc_smash_unused_vtentry_relocs): Likewise.
812 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
813 (_bfd_mips_elf_relocate_section): Likewise.
814
815 2017-06-05 Alan Modra <amodra@gmail.com>
816
817 PR 21529
818 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
819
820 2017-06-01 John Baldwin <jhb@FreeBSD.org>
821
822 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
823 determine structure sizes.
824 (elfcore_grok_freebsd_prstatus): Likewise.
825
826 2017-06-01 Alan Modra <amodra@gmail.com>
827
828 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
829 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
830 dynamic objects.
831 (is_elfv2_localentry0): New function.
832 (ppc64_elf_tls_setup): Default params->plt_localentry0.
833 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
834 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
835 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
836 optimized localentry:0 stubs.
837 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
838 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
839 localentry:0 stubs.
840 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
841 DT_PPC64_OPT.
842 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
843
844 2017-05-30 Casey Smith <clegg89@gmail.com>
845
846 PR ld/21523
847 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
848 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
849
850 2017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
851
852 * cpu-arc.c (arc_compatible): New function.
853
854 2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
855
856 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
857
858 2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
859
860 PR binutils/21519
861 * bfdio.c (bfd_get_file_size): New function.
862 * bfd-in2.h: Regenerated.
863
864 2017-05-23 Dilian Palauzov <git-dpa@aegee.org>
865
866 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
867 comments.
868
869 2017-05-22 H.J. Lu <hongjiu.lu@intel.com>
870
871 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
872 dynobj instead of htab->elf.dynobj.
873
874 2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
875
876 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
877 and function.
878 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
879 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
880 actual number of internal relocations retrieved. Adjust
881 function description.
882 (bfd_elf64_canonicalize_reloc): Remove macro.
883 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
884
885 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
886
887 * archures.c (bfd_mach_sparc_v9m8): Define.
888 (bfd_mach_sparc_v8plusm8): Likewise.
889 (bfd_mach_sparc_v9_p): Adjust to M8.
890 (bfd_mach_sparc_64bit_p): Likewise.
891 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
892 bfd_mach_sparc_v8plusm8.
893 * bfd-in2.h: Regenerated.
894 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
895 sparc:v8plusm8.
896 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
897 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
898 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
899 SHA3.
900 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
901 bfd_mach_sparc_v8plusm8.
902
903 2017-05-19 Alan Modra <amodra@gmail.com>
904
905 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
906 debug and special sections when no non-note alloc sections in an
907 object are kept.
908
909 2017-05-18 Alan Modra <amodra@gmail.com>
910
911 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
912 * elf-m10300.c: Likewise.
913 * elf.c: Likewise.
914 * elf32-arc.c: Likewise.
915 * elf32-bfin.c: Likewise.
916 * elf32-m68k.c: Likewise.
917 * elf32-nds32.c: Likewise.
918 * elf32-tilepro.c: Likewise.
919 * elflink.c: Likewise.
920 * elfnn-aarch64.c: Likewise.
921 * elfnn-riscv.c: Likewise.
922 * elfxx-tilegx.c: Likewise.
923 * mach-o.c: Likewise.
924 * peXXigen.c: Likewise.
925 * vms-alpha.c: Likewise.
926 * vms-lib.c: Likewise.
927
928 2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
929
930 PR ld/20882
931 * elflink.c (elf_gc_mark_debug_section): New function.
932 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
933 referenced by kept debug sections.
934
935 2017-05-16 Alan Modra <amodra@gmail.com>
936
937 * elf-m10300.c: Rename occurrences of non_ir_ref.
938 * elf32-arm.c: Likewise.
939 * elf32-bfin.c: Likewise.
940 * elf32-cr16.c: Likewise.
941 * elf32-cris.c: Likewise.
942 * elf32-d10v.c: Likewise.
943 * elf32-dlx.c: Likewise.
944 * elf32-fr30.c: Likewise.
945 * elf32-frv.c: Likewise.
946 * elf32-hppa.c: Likewise.
947 * elf32-i370.c: Likewise.
948 * elf32-i386.c: Likewise.
949 * elf32-iq2000.c: Likewise.
950 * elf32-lm32.c: Likewise.
951 * elf32-m32c.c: Likewise.
952 * elf32-m32r.c: Likewise.
953 * elf32-m68hc1x.c: Likewise.
954 * elf32-m68k.c: Likewise.
955 * elf32-mcore.c: Likewise.
956 * elf32-metag.c: Likewise.
957 * elf32-microblaze.c: Likewise.
958 * elf32-moxie.c: Likewise.
959 * elf32-msp430.c: Likewise.
960 * elf32-mt.c: Likewise.
961 * elf32-nios2.c: Likewise.
962 * elf32-or1k.c: Likewise.
963 * elf32-ppc.c: Likewise.
964 * elf32-rl78.c: Likewise.
965 * elf32-s390.c: Likewise.
966 * elf32-score.c: Likewise.
967 * elf32-score7.c: Likewise.
968 * elf32-sh.c: Likewise.
969 * elf32-tic6x.c: Likewise.
970 * elf32-tilepro.c: Likewise.
971 * elf32-v850.c: Likewise.
972 * elf32-vax.c: Likewise.
973 * elf32-xstormy16.c: Likewise.
974 * elf32-xtensa.c: Likewise.
975 * elf64-alpha.c: Likewise.
976 * elf64-hppa.c: Likewise.
977 * elf64-ia64-vms.c: Likewise.
978 * elf64-mmix.c: Likewise.
979 * elf64-ppc.c: Likewise.
980 * elf64-s390.c: Likewise.
981 * elf64-sh64.c: Likewise.
982 * elf64-x86-64.c: Likewise.
983 * elflink.c: Likewise.
984 * elfnn-aarch64.c: Likewise.
985 * elfnn-ia64.c: Likewise.
986 * elfnn-riscv.c: Likewise.
987 * elfxx-mips.c: Likewise.
988 * elfxx-sparc.c: Likewise.
989 * elfxx-tilegx.c: Likewise.
990 * linker.c: Likewise.
991
992 2017-05-16 Alan Modra <amodra@gmail.com>
993
994 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
995 * elflink.c (elf_link_add_object_symbols): Update to use
996 non_ir_ref_dynamic.
997 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
998 non_ir_ref.
999 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
1000
1001 2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
1002
1003 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
1004
1005 2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
1006
1007 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
1008 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
1009 properties.
1010 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
1011
1012 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
1013
1014 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
1015 to plt_second.
1016 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
1017 to plt_second/plt_second_eh_frame.
1018 (elf_x86_64_link_hash_newfunc): Updated.
1019 (elf_x86_64_allocate_dynrelocs): Likewise.
1020 (elf_x86_64_size_dynamic_sections): Likewise.
1021 (elf_x86_64_relocate_section): Likewise.
1022 (elf_x86_64_finish_dynamic_symbol): Likewise.
1023 (elf_x86_64_finish_dynamic_sections): Likewise.
1024 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
1025 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
1026 .plt.sec section.
1027 (elf_backend_setup_gnu_properties): Updated. Create the
1028 .plt.sec section instead of the .plt.sec section.
1029
1030 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
1031
1032 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
1033 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
1034 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
1035
1036 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
1037
1038 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
1039 (bfd_elf64_set_reloc): Define.
1040 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
1041
1042 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
1043
1044 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
1045 (struct bfd_target): New field _bfd_set_reloc.
1046 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
1047 * reloc.c (_bfd_generic_set_reloc): New function.
1048 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
1049 * nlm-target.h (nlm_set_reloc): Likewise.
1050 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
1051 * aout-tic30.c (MY_set_reloc): Likewise.
1052 * aout-target.h (MY_set_reloc): Likewise.
1053 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
1054 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
1055 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
1056 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
1057 * aout-adobe.c (aout_32_set_reloc): Likewise.
1058 * bout.c (b_out_set_reloc): Likewise.
1059 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
1060 * i386os9k.c (aout_32_set_reloc): Likewise.
1061 * ieee.c (ieee_set_reloc): Likewise.
1062 * oasys.c (oasys_set_reloc): Likewise.
1063 * som.c (som_set_reloc): Likewise.
1064 * versados.c (versados_set_reloc): Likewise.
1065 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
1066 _bfd_generic_set_reloc.
1067 (rs6000_xcoff64_aix_vec): LIkewise.
1068 * libbfd.c (_bfd_norelocs_set_reloc): New function.
1069 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
1070 * i386msdos.c (msdos_set_reloc): Define to
1071 _bfd_norelocs_set_reloc.
1072 * elfcode.h (elf_set_reloc): Define.
1073 * bfd-in2.h: Regenerated.
1074
1075 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
1076
1077 PR ld/21481
1078 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
1079 for IFUNC function address.
1080
1081 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
1082
1083 * elf32-arc.c (FEATURE_LIST_NAME): Define.
1084 (CONFLICT_LIST): Likewise.
1085 (opcode/arc-attrs.h): Include.
1086 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
1087 (arc_extract_features): New file.
1088 (arc_stralloc): Likewise.
1089 (arc_elf_merge_attributes): Likewise.
1090 (arc_elf_merge_private_bfd_data): Use object attributes.
1091 (bfd_arc_get_mach_from_attributes): New function.
1092 (arc_elf_object_p): Use object attributes.
1093 (arc_elf_final_write_processing): Likewise.
1094 (elf32_arc_obj_attrs_arg_type): New function.
1095 (elf32_arc_obj_attrs_handle_unknown): Likewise.
1096 (elf32_arc_section_from_shdr): Likewise.
1097 (elf_backend_obj_attrs_vendor): Define.
1098 (elf_backend_obj_attrs_section): Likewise.
1099 (elf_backend_obj_attrs_arg_type): Likewise.
1100 (elf_backend_obj_attrs_section_type): Likewise.
1101 (elf_backend_obj_attrs_handle_unknown): Likewise.
1102 (elf_backend_section_from_shdr): Likewise.
1103
1104 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
1105
1106 PR ld/21458
1107 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
1108 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
1109 and the destination is a Thumb symbol.
1110
1111 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
1112
1113 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
1114 initializer to silence GCC 4.2.
1115 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
1116
1117 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
1118
1119 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
1120 (LAZY_PLT_ENTRY_SIZE): This.
1121 (NON_LAZY_PLT_ENTRY_SIZE): New.
1122 (elf_x86_64_plt0_entry): Renamed to ...
1123 (elf_x86_64_lazy_plt0_entry): This.
1124 (elf_x86_64_plt_entry): Renamed to ...
1125 (elf_x86_64_lazy_plt_entry): This.
1126 (elf_x86_64_bnd_plt0_entry): Renamed to ...
1127 (elf_x86_64_lazy_bnd_plt0_entry): This.
1128 (elf_x86_64_legacy_plt_entry): Removed.
1129 (elf_x86_64_bnd_plt_entry): Renamed to ...
1130 (elf_x86_64_lazy_bnd_plt_entry): This.
1131 (elf_x86_64_legacy_plt2_entry): Renamed to ...
1132 (elf_x86_64_non_lazy_plt_entry): This.
1133 (elf_x86_64_bnd_plt2_entry): Renamed to ...
1134 (elf_x86_64_non_lazy_bnd_plt_entry): This.
1135 (elf_x86_64_eh_frame_plt): Renamed to ...
1136 (elf_x86_64_eh_frame_lazy_plt): This.
1137 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
1138 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
1139 (elf_x86_64_eh_frame_plt_got): Renamed to ...
1140 (elf_x86_64_eh_frame_non_lazy_plt): This.
1141 (elf_x86_64_lazy_plt_layout): New.
1142 (elf_x86_64_non_lazy_plt_layout): Likewise.
1143 (elf_x86_64_plt_layout): Likewise.
1144 (elf_x86_64_backend_data): Remove PLT layout information. Add
1145 os for target system.
1146 (GET_PLT_ENTRY_SIZE): Removed.
1147 (elf_x86_64_lazy_plt): New.
1148 (elf_x86_64_non_lazy_plt): Likewise.
1149 (elf_x86_64_lazy_bnd_plt): Likewise.
1150 (elf_x86_64_non_lazy_bnd_plt): Likewise.
1151 (elf_x86-64_arch_bed): Updated.
1152 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
1153 (elf_x86_64_create_dynamic_sections): Removed.
1154 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
1155 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
1156 (elf_x86-64_adjust_dynamic_symbol): Updated.
1157 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
1158 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
1159 size for PLT0 if there is no PLT0. Get plt_entry_size from
1160 non_lazy_plt for non-lazy PLT entries.
1161 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
1162 from non_lazy_plt for non-lazy PLT entries.
1163 (elf_x86-64_relocate_section): Updated. Properly get PLT index
1164 if there is no PLT0.
1165 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
1166 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
1167 entries with non-lazy PLT layout. Don't fill the second and third
1168 slots in the PLT entry if there is no PLT0.
1169 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
1170 if there is no PLT0. Set sh_entsize on the .plt.got section.
1171 (compare_relocs): New.
1172 (elf_x86_64_plt_type): Likewise.
1173 (elf_x86_64_plt): Likewise.
1174 (elf_x86_64_nacl_plt): New. Forward declaration.
1175 (elf_x86_64_get_plt_sym_val): Removed.
1176 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
1177 against all dynamic relocations.
1178 (elf_x86_64_link_setup_gnu_properties): New function.
1179 (elf_backend_create_dynamic_sections): Updated.
1180 (elf_backend_setup_gnu_properties): New.
1181 (elf_x86_64_nacl_plt): New.
1182 (elf_x86_64_nacl_arch_bed): Updated.
1183
1184 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
1185
1186 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
1187 (LAZY_PLT_ENTRY_SIZE): This.
1188 (NON_LAZY_PLT_ENTRY_SIZE): New.
1189 (elf_i386_plt0_entry): Renamed to ...
1190 (elf_i386_lazy_plt0_entry): This.
1191 (elf_i386_plt_entry): Renamed to ...
1192 (elf_i386_lazy_plt_entry): This.
1193 (elf_i386_pic_plt0_entry): Renamed to ...
1194 (elf_i386_pic_lazy_plt0_entry): This.
1195 (elf_i386_pic_plt_entry): Renamed to ...
1196 (elf_i386_pic_lazy_plt_entry): This.
1197 (elf_i386_got_plt_entry): Renamed to ...
1198 (elf_i386_non_lazy_plt_entry): This.
1199 (elf_i386_pic_got_plt_entry): Renamed to ...
1200 (elf_i386_pic_non_lazy_plt_entry): This.
1201 (elf_i386_eh_frame_plt): Renamed to ...
1202 (elf_i386_eh_frame_lazy_plt): This.
1203 (elf_i386_eh_frame_plt_got): Renamed to ...
1204 (elf_i386_eh_frame_non_lazy_plt): This.
1205 (elf_i386_plt_layout): Renamed to ...
1206 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
1207 eh_frame_plt_got_size.
1208 (elf_i386_non_lazy_plt_layout): New.
1209 (elf_i386_plt_layout): Likewise.
1210 (elf_i386_non_lazy_plt): Likewise.
1211 (GET_PLT_ENTRY_SIZE): Removed.
1212 (elf_i386_plt): Renamed to ...
1213 (elf_i386_lazy_plt): This.
1214 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
1215 (elf_i386_arch_bed): Updated.
1216 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
1217 (elf_i386_create_dynamic_sections): Removed.
1218 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
1219 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
1220 (elf_i386_adjust_dynamic_symbol): Updated.
1221 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
1222 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
1223 size for PLT0 if there is no PLT0.
1224 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
1225 output section is discarded only if GOT isn't empty.
1226 (elf_i386_relocate_section): Updated. Properly get PLT index
1227 if there is no PLT0.
1228 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
1229 second and third slots in the PLT entry if there is no PLT0.
1230 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
1231 if there is no PLT0. Set sh_entsize on the .plt.got section.
1232 (elf_i386_nacl_plt): Forward declaration.
1233 (elf_i386_get_plt_sym_val): Removed.
1234 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
1235 against all dynamic relocations.
1236 (elf_i386_link_setup_gnu_properties): New function.
1237 (elf_backend_create_dynamic_sections): Updated.
1238 (elf_backend_setup_gnu_properties): New.
1239 (elf_i386_nacl_plt): Updated.
1240 (elf_i386_nacl_arch_bed): Likewise.
1241 (elf_i386_vxworks_arch_bed): Likewise.
1242
1243 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
1244
1245 * elflink.c (elf_output_implib): Remove executable flag from import
1246 library bfd.
1247 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
1248 library is a relocatable object file.
1249
1250 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
1251
1252 PR ld/21404
1253 * elf32-avr.c (avr_should_move_sym): New function.
1254 (avr_should_reduce_sym_size): Likewise.
1255 (avr_should_increase_sym_size): Likewise.
1256 (elf32_avr_relax_delete_bytes): Adjust symbol values
1257 and sizes by calling new functions.
1258
1259 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
1260
1261 * config.bfd (riscv32-*): Enable rv64.
1262
1263 2017-05-02 Alan Modra <amodra@gmail.com>
1264
1265 PR 21384
1266 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
1267 rather than h->root.type == bfd_link_hash_new.
1268 (bfd_elf_record_link_assignment): Similarly, call
1269 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
1270
1271 2017-04-29 Alan Modra <amodra@gmail.com>
1272
1273 PR 21432
1274 * reloc.c (reloc_offset_in_range): New function.
1275 (bfd_perform_relocation, bfd_install_relocation): Use it.
1276 (_bfd_final_link_relocate): Likewise.
1277
1278 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
1279
1280 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
1281 before using .plt.got.
1282 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
1283
1284 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
1285
1286 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
1287 instead of "+=" to update 0.
1288
1289 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
1290
1291 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
1292 .plt.got section here.
1293 (elf_i386_check_relocs): Don't create the .plt.got section.
1294 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
1295 the .plt.got and .plt.bnd sections here.
1296 (elf_x86_64_check_relocs): Don't create the .plt.got nor
1297 .plt.bnd sections.
1298
1299 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
1300
1301 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
1302 has_bnd_reloc.
1303 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
1304 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
1305 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
1306 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
1307 has_bnd_reloc.
1308
1309 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
1310
1311 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
1312 to return bfd *.
1313 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
1314 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
1315 the first relocatable ELF input with GNU properties.
1316
1317 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
1318
1319 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
1320 VxWorks for non-PIC.
1321
1322 2017-04-27 Alan Modra <amodra@gmail.com>
1323
1324 * elf-bfd.h (struct elf_backend_data): Make asection param of
1325 elf_backend_eh_frame_address_size const.
1326 (_bfd_elf_eh_frame_address_size): Likewise.
1327 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
1328 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
1329 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
1330 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
1331 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
1332 (next_cie_fde_offset): Constify params.
1333 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
1334
1335 2017-04-27 Alan Modra <amodra@gmail.com>
1336
1337 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
1338 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
1339 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
1340 aug_data_len.
1341 (offset_adjust): New function.
1342 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
1343 (adjust_eh_frame_local_symbols): Likewise.
1344 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
1345 after changing anything. Return true if anything changed.
1346 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
1347 _bfd_elf_adjust_eh_frame_global_symbol for globals.
1348
1349 2017-04-27 Alan Modra <amodra@gmail.com>
1350
1351 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
1352 when force_local.
1353
1354 2017-04-27 Alan Modra <amodra@gmail.com>
1355
1356 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
1357 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
1358 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
1359 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
1360 for undef and undefweak dyn_relocs.
1361 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
1362 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
1363 (allocate_got, allocate_dynrelocs): Likewise.
1364 (ppc64_elf_relocate_section): Likewise.
1365
1366 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
1367
1368 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
1369 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
1370 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
1371 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
1372
1373 2017-04-26 Nick Clifton <nickc@redhat.com>
1374
1375 PR binutils/21434
1376 * reloc.c (bfd_perform_relocation): Check for a negative address
1377 in the reloc.
1378
1379 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
1380
1381 PR ld/21334
1382 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
1383 member.
1384 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
1385 (elf_backend_always_renumber_dynsyms): Define.
1386 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
1387 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
1388 * elflink.c (bfd_elf_size_dynamic_sections): Also call
1389 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
1390 it.
1391 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
1392
1393 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
1394
1395 * elflink.c (bfd_elf_size_dynamic_sections): Only call
1396 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
1397 sections have been created.
1398
1399 2017-04-26 Nick Clifton <nickc@redhat.com>
1400
1401 PR binutils/21431
1402 * compress.c (bfd_init_section_compress_status): Check the return
1403 value from bfd_malloc.
1404
1405 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
1406
1407 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
1408 no_finish_dynamic_symbol.
1409 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
1410 0.
1411 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
1412 weak symbol, don't make it dynamic.
1413 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
1414 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
1415 relocation for GOT reference.
1416 (elf_x86_64_finish_dynamic_symbol): Abort if
1417 no_finish_dynamic_symbol isn't 0.
1418
1419 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
1420
1421 PR ld/21402
1422 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
1423 undefined weak symbol, don't make it dynamic.
1424 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
1425 set no_finish_dynamic_symbol and generate R_386_RELATIVE
1426 relocation for R_386_GOT32.
1427
1428 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
1429
1430 PR ld/21425
1431 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
1432
1433 2017-04-23 Alan Modra <amodra@gmail.com>
1434
1435 PR 21414
1436 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
1437 * elf.c (lcomm_sym): New.
1438 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
1439 * bfd-in2.h: Regenerate.
1440
1441 2017-04-23 Alan Modra <amodra@gmail.com>
1442
1443 PR 21412
1444 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
1445 parameters and comment.
1446 (_bfd_elf_get_reloc_section): Delete.
1447 (_bfd_elf_plt_get_reloc_section): Declare.
1448 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
1449 New functions. Don't blindly skip over assumed .rel/.rela prefix.
1450 Extracted from..
1451 (_bfd_elf_get_reloc_section): ..here. Delete.
1452 (assign_section_numbers): Call elf_get_reloc_section.
1453 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
1454 * elfxx-target.h (elf_backend_get_reloc_section): Update.
1455
1456 2017-04-23 Alan Modra <amodra@gmail.com>
1457
1458 PR 21409
1459 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
1460 no symbols.
1461
1462 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
1463
1464 PR ld/21402
1465 * elf32-i386.c (elf_i386_link_hash_entry): Add
1466 no_finish_dynamic_symbol.
1467 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
1468 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
1469 symbol, don't make it dynamic in PIE.
1470 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
1471 set no_finish_dynamic_symbol and generate R_386_RELATIVE
1472 relocation for R_386_GOT32
1473 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
1474 isn't 0.
1475
1476 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
1477
1478 PR ld/19617
1479 PR ld/21086
1480 * elflink.c (elf_link_add_object_symbols): Require
1481 --no-dynamic-linker with -E/--dynamic-list when creating
1482 dynamic sections.
1483
1484 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
1485
1486 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
1487 if forced local.
1488
1489 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
1490
1491 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
1492 dynamic symbol sorting.
1493
1494 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
1495
1496 PR ld/21382
1497 * elflink.c (elf_link_add_object_symbols): Preserve
1498 dynamic_ref_after_ir_def when restoring the symbol table for
1499 unneeded dynamic object.
1500
1501 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
1502
1503 PR ld/21401
1504 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
1505 on on undefined IFUNC symbol in the second PLT.
1506
1507 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
1508
1509 * peXXigen.c (pe_print_reloc): Correct chunk_end.
1510
1511 2017-04-19 Alan Modra <amodra@gmail.com>
1512
1513 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
1514 or make dynamic for info->dynamic_undefined_weak 0 and 1.
1515 * elf32-ppc.c:Formatting.
1516 (ensure_undefweak_dynamic): Don't make dynamic when
1517 info->dynamic_undefined_weak is zero.
1518 (allocate_dynrelocs): Discard undefweak dyn_relocs for
1519 info->dynamic_undefined_weak. Discard undef dyn_relocs when
1520 not default visibility. Discard undef and undefweak
1521 dyn_relocs earlier.
1522 (ppc_elf_relocate_section): Adjust to suit.
1523 * elf64-ppc.c: Formatting.
1524 (ensure_undefweak_dynamic): Don't make dynamic when
1525 info->dynamic_undefined_weak is zero.
1526 (allocate_dynrelocs): Discard undefweak dyn_relocs for
1527 info->dynamic_undefined_weak. Discard them earlier.
1528
1529 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
1530
1531 PR ld/21389
1532 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
1533 before generating the version definition section.
1534
1535 2017-04-17 Alan Modra <amodra@gmail.com>
1536
1537 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
1538 state when a regular object file defines a symbol with
1539 incompatible type to that defined by an earlier shared lib.
1540
1541 2017-04-13 Alan Modra <amodra@gmail.com>
1542
1543 * coffcode.h: Wrap some overly long _bfd_error_handler args.
1544 * elf.c: Likewise.
1545 * elf32-arm.c: Likewise.
1546 * elf32-i386.c: Likewise.
1547 * elf32-mep.c: Likewise.
1548 * elf64-ia64-vms.c: Likewise.
1549 * elf64-x86-64.c: Likewise.
1550 * elflink.c: Likewise.
1551 * elfnn-ia64.c: Likewise.
1552 * elfxx-mips.c: Likewise.
1553
1554 2017-04-13 Alan Modra <amodra@gmail.com>
1555
1556 * aoutx.h: Use %B and %A in error messages throughout file.
1557 * aout-cris.c: Likewise.
1558 * archive.c: Likewise.
1559 * binary.c: Likewise.
1560 * coff-rs6000.c: Likewise.
1561 * coff-tic4x.c: Likewise.
1562 * coffcode.h: Likewise.
1563 * coffgen.c: Likewise.
1564 * cofflink.c: Likewise.
1565 * coffswap.h: Likewise.
1566 * cpu-arm.c: Likewise.
1567 * elf-eh-frame.c: Likewise.
1568 * elf-m10300.c: Likewise.
1569 * elf.c: Likewise.
1570 * elf32-arc.c: Likewise.
1571 * elf32-arm.c: Likewise.
1572 * elf32-bfin.c: Likewise.
1573 * elf32-frv.c: Likewise.
1574 * elf32-iq2000.c: Likewise.
1575 * elf32-m32c.c: Likewise.
1576 * elf32-microblaze.c: Likewise.
1577 * elf32-nds32.c: Likewise.
1578 * elf32-rl78.c: Likewise.
1579 * elf32-rx.c: Likewise.
1580 * elf32-score.c: Likewise.
1581 * elf32-score7.c: Likewise.
1582 * elf32-sh64.c: Likewise.
1583 * elf32-v850.c: Likewise.
1584 * elf32-vax.c: Likewise.
1585 * elf32-visium.c: Likewise.
1586 * elf64-ia64-vms.c: Likewise.
1587 * elf64-mmix.c: Likewise.
1588 * elf64-sh64.c: Likewise.
1589 * elfcode.h: Likewise.
1590 * elfnn-aarch64.c: Likewise.
1591 * elfnn-ia64.c: Likewise.
1592 * elfxx-mips.c: Likewise.
1593 * hpux-core.c: Likewise.
1594 * ieee.c: Likewise.
1595 * ihex.c: Likewise.
1596 * linker.c: Likewise.
1597 * merge.c: Likewise.
1598 * mmo.c: Likewise.
1599 * oasys.c: Likewise.
1600 * pdp11.c: Likewise.
1601 * peXXigen.c: Likewise.
1602 * rs6000-core.c: Likewise.
1603 * vms-alpha.c: Likewise.
1604 * xcofflink.c: Likewise.
1605
1606 2017-04-13 Alan Modra <amodra@gmail.com>
1607
1608 * bfd.c (PRINT_TYPE): Define.
1609 (_doprnt): New function.
1610 (error_handler_internal): Use _doprnt.
1611 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
1612 calls in their natural order, throughout file.
1613 * coff-mcore.c: Likewise.
1614 * coff-ppc.c: Likewise.
1615 * coff-tic80.c: Likewise.
1616 * cofflink.c: Likewise.
1617 * elf-s390-common.c: Likewise.
1618 * elf.c: Likewise.
1619 * elf32-arm.c: Likewise.
1620 * elf32-i386.c: Likewise.
1621 * elf32-m32r.c: Likewise.
1622 * elf32-msp430.c: Likewise.
1623 * elf32-spu.c: Likewise.
1624 * elf64-ia64-vms.c: Likewise.
1625 * elf64-sparc.c: Likewise.
1626 * elf64-x86-64.c: Likewise.
1627 * elflink.c: Likewise.
1628 * elfnn-aarch64.c: Likewise.
1629 * elfnn-ia64.c: Likewise.
1630 * elfxx-mips.c: Likewise.
1631
1632 2017-04-13 Alan Modra <amodra@gmail.com>
1633
1634 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
1635 branch veneers" error. Fix double space and format message.
1636 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
1637 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
1638
1639 2017-04-13 Alan Modra <amodra@gmail.com>
1640
1641 * bfd-in2.h: Regenerate.
1642
1643 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
1644
1645 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
1646 extra `\n' in warning/error messages.
1647 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
1648 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
1649
1650 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
1651
1652 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
1653 processor-specific properties with generic ELF target vector.
1654
1655 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
1656
1657 * elf32-sparc.c (elf_backend_fixup_symbol): New.
1658 * elf64-sparc.c (elf_backend_fixup_symbol): New.
1659 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
1660 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
1661 has_non_got_reloc.
1662 (link_hash_newfunc): Initialize has_got_reloc and
1663 has_non_got_reloc.
1664 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
1665 section.
1666 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
1667 has_non_got_reloc.
1668 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
1669 has_non_got_reloc.
1670 (_bfd_sparc_elf_fixup_symbol): New function.
1671 (allocate_dynrelocs): Don't allocate space for dynamic
1672 relocations and discard relocations against resolved undefined
1673 weak symbols in executable. Don't make resolved undefined weak
1674 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
1675 relocation against undefined weak symbols in PIE.
1676 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
1677 relocations against resolved undefined weak symbols in PIE
1678 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
1679 without ynamic PLT/GOT relocations for resolved undefined weak
1680 symbols.
1681 Don't generate dynamic relocation against resolved undefined
1682 weak symbol in executable.
1683 (pie_finish_undefweak_symbol): New function.
1684 (_bfd_sparc_elf_finish_dynamic_sections): Call
1685 pie_finish_undefweak_symbol on all symbols in PIE.
1686 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
1687 (_bfd_sparc_elf_fixup_symbol): New function.
1688
1689 2017-04-10 Nick Clifton <nickc@redhat.com>
1690
1691 * config.bfd: Remove ns32k from obsolete list.
1692
1693 2017-04-10 Alan Modra <amodra@gmail.com>
1694
1695 PR 21287
1696 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
1697 (special_sections_i): Likewise for .init_array.
1698 (special_sections_p): Likewise for .preinit_array.
1699
1700 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
1701
1702 PR ld/19579
1703 PR ld/21306
1704 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
1705 ELF_COMMON_DEF_P for common symbols.
1706 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
1707 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1708 * elflink.c (_bfd_elf_merge_symbol): Revert commits
1709 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
1710 07492f668d2173da7a2bda3707ff0985e0f460b6.
1711
1712 2017-04-07 Pedro Alves <palves@redhat.com>
1713
1714 * opncls.c (bfd_get_debug_link_info): Rename to...
1715 (bfd_get_debug_link_info_1): ... this. Change type of second
1716 parameter to void pointer. Adjust.
1717 (bfd_get_debug_link_info): Reimplement on top of
1718 bfd_get_debug_link_info_1.
1719 (separate_debug_file_exists, separate_alt_debug_file_exists):
1720 Change type of second parameter to void pointer. Adjust.
1721 (get_func_type, check_func_type): Change type of second parameter
1722 to void pointer.
1723 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
1724 the callback functions instead of passing the address of a local.
1725 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
1726 find_separate_debug_file.
1727 (get_alt_debug_link_info_shim): Change type of second parameter to
1728 void pointer. Adjust.
1729 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
1730 find_separate_debug_file.
1731 (get_build_id_name, bfd_boolean check_build_id_file): Change type
1732 of second parameter to void pointer. Adjust.
1733 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
1734 pointer local to find_separate_debug_file.
1735
1736 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
1737
1738 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
1739 external symbols with a definition.
1740 (_bfd_coff_gc_mark_extra_sections): Fix typo.
1741
1742 2017-04-07 Alan Modra <amodra@gmail.com>
1743
1744 * po/SRC-POTFILES.in: Regenerate.
1745
1746 2017-04-05 Alan Modra <amodra@gmail.com>
1747
1748 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
1749 reference counting.
1750
1751 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
1752
1753 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
1754 numbers for DataDirectory entry indicies passed to
1755 add_data_entry().
1756
1757 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
1758
1759 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
1760 each GNU_MBIND section and align GNU_MBIND section to page size.
1761 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
1762 segment for each GNU_MBIND section.
1763 (_bfd_elf_init_private_section_data): Copy sh_info from input
1764 for GNU_MBIND section.
1765
1766 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
1767
1768 * elfnn-riscv.c (GP_NAME): Delete.
1769 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
1770 (_bfd_riscv_relax_lui): Likewise.
1771
1772 2017-04-04 Nick Clifton <nickc@redhat.com>
1773
1774 PR binutils/21342
1775 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
1776 dereference.
1777 (bfd_elf_final_link): Only initialize the extended symbol index
1778 section if there are extended symbol tables to list.
1779
1780 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
1781
1782 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
1783 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
1784 * configure.ac (elf): Add elf-properties.lo.
1785 * Makefile.in: Regenerated.
1786 * configure: Likewise.
1787 * elf-bfd.h (elf_property_kind): New.
1788 (elf_property): Likewise.
1789 (elf_property_list): Likewise.
1790 (elf_properties): Likewise.
1791 (_bfd_elf_parse_gnu_properties): Likewise.
1792 (_bfd_elf_get_property): Likewise.
1793 (_bfd_elf_link_setup_gnu_properties): Likewise.
1794 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
1795 and setup_gnu_properties.
1796 (elf_obj_tdata): Add properties.
1797 * elf-properties.c: New file.
1798 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
1799 (elf_i386_merge_gnu_properties): Likewise.
1800 (elf_backend_parse_gnu_properties): Likewise.
1801 (elf_backend_merge_gnu_properties): Likewise.
1802 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
1803 (elf_x86_64_merge_gnu_properties): Likewise.
1804 (elf_backend_parse_gnu_properties): Likewise.
1805 (elf_backend_merge_gnu_properties): Likewise.
1806 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
1807 (elf_backend_parse_gnu_properties): Likewise.
1808 (elf_backend_setup_gnu_properties): Likewise.
1809 (elfNN_bed): Add elf_backend_parse_gnu_properties,
1810 elf_backend_merge_gnu_properties and
1811 elf_backend_setup_gnu_properties.
1812
1813 2017-03-30 Pip Cet <pipcet@gmail.com>
1814
1815 * elf32-wasm32.c: Add relocation code, two relocs.
1816 * reloc.c: Add wasm32 relocations.
1817 * libbfd.h: Regenerate.
1818 * bfd-in2.h: Regenerate.
1819 * bfd/po/bfd.pot: Regenerate.
1820
1821 2017-03-29 Nick Clifton <nickc@redhat.com>
1822
1823 PR binutils/18025
1824 * coff-bfd.h (struct coff_section_data): Add new fields:
1825 saved_bias and bias.
1826 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
1827 computed for PE binaries.
1828 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
1829 missing abbrev.
1830
1831 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
1832
1833 PR ld/16044
1834 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
1835 to handle a local symbol with a hash-symbol-entry; without PLT.
1836 Add BFD_ASSERT for an incidental case with GOT entry present.
1837 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
1838 isn't forced-or-set local.
1839
1840 2017-03-27 Pip Cet <pipcet@gmail.com>
1841
1842 * wasm-module.c: New file to support WebAssembly modules.
1843 * wasm-module.h: New file to support WebAssembly modules.
1844 * doc/webassembly.texi: Start documenting wasm-module.c.
1845 * config.bfd: Add wasm_vec.
1846 * targets.c: Likewise.
1847 * configure.ac: Likewise.
1848 * Makefile.am: Add entries for wasm-module.c.
1849 * Makefile.in: Regenerate.
1850 * configure: Regenerate.
1851 * po/SRC-POTFILES.in: Regenerate.
1852
1853 2017-03-27 Pip Cet <pipcet@gmail.com>
1854
1855 * cpu-wasm32.c: New file to support wasm32 architecture.
1856 * elf32-wasm32.c: New file to support wasm32 architecture.
1857 * Makefile.am: Add wasm32 architecture.
1858 * archures.c: Likewise.
1859 * config.bfd: Likewise.
1860 * configure.ac: Likewise.
1861 * targets.c: Likewise.
1862 * Makefile.in: Regenerate.
1863 * bfd-in2.h: Regenerate.
1864 * configure: Regenerate.
1865 * po/SRC-POTFILES.in: Regenerate.
1866
1867 2017-03-20 Alan Modra <amodra@gmail.com>
1868
1869 PR 21266
1870 * elf64-ppc.c (compare_symbols): Stabilize sort.
1871
1872 2017-03-18 Alan Modra <amodra@gmail.com>
1873
1874 * elf64-ppc.c (struct ppc_link_hash_table): Add
1875 local_ifunc_resolver and maybe_local_ifunc_resolver.
1876 (ppc_build_one_stub): Set flags on emitting dynamic
1877 relocation to ifunc.
1878 (ppc64_elf_relocate_section): Likewise.
1879 (ppc64_elf_finish_dynamic_symbol): Likewise.
1880 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
1881 local dynamic relocs to ifuncs.
1882 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
1883 local_ifunc_resolver and maybe_local_ifunc_resolver.
1884 (ppc_elf_relocate_section): Set flag on emitting dynamic
1885 relocation to ifuncs.
1886 (ppc_elf_finish_dynamic_symbol): Likewise.
1887 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
1888 dynamic relocs to ifuncs.
1889
1890 2017-03-13 Nick Clifton <nickc@redhat.com>
1891
1892 PR binutils/21202
1893 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
1894 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
1895 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
1896 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
1897 * bfd-in2.h: Regenerate.
1898 * libbfd.h: Regenerate.
1899 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
1900 names.
1901 (IS_AARCH64_TLSDESC_RELOC): Likewise.
1902 (elfNN_aarch64_howto_table): Likewise.
1903 (aarch64_tls_transition_without_check): Likewise.
1904 (aarch64_reloc_got_type): Likewise.
1905 (elfNN_aarch64_final_link_relocate): Likewise.
1906 (elfNN_aarch64_tls_relax): Likewise.
1907 (elfNN_aarch64_relocate_section): Likewise.
1908 (elfNN_aarch64_gc_sweep_hook): Likewise.
1909 (elfNN_aarch64_check_relocs): Likewise.
1910 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
1911 (_bfd_aarch64_elf_resolve_relocation): Likewise.
1912
1913 2017-03-11 Alan Modra <amodra@gmail.com>
1914
1915 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
1916 parameter is in fact used. Whitespace fixes.
1917 * elf64-ppc.c: Likewise.
1918
1919 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
1920
1921 * rs6000-core.c (CORE_NEW): Simplify macro when
1922 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
1923
1924 2017-03-07 Alan Modra <amodra@gmail.com>
1925
1926 PR 21224
1927 PR 20519
1928 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
1929 dyn_relocs check.
1930
1931 2017-03-05 Alan Modra <amodra@gmail.com>
1932
1933 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
1934 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
1935 (next_cie_fde_offset): New function.
1936 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
1937 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
1938 four bytes. Align CIEs to four or eight bytes depending on
1939 per_encoding_aligned8. Align FDEs according to their encoding.
1940 Pad last FDE to output section alignment.
1941 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
1942 assertion.
1943 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
1944 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
1945 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
1946
1947 2017-03-02 Martin Bickel <binutils@ineranves.de>
1948
1949 PR ld/21212
1950 * elf.c (rewrite_elf_program_header): Do not issue a warning for
1951 empty segments which have a zero filesz, but a non-zero memsz.
1952
1953 2017-03-02 Alan Modra <amodra@gmail.com>
1954
1955 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
1956
1957 2017-02-28 Alan Modra <amodra@gmail.com>
1958
1959 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
1960 (ppc64_elf_relocate_section): Likewise.
1961
1962 2017-02-28 Alan Modra <amodra@gmail.com>
1963
1964 PR 20995
1965 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
1966 rather than elf32_nios2_hash_table or elf_hash_table.
1967 (create_got_section): Likewise.
1968 (nios2_elf32_finish_dynamic_symbol): Likewise.
1969 (nios2_elf32_adjust_dynamic_symbol): Likewise.
1970 (nios2_elf32_size_dynamic_sections): Likewise.
1971 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
1972 vars. Use htab equivalents directly instead. Don't create
1973 all dynamic sections on needing just the GOT. Use a goto
1974 rather than a fall-through with reloc test. Ensure
1975 htab->dynobj is set when making dynamic sreloc section.
1976 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
1977 equivalent directly instead. Don't segfault on looking for
1978 .dynamic when dynamic sections have not been created. Don't
1979 segfault on .got.plt being discarded.
1980 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
1981 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
1982 fixme and another not so relevant comment.
1983 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
1984 already set, set hash table dynobj on creating .sbss.
1985
1986 2017-02-28 Alan Modra <amodra@gmail.com>
1987
1988 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
1989 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
1990 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
1991 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
1992 (ppc64_elf_relocate_section): Likewise.
1993 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
1994 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
1995 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
1996 * libbfd.h: Regenerate.
1997 * bfd-in2.h: Regenerate.
1998
1999 2017-02-28 Alan Modra <amodra@gmail.com>
2000
2001 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
2002 dynamic .data.rel.ro read-only.
2003 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
2004 rather than section flags when deciding where copy reloc goes.
2005 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
2006 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
2007 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
2008 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
2009 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
2010 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
2011 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
2012 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
2013 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
2014 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
2015 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
2016 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
2017 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
2018 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
2019 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
2020 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
2021 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
2022 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
2023 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
2024
2025 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
2026
2027 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
2028 `jalr $0, $25' instruction encoding.
2029
2030 2017-02-27 Nick Clifton <nickc@redhat.com>
2031
2032 PR ld/21180
2033 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
2034 generating a seg-fault when encountering a symbol that has been
2035 deleted by garbage collection.
2036
2037 2017-02-25 Alan Modra <amodra@gmail.com>
2038
2039 * elf32-arc.c (struct dynamic_sections): Delete.
2040 (enum dyn_section_types): Delete.
2041 (dyn_section_names): Delete.
2042 (arc_create_dynamic_sections): Delete.
2043 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
2044 segfault on discarded .rela.plt section.
2045 (elf_arc_size_dynamic_sections): Formatting. Don't call
2046 arc_create_dynamic_sections. Don't allocate memory for sections
2047 handled by the generic linker. Correct code finding relocs in
2048 read-only sections. Set SEC_EXCLUDE on zero size .got,
2049 .got.plt, and .dynbss sections. Do set .interp for pies.
2050
2051 2017-02-24 Andrew Waterman <andrew@sifive.com>
2052
2053 * elfnn-riscv.c (GP_NAME): New macro.
2054 (riscv_global_pointer_value): Use it.
2055 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
2056 output section, consider only that section's alignment.
2057
2058 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
2059
2060 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
2061 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
2062 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
2063 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
2064
2065 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
2066
2067 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
2068 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
2069 or misaligned.
2070
2071 2017-02-23 Alan Modra <amodra@gmail.com>
2072
2073 PR 20744
2074 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
2075 16D relocations.
2076 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
2077 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
2078 relocs.
2079
2080 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
2081
2082 PR ld/20828
2083 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
2084 processing ahead of the call to `elf_gc_sweep_symbol'.
2085
2086 2017-02-22 Nick Clifton <nickc@redhat.com>
2087
2088 PR binutils/21193
2089 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
2090 created section 4-byte alignment.
2091
2092 2017-02-22 Alan Modra <amodra@gmail.com>
2093
2094 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
2095 on .got or .plt output section being discarded by script.
2096 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
2097 vxworks splt temp.
2098
2099 2017-02-21 Alan Modra <amodra@gmail.com>
2100
2101 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
2102 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
2103
2104 2017-02-20 Alan Modra <amodra@gmail.com>
2105
2106 PR 21181
2107 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
2108 if DT_RELSZ/DT_RELASZ is zero.
2109
2110 2017-02-17 Nick Clifton <nickc@redhat.com>
2111
2112 * compress.c (bfd_get_full_section_contents): Remember to reduce
2113 compressed size by the sizeof the compression header when
2114 decompressing the contents.
2115
2116 2017-02-17 Pedro Alves <palves@redhat.com>
2117
2118 * srec.c (Chunk): Rename to ...
2119 (_bfd_srec_len): ... this.
2120 (S3Forced): Rename to ...
2121 (_bfd_srec_forceS3): ... this.
2122 * objcopy.c: Adjust all references.
2123
2124 2017-02-17 Pedro Alves <palves@redhat.com>
2125
2126 * archive.c (bsd_write_armap): Rename to ...
2127 (_bfd_bsd_write_armap): ... this.
2128 (coff_write_armap): Rename to ...
2129 (_bfd_coff_write_armap): ... this.
2130 * libbfd-in.h (bsd_write_armap): Rename to ...
2131 (_bfd_bsd_write_armap): ... this.
2132 (coff_write_armap): Rename to ...
2133 (_bfd_coff_write_armap): ... this.
2134 * aout-target.h, aout-tic30.c: Adjust all users.
2135 * libbfd.h: Regenerate.
2136
2137 2017-02-17 Pedro Alves <palves@redhat.com>
2138
2139 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
2140 (warn_deprecated): Rename to ...
2141 (_bfd_warn_deprecated): ... this.
2142 * libbfd.c (warn_deprecated): Rename to ...
2143 (_bfd_warn_deprecated): ... this.
2144 * bfd-in2.h: Regenerate.
2145
2146 2017-02-17 Pedro Alves <palves@redhat.com>
2147
2148 * bfdio.c (real_ftell): Rename to ...
2149 (_bfd_real_ftell): ... this.
2150 (real_fseek): Rename to ...
2151 (_bfd_real_fseek): ... this.
2152 (real_fopen): Rename to ...
2153 (_bfd_real_fopen): ... this.
2154 * libbfd-in.h (real_ftell): Rename to ...
2155 (_bfd_real_ftell): ... this.
2156 (real_fseek): Rename to ...
2157 (_bfd_real_fseek): ... this.
2158 (real_fopen): Rename to ...
2159 (_bfd_real_fopen): ... this.
2160 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
2161 * libbfd.h: Regenerate.
2162
2163 2017-02-17 Pedro Alves <palves@redhat.com>
2164
2165 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
2166 * libbfd.c (read_unsigned_leb128): Rename to ...
2167 (_bfd_read_unsigned_leb128): ... this.
2168 (read_signed_leb128): Rename to ...
2169 (_bfd_read_signed_leb128): ... this.
2170 (safe_read_leb128): Rename to ...
2171 (_bfd_safe_read_leb128): ... this.
2172 * libbfd-in.h (read_unsigned_leb128): Rename to ...
2173 (_bfd_read_unsigned_leb128): ... this.
2174 (read_signed_leb128): Rename to ...
2175 (_bfd_read_signed_leb128): ... this.
2176 (safe_read_leb128): Rename to ...
2177 (_bfd_safe_read_leb128): ... this.
2178 * libbfd.h: Renegerate.
2179
2180 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
2181
2182 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
2183 before trying to fine matching file and line information.
2184
2185 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
2186
2187 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
2188 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
2189 not match current bfd, then reload debug information. Record bfd
2190 we're loading debug info for in the stash. If we have debug
2191 informatin in the cache then perform section placement before
2192 returning.
2193
2194 2017-02-16 Alan Modra <amodra@gmail.com>
2195
2196 PR 21000
2197 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
2198 * elfxx-target.h (elf_backend_no_page_alias): Define.
2199 (elfNN_bed): Init new field.
2200 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
2201 ensure PT_LOAD segment starts on a new page.
2202 * elf32-hppa.c (elf_backend_no_page_alias): Define.
2203
2204 2017-02-16 Alan Modra <amodra@gmail.com>
2205
2206 PR 21132
2207 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
2208 if pic.
2209
2210 2017-02-16 Jiong Wang <jiong.wang@arm.com>
2211
2212 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
2213 * bfd-in2.h: Regenerated.
2214
2215 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
2216
2217 PR ld/21168
2218 * elf32-i386.c (elf_i386_relocate_section): Allow
2219 "lea foo@GOT, %reg" in PIC.
2220
2221 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
2222
2223 PR ld/20244
2224 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
2225 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
2226 error against local IFUNC symbol without a base register for
2227 PIC.
2228
2229 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
2230
2231 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
2232 `%P: %H:' with `info->callbacks->einfo'.
2233 (ppc_elf_relocate_section): Likewise.
2234 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
2235 (ppc64_elf_edit_toc): Likewise.
2236 (ppc64_elf_relocate_section): Likewise.
2237
2238 2017-02-14 Alan Modra <amodra@gmail.com>
2239
2240 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
2241 --gc-keep-exported, and test versioned field of sym rather than
2242 looking for @ in name.
2243
2244 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
2245
2246 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
2247 __global_pointer$.
2248
2249 2017-02-13 Nick Clifton <nickc@redhat.com>
2250
2251 PR binutils/21151
2252 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
2253 unit length field.
2254
2255 2017-02-07 Andrew Waterman <andrew@sifive.com>
2256
2257 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
2258 entry size if PLT header is written.
2259
2260 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
2261
2262 Fix sparc64 dynamic relocation processing to use the dynamic
2263 symbol count.
2264 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
2265 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
2266 should be used.
2267
2268 2017-02-03 Nick Clifton <nickc@redhat.com>
2269
2270 PR 21096
2271 * coffcode.h (coff_write_object_contents): Enlarge size of
2272 s_name_buf in order to avoid compile time warning about possible
2273 integer truncation.
2274 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
2275 32-bits of insn value before printing into buffer.
2276
2277 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
2278
2279 * elfxx-mips.c (mips_elf_hash_sort_data): Add
2280 `max_local_dynindx'.
2281 (mips_elf_sort_hash_table): Handle it.
2282 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
2283 symbols bump up `max_local_dynindx' rather than
2284 `max_non_got_dynindx'.
2285
2286 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
2287
2288 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
2289 `min_got_dynindx', `max_unref_got_dynindx' and
2290 `max_non_got_dynindx' members to the `bfd_size_type' data type.
2291 (mips_elf_sort_hash_table): Adjust accordingly.
2292
2293 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
2294
2295 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
2296 to access the hash table.
2297
2298 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
2299
2300 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
2301 non-NULL `htab' to the beginning.
2302
2303 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
2304
2305 * elflink.c (elf_gc_sweep): Wrap overlong line.
2306
2307 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
2308
2309 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
2310 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
2311 * elfxx-mips.c (mips_elf_link_hash_table): Add
2312 `ignore_branch_isa' member.
2313 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
2314 in branch relocation calculation as an error if
2315 `ignore_branch_isa' has been set.
2316 (_bfd_mips_elf_insn32): Rename to...
2317 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
2318 parameter to `insn32' and add an `ignore_branch_isa' parameter.
2319 Handle the new parameter.
2320
2321 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
2322
2323 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
2324 local variable dynobj.
2325
2326 PR ld/20995
2327 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
2328 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
2329 executable from read-only sections into sdynrelro.
2330 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
2331 dynamic relocs in sdynrelro.
2332 (elf_backend_want_dynrelro): Define.
2333
2334 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
2335
2336 * config.bfd (*-*-rtemsaout*): Mark as removed.
2337
2338 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
2339
2340 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
2341 (arm-*-rtems*): Move to (arm*-*-eabi*).
2342 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
2343 (m68-*-rtems*): Move to (m68*-*-elf*).
2344
2345 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
2346
2347 * config.bfd (*-*-rtemscoff*): Mark as removed.
2348
2349 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
2350
2351 PR ld/20828
2352 * elflink.c (bfd_elf_record_link_assignment): Revert last
2353 change and don't ever clear `forced_local'. Set `mark'
2354 unconditionally.
2355 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
2356 file.
2357 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
2358 (bfd_elf_size_dynamic_sections): ... here.
2359 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
2360 and set `mark' instead in `__tls_get_addr_opt' processing.
2361 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
2362
2363 2017-01-24 Alan Modra <amodra@gmail.com>
2364
2365 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
2366 where dynamic relocs are preferable. Allow ifunc too.
2367 (ensure_undefweak_dynamic): New function.
2368 (allocate_dynrelocs): Use it here. Move plt handling last and
2369 don't make symbols dynamic, simplifying loop. Only make undef
2370 weak symbols with GOT entries dynamic. Correct condition
2371 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
2372 comments. Remove goto.
2373 (ppc_elf_relocate_section): Correct test for using dynamic
2374 symbol on GOT relocs. Rearrange test for emitting GOT relocs
2375 to suit. Set up explicit tls_index entries and implicit GOT
2376 tls_index entries resolvable at link time for
2377 __tls_get_addr_opt. Simplify test to clear mem for prelink.
2378 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
2379 (ensure_undefweak_dynamic): New function.
2380 (allocate_dynrelocs): Use it here. Only make undef weak symbols
2381 with GOT entries dynamic. Remove unnecessary test of
2382 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
2383 (ppc64_elf_relocate_section): Correct test for using dynamic
2384 symbol on GOT relocs. Rearrange test for emitting GOT relocs
2385 to suit. Set up explicit tls_index entries and implicit GOT
2386 tls_index entries resolvable at link time for __tls_get_addr_opt.
2387 Simplify expression to clear mem for prelink.
2388
2389 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
2390
2391 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
2392
2393 2017-01-20 Jiong Wang <jiong.wang@arm.com>
2394
2395 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
2396 (elf_backend_hash_symbol): Define.
2397
2398 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
2399
2400 PR ld/20828
2401 * elflink.c (bfd_elf_record_link_assignment): Clear any
2402 `forced_local' marking for DSO symbols that are not being
2403 provided.
2404
2405 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
2406
2407 * elfnn-riscv.c (riscv_elf_object_p): New function.
2408
2409 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
2410
2411 PR ld/21038
2412 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
2413 plt_bnd_eh_frame.
2414 (elf_x86_64_check_relocs): Create .eh_frame section for the
2415 .plt.bnd section.
2416 (elf_x86_64_size_dynamic_sections): Allocate and initialize
2417 .eh_frame section for the .plt.bnd section.
2418 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
2419 for the .plt.bnd section.
2420
2421 2017-01-12 Nick Clifton <nickc@redhat.com>
2422
2423 PR binutils/20876
2424 * opncls.c (find_separate_debug_file): Add include_dirs
2425 parameter. Only include the directory part of the bfd's filename
2426 in search paths if include_dirs is true. Add a couple of extra
2427 locations for looking for debug files.
2428 ( bfd_follow_gnu_debuglink): Update invocation of
2429 find_separate_debug_file.
2430 (bfd_follow_gnu_debugaltlink): Likewise.
2431 (get_build_id): New function: Finds the build-id of the given bfd.
2432 (get_build_id_name): New function: Computes the name of the
2433 separate debug info file for a bfd, based upon its build-id.
2434 (check_build_id_file): New function: Checks to see if a separate
2435 debug info file exists at the given location, and that its
2436 build-id matches that of the original bfd.
2437 (bfd_follow_build_id_debuglink): New function: Finds a separate
2438 debug info file for a given bfd by using the build-id method.
2439 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
2440 method of locating a separate debug info file before using the
2441 debuglink method.
2442 * bfd-in2.h: Regenerate.
2443
2444 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
2445
2446 PR ld/21038
2447 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
2448 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
2449 elf_x86_64_eh_frame_plt_got.
2450 (elf_x86_64_size_dynamic_sections): Get unwind info from
2451 elf_x86_64_bnd_arch_bed for the BND PLT.
2452
2453 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
2454
2455 * config.bfd: Add entries for i686-redox and x86_64-redox.
2456
2457 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
2458
2459 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
2460 to 4 bytes.
2461 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
2462 .eh_frame section to 4 bytes for x32.
2463 (elf_x86_64_check_relocs): Likewise.
2464
2465 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
2466
2467 PR ld/20830
2468 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
2469 (PLT_GOT_FDE_LENGTH): Likewise.
2470 (elf_i386_plt_layout): Add eh_frame_plt_got and
2471 eh_frame_plt_got_size.
2472 (elf_i386_plt): Updated.
2473 (elf_i386_link_hash_table): Add plt_got_eh_frame.
2474 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
2475 (elf_i386_size_dynamic_sections): Allocate and initialize
2476 .eh_frame section for .plt.got.
2477 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
2478 .plt.got.
2479 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
2480 eh_frame_plt_got_size.
2481 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
2482 (PLT_GOT_FDE_LENGTH): Likewise.
2483 (elf_x86_64_backend_data): Add eh_frame_plt_got and
2484 eh_frame_plt_got_size.
2485 (elf_x86_64_arch_bed): Updated.
2486 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
2487 eh_frame_plt_got_size.
2488 (elf_x86_64_nacl_arch_bed): Likewise.
2489 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
2490 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
2491 (elf_x86_64_size_dynamic_sections): Allocate and initialize
2492 .eh_frame section for .plt.got.
2493 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
2494 for .plt.got.
2495
2496 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
2497
2498 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
2499 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
2500
2501 2017-01-09 Nick Clifton <nickc@redhat.com>
2502
2503 * dwarf2.c (lookup_address_in_function_table): Return early if
2504 there are no functions in the given comp unit, or if the high
2505 address of the last function in the comp unit is less than the
2506 desired address.
2507
2508 2017-01-09 Nick Clifton <nickc@redhat.com>
2509
2510 PR binutils/21013
2511 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
2512 message if there are too many symbols to load.
2513
2514 2017-01-04 James Clarke <jrtc27@jrtc27.com>
2515
2516 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
2517 if relocs are cached.
2518
2519 2017-01-03 Rich Felker <bugdal@aerifal.cx>
2520
2521 PR ld/21017
2522 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
2523 for R_MICROBLAZE_GOTOFF_64.
2524
2525 2017-01-03 Nick Clifton <nickc@redhat.com>
2526
2527 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
2528 warning about using a possibly uninitialised variable.
2529
2530 2017-01-02 Alan Modra <amodra@gmail.com>
2531
2532 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
2533 (allocate_plt_static, allocate_dynrelocs): Use it.
2534
2535 2017-01-02 Alan Modra <amodra@gmail.com>
2536
2537 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
2538 .PARISC.unwind section.
2539
2540 2017-01-02 Alan Modra <amodra@gmail.com>
2541
2542 PR ld/20989
2543 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
2544 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
2545 indirect to GOT pointer relative code edit.
2546
2547 2017-01-02 Alan Modra <amodra@gmail.com>
2548
2549 Update year range in copyright notice of all files.
2550
2551 For older changes see ChangeLog-2016
2552 \f
2553 Copyright (C) 2017 Free Software Foundation, Inc.
2554
2555 Copying and distribution of this file, with or without modification,
2556 are permitted in any medium without royalty provided the copyright
2557 notice and this notice are preserved.
2558
2559 Local Variables:
2560 mode: change-log
2561 left-margin: 8
2562 fill-column: 74
2563 version-control: never
2564 End:
This page took 0.082996 seconds and 4 git commands to generate.