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