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