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