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