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