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