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