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