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