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