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