1 2017-06-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
3 * elf32-arm.c (using_thumb_only): Update list of architectures in
4 BFD_ASSERT for which the logic is valid.
5 (using_thumb2_bl): Likewise.
6 (using_thumb2): Likewise and return true for ARMv8-R.
7 (arch_has_arm_nop): Likewise.
8 (tag_cpu_arch_combine): New v8r table for ARMv8-R Tag_CPU_arch
9 merging logic. Update commentis for value 15 of v8m_baseline,
10 v8m_mainline and v4t_plus_v6_m arrays. Use v8r array to decide
11 merging of value 15 of Tag_CPU_arch.
13 2017-06-23 Jiong Wang <jiong.wang@arm.com>
15 * reloc.c (BFD_RELOC_AARCH64_ADR_GOTPAGE): Rename to
16 BFD_RELOC_AARCH64_ADR_GOT_PAGE
17 * bfd-in2.h: Regenerate.
19 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
21 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Move
22 the error_alignment label forward. Properly align program
23 property note section.
25 2017-06-22 Eric Christopher <echristo@gmail.com>
27 * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than
28 abs to fix a truncation warning.
30 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
32 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Resolve
33 local undefined weak symbol to 0.
34 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Likewise.
36 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
38 * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk
39 is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
40 (elf_i386_link_setup_gnu_properties): If info->shstk is set,
41 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
42 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If
43 info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
44 (elf_x86_64_link_setup_gnu_properties): If info->shstk is set,
45 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
47 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
49 * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
50 (elf_i386_lazy_ibt_plt_entry): Likewise.
51 (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
52 (elf_i386_non_lazy_ibt_plt_entry): Likewise.
53 (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
54 (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
55 (elf_i386_lazy_plt_layout): Likewise.
56 (elf_i386_non_lazy_plt_layout): Likewise.
57 (elf_i386_link_hash_entry): Add plt_second.
58 (elf_i386_link_hash_table): Add plt_second and
60 (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
61 (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
62 the second PLT. Check the second PLT.
63 (elf_i386_relocate_section): Use the second PLT to resolve
64 PLT reference if needed.
65 (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
67 (elf_i386_finish_dynamic_sections): Set sh_entsize on the
68 second PLT. Generate unwind info for the second PLT.
69 (elf_i386_plt_type): Add plt_second.
70 (elf_i386_get_synthetic_symtab): Support the second PLT.
71 (elf_i386_parse_gnu_properties): Support
72 GNU_PROPERTY_X86_FEATURE_1_AND.
73 (elf_i386_merge_gnu_properties): Support
74 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
75 on GNU_PROPERTY_X86_FEATURE_1_IBT
76 (elf_i386_link_setup_gnu_properties): If info->ibt is set,
77 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
78 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
79 is set on all relocatable inputs.
80 * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
81 (elf_x32_lazy_ibt_plt_entry): Likewise.
82 (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
83 (elf_x32_non_lazy_ibt_plt_entry): Likewise.
84 (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
85 (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
86 (elf_x86_64_lazy_ibt_plt): Likewise.
87 (elf_x32_lazy_ibt_plt): Likewise.
88 (elf_x86_64_non_lazy_ibt_plt): Likewise.
89 (elf_x32_non_lazy_ibt_plt): Likewise.
90 (elf_x86_64_get_synthetic_symtab): Support the second PLT.
91 (elf_x86_64_parse_gnu_properties): Support
92 GNU_PROPERTY_X86_FEATURE_1_AND.
93 (elf_x86_64_merge_gnu_properties): Support
94 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
95 on GNU_PROPERTY_X86_FEATURE_1_IBT
96 (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
97 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
98 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
99 is set on all relocatable inputs.
101 2017-06-22 Nick Clifton <nickc@redhat.com>
104 * som.c (setup_sections): NUL terminate the space_strings buffer.
105 Check that the space.name field does not index beyond the end of
106 the space_strings buffer.
108 2017-06-21 Nick Clifton <nickc@redhat.com>
111 * coff-sh.c (sh_reloc): Check for an out of range reloc.
113 2017-06-21 Nick Clifton <nickc@redhat.com>
116 * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
117 type of the size parameter.
118 (_bfd_vms_save_counted_string): Add second parameter - the maximum
119 length of the counted string.
120 * vms.h (_bfd_vms_save_sized_string): Update prototype.
121 (_bfd_vms_save_counted_string): Likewise.
122 * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
123 _bfd_vms_save_counted_string.
124 (_bfd_vms_slurp_ehdr): Likewise.
125 (_bfd_vms_slurp_egsd): Likewise.
126 (Parse_module): Likewise.
128 2017-06-21 Alan Modra <amodra@gmail.com>
130 * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
131 calls before tocsave calls.
132 (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
135 2017-06-21 Nick Clifton <nickc@redhat.com>
138 * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
139 bfd_get_full_section_contents returns no contents.
141 2017-06-21 Nick Clifton <nickc@redhat.com>
144 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
147 2017-06-21 Nick Clifton <nickc@redhat.com>
150 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
152 (image_set_ptr): Likewise.
153 (alpha_vms_fix_sec_rel): Likewise.
154 (alpha_vms_slurp_relocs): Likewise.
156 2017-06-21 Nick Clifton <nickc@redhat.com>
159 * ieee.c (ieee_slurp_sections): Check for a NULL return from
161 (ieee_archive_p): Likewise.
162 (ieee_object_p): Likewise.
164 2017-06-21 Nick Clifton <nickc@redhat.com>
167 * elf.c (setup_group): Zero the group section pointer list after
168 allocation so that loops can be caught. Check for NULL pointers
169 when processing a group list.
171 2017-06-19 H.J. Lu <hongjiu.lu@intel.com>
174 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
175 the DYNAMIC bit instead of bfd_count_sections.
177 2017-06-19 Nick Clifton <nickc@redhat.com>
180 * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
182 (evax_bfd_print_eeom): Likewise.
183 (evax_bfd_print_egsd): Check for an overlarge record length.
184 (evax_bfd_print_etir): Likewise.
186 2017-06-19 Nick Clifton <nickc@redhat.com>
189 * libieee.h (struct common_header_type): Add end_p field.
190 * ieee.c (this_byte_and_next): Do not advance input_p beyond
192 (read_id): Check for a length that exceeds the remaining bytes in
194 (ieee_seek): Initialise end_p.
195 (ieee_archive_p): Likewise.
196 (ieee_object_p): Likewise.
198 2017-06-19 Nick Clifton <nickc@redhat.com>
201 * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
202 before reading the EIHS structure entries.
204 2017-06-19 Nick Clifton <nickc@redhat.com>
207 * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
208 gsd_size. Check that there are enough bytes remaining to read the
209 type and size of the next egsd. Check that the size of the egsd
210 does not exceed the size of the record.
212 2017-06-19 Alan Modra <amodra@gmail.com>
214 * config.bfd: Correct targ_underscore for cris.
216 2017-06-18 Alan Modra <amodra@gmail.com>
218 * config.bfd: Correct targ_underscore for epiphany, ip2k,
219 m32c, mn10200, pru, rl78, rx, crisv32 and v850.
221 2017-06-16 Nick Clifton <nickc@redhat.com>
223 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
224 bucketlist is empty because there are no symbols to add to the
227 2017-06-16 Alan Modra <amodra@gmail.com>
233 * targets.c (struct bfd_target): Add _bfd_define_start_stop.
234 (BFD_JUMP_TABLE_LINK): Likewise.
235 * elf-bfd.h (bfd_elf_define_start_stop): Declare.
236 * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
237 (bfd_elf_define_start_stop): New function.
238 * linker.c (bfd_generic_define_start_stop): New function.
239 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
241 * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
242 * aout-target.h (MY_bfd_define_start_stop): Define.
243 * aout-tic30.c (MY_bfd_define_start_stop): Define.
244 * binary.c (binary_bfd_define_start_stop): Define.
245 * bout.c (b_out_bfd_define_start_stop): Define.
246 * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
247 * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
248 * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
249 * coffcode.h (coff_bfd_define_start_stop): Define.
250 * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
251 * i386msdos.c (msdos_bfd_define_start_stop): Define.
252 * i386os9k.c (os9k_bfd_define_start_stop): Define.
253 * ieee.c (ieee_bfd_define_start_stop): Define.
254 * ihex.c (ihex_bfd_define_start_stop): Define.
255 * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
256 * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
257 * mmo.c (mmo_bfd_define_start_stop): Define.
258 * nlm-target.h (nlm_bfd_define_start_stop): Define.
259 * oasys.c (oasys_bfd_define_start_stop): Define.
260 * pef.c (bfd_pef_bfd_define_start_stop): Define.
261 * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
262 * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
263 * som.c (som_bfd_define_start_stop): Define.
264 * srec.c (srec_bfd_define_start_stop): Define.
265 * tekhex.c (tekhex_bfd_define_start_stop): Define.
266 * versados.c (versados_bfd_define_start_stop): Define.
267 * vms-alpha.c (vms_bfd_define_start_stop): Define.
268 (alpha_vms_bfd_define_start_stop): Define.
269 * xsym.c (bfd_sym_bfd_define_start_stop): Define.
270 * bfd-in2.h: Regenerate.
271 * libbfd.h: Regenerate.
273 2017-06-16 Jiong Wang <jiong.wang@arm.com>
275 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
276 SYMBOL_REFERENCES_LOCAL.
278 2017-06-15 Jiong Wang <jiong.wang@arm.com>
281 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
282 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
283 runtime for if there needs copy relocation elimination.
284 (need_copy_relocation_p): New function. Return true for symbol with
285 pc-relative references and if it's against read-only sections.
286 (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
287 (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
288 that are related with accessing external objects.
289 (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
290 in elfNN_aarch64_check_relocs.
292 2017-06-15 Nick Clifton <nickc@redhat.com>
295 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
298 (ieee_archive_p): Likewise.
300 2017-06-15 Nick Clifton <nickc@redhat.com>
303 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
305 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
307 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
308 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
309 keep both windowed and call0 ABI PLT definitions.
310 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
311 elf_xtensa_*_plt_entry endex.
312 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
314 2017-06-14 Nick Clifton <nickc@redhat.com>
317 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
320 2017-06-14 Nick Clifton <nickc@redhat.com>
323 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
324 maximum value for the ascic pointer. Check that name processing
325 does not read beyond this value.
326 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
329 2017-06-14 Nick Clifton <nickc@redhat.com>
332 * versados.c (versados_mkobject): Zero the allocated tdata structure.
333 (process_otr): Check for an invalid offset in the otr structure.
335 2017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
337 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
339 2017-06-13 H.J. Lu <hongjiu.lu@intel.com>
345 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
346 vtable field to a union.
347 (_bfd_elf_is_start_stop): Removed.
348 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
349 __start_SECNAME and __stop_SECNAME symbols.
350 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
351 * elflink.c (_bfd_elf_is_start_stop): Removed.
352 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
353 _bfd_elf_is_start_stop.
354 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
355 __stop_SECNAME symbols. Updated.
356 (elf_gc_smash_unused_vtentry_relocs): Likewise.
357 (bfd_elf_gc_record_vtinherit): Likewise.
358 (bfd_elf_gc_record_vtentry): Likewise.
360 2017-06-13 Nick Clifton <nickc@redhat.com>
363 * elflink.c (elf_link_adjust_relocs): Generate an error when
364 encountering a reloc against a symbol removed by garbage
367 2017-06-12 H.J. Lu <hongjiu.lu@intel.com>
369 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
370 to merge_gnu_properties.
371 * elf-properties.c (elf_merge_gnu_properties): Add struct
372 bfd_link_info * and pass it to merge_gnu_properties.
373 (elf_merge_gnu_property_list): Add struct bfd_link_info *
374 and pass it to elf_merge_gnu_properties.
375 (_bfd_elf_link_setup_gnu_properties): Pass info to
376 elf_merge_gnu_property_list.
377 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
379 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
381 2017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
384 * binary.c (binary_set_section_contents): Scale lma by octets
385 per byte to set filepos.
387 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
389 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
392 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
394 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
397 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
399 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
400 patched section contents for TLS IE reloc.
401 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
403 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
405 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
406 RELOC_FOR_GLOBAL_SYMBOL macro.
408 2018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
410 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
413 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
415 * config/tc-arc.c (md_undefined_symbol): Changed.
416 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
418 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
420 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
423 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
425 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
426 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
428 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
430 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
433 2017-06-08 Richard Earnshaw <rearnsha@arm.com>
435 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
436 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
437 is non-zero. Add clarifying comments.
439 2017-06-08 H.J. Lu <hongjiu.lu@intel.com>
441 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
442 name. Use local IFUNC symbol name string to report unsupported
443 non-PIC call to IFUNC function.
444 (elf_i386_relocate_section): Dump local IFUNC name with minfo
445 when generating R_386_IRELATIVE relocation.
446 (elf_i386_finish_dynamic_symbol): Likewise.
447 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
449 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
450 when generating R_X86_64_IRELATIVE relocation.
451 (elf_x86_64_finish_dynamic_symbol): Likewise.
453 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
455 * elf.c (setup_group): Make sure BFD sections are created for all
456 group sections in the input file when processing SHF_GROUP
458 (bfd_section_from_shdr): Avoid duplicating logic already
459 implemented in `setup_group'.
461 2017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
464 * peXXigen.c (pe_print_idata): Use the address of the first thunk
465 if the hint address is zero.
467 2017-06-06 James Clarke <jrtc27@jrtc27.com>
470 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
471 ELF_COMMON_DEF_P for common symbols.
473 2017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
475 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
476 SEC_GROUP sections as SEC_EXCLUDE.
477 (bfd_elf_set_group_contents): Replace use of abort with an assert.
478 (assign_section_numbers): Use resolve_section_groups flag instead
479 of relocatable link type.
480 (_bfd_elf_init_private_section_data): Use resolve_section_groups
481 flag instead of checking the final_link flag for part of the
482 checks in here. Fix white space as a result.
483 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
484 instead of relocatable link type.
485 (bfd_elf_final_link): Likewise.
487 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
489 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
491 * elf32-score.c (score_elf_final_link_relocate): Likewise.
492 (s3_bfd_score_elf_check_relocs): Likewise.
493 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
494 (score_elf_final_link_relocate): Likewise.
495 (s7_bfd_score_elf_check_relocs): Likewise.
497 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
499 * elflink.c (init_reloc_cookie_rels): Remove unused variable
502 2017-06-06 Maciej W. Rozycki <macro@imgtec.com>
504 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
505 from `reloc_count' rather than decrementing it.
506 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
507 `reloc_count' by `int_rels_per_ext_rel'.
508 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
509 `reloc_count' by `int_rels_per_ext_rel' for last relocation
511 (s3_bfd_score_elf_check_relocs): Likewise.
512 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
513 (s7_bfd_score_elf_relocate_section): Likewise.
514 (s7_bfd_score_elf_check_relocs): Likewise.
515 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
516 prototype and function.
517 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
518 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
519 triple rather than once the sum of REL and RELA relocation entry
521 (bfd_elf64_get_reloc_upper_bound): Remove macro.
522 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
523 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
524 storage allocation size determination.
525 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
526 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
527 by `int_rels_per_ext_rel' for last relocation entry
529 (bfd_elf_final_link): Do not multiply `reloc_count' by
530 `int_rels_per_ext_rel' for internal relocation storage
531 allocation size determination.
532 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
533 `int_rels_per_ext_rel' for last relocation entry determination.
534 (elf_gc_smash_unused_vtentry_relocs): Likewise.
535 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
536 (_bfd_mips_elf_relocate_section): Likewise.
538 2017-06-05 Alan Modra <amodra@gmail.com>
541 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
543 2017-06-01 John Baldwin <jhb@FreeBSD.org>
545 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
546 determine structure sizes.
547 (elfcore_grok_freebsd_prstatus): Likewise.
549 2017-06-01 Alan Modra <amodra@gmail.com>
551 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
552 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
554 (is_elfv2_localentry0): New function.
555 (ppc64_elf_tls_setup): Default params->plt_localentry0.
556 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
557 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
558 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
559 optimized localentry:0 stubs.
560 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
561 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
563 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
565 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
567 2017-05-30 Casey Smith <clegg89@gmail.com>
570 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
571 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
573 2017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
575 * cpu-arc.c (arc_compatible): New function.
577 2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
579 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
581 2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
584 * bfdio.c (bfd_get_file_size): New function.
585 * bfd-in2.h: Regenerated.
587 2017-05-23 Dilian Palauzov <git-dpa@aegee.org>
589 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
592 2017-05-22 H.J. Lu <hongjiu.lu@intel.com>
594 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
595 dynobj instead of htab->elf.dynobj.
597 2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
599 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
601 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
602 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
603 actual number of internal relocations retrieved. Adjust
604 function description.
605 (bfd_elf64_canonicalize_reloc): Remove macro.
606 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
608 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
610 * archures.c (bfd_mach_sparc_v9m8): Define.
611 (bfd_mach_sparc_v8plusm8): Likewise.
612 (bfd_mach_sparc_v9_p): Adjust to M8.
613 (bfd_mach_sparc_64bit_p): Likewise.
614 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
615 bfd_mach_sparc_v8plusm8.
616 * bfd-in2.h: Regenerated.
617 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
619 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
620 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
621 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
623 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
624 bfd_mach_sparc_v8plusm8.
626 2017-05-19 Alan Modra <amodra@gmail.com>
628 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
629 debug and special sections when no non-note alloc sections in an
632 2017-05-18 Alan Modra <amodra@gmail.com>
634 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
635 * elf-m10300.c: Likewise.
637 * elf32-arc.c: Likewise.
638 * elf32-bfin.c: Likewise.
639 * elf32-m68k.c: Likewise.
640 * elf32-nds32.c: Likewise.
641 * elf32-tilepro.c: Likewise.
642 * elflink.c: Likewise.
643 * elfnn-aarch64.c: Likewise.
644 * elfnn-riscv.c: Likewise.
645 * elfxx-tilegx.c: Likewise.
646 * mach-o.c: Likewise.
647 * peXXigen.c: Likewise.
648 * vms-alpha.c: Likewise.
649 * vms-lib.c: Likewise.
651 2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
654 * elflink.c (elf_gc_mark_debug_section): New function.
655 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
656 referenced by kept debug sections.
658 2017-05-16 Alan Modra <amodra@gmail.com>
660 * elf-m10300.c: Rename occurrences of non_ir_ref.
661 * elf32-arm.c: Likewise.
662 * elf32-bfin.c: Likewise.
663 * elf32-cr16.c: Likewise.
664 * elf32-cris.c: Likewise.
665 * elf32-d10v.c: Likewise.
666 * elf32-dlx.c: Likewise.
667 * elf32-fr30.c: Likewise.
668 * elf32-frv.c: Likewise.
669 * elf32-hppa.c: Likewise.
670 * elf32-i370.c: Likewise.
671 * elf32-i386.c: Likewise.
672 * elf32-iq2000.c: Likewise.
673 * elf32-lm32.c: Likewise.
674 * elf32-m32c.c: Likewise.
675 * elf32-m32r.c: Likewise.
676 * elf32-m68hc1x.c: Likewise.
677 * elf32-m68k.c: Likewise.
678 * elf32-mcore.c: Likewise.
679 * elf32-metag.c: Likewise.
680 * elf32-microblaze.c: Likewise.
681 * elf32-moxie.c: Likewise.
682 * elf32-msp430.c: Likewise.
683 * elf32-mt.c: Likewise.
684 * elf32-nios2.c: Likewise.
685 * elf32-or1k.c: Likewise.
686 * elf32-ppc.c: Likewise.
687 * elf32-rl78.c: Likewise.
688 * elf32-s390.c: Likewise.
689 * elf32-score.c: Likewise.
690 * elf32-score7.c: Likewise.
691 * elf32-sh.c: Likewise.
692 * elf32-tic6x.c: Likewise.
693 * elf32-tilepro.c: Likewise.
694 * elf32-v850.c: Likewise.
695 * elf32-vax.c: Likewise.
696 * elf32-xstormy16.c: Likewise.
697 * elf32-xtensa.c: Likewise.
698 * elf64-alpha.c: Likewise.
699 * elf64-hppa.c: Likewise.
700 * elf64-ia64-vms.c: Likewise.
701 * elf64-mmix.c: Likewise.
702 * elf64-ppc.c: Likewise.
703 * elf64-s390.c: Likewise.
704 * elf64-sh64.c: Likewise.
705 * elf64-x86-64.c: Likewise.
706 * elflink.c: Likewise.
707 * elfnn-aarch64.c: Likewise.
708 * elfnn-ia64.c: Likewise.
709 * elfnn-riscv.c: Likewise.
710 * elfxx-mips.c: Likewise.
711 * elfxx-sparc.c: Likewise.
712 * elfxx-tilegx.c: Likewise.
713 * linker.c: Likewise.
715 2017-05-16 Alan Modra <amodra@gmail.com>
717 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
718 * elflink.c (elf_link_add_object_symbols): Update to use
720 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
722 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
724 2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
726 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
728 2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
730 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
731 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
733 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
735 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
737 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
739 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
740 to plt_second/plt_second_eh_frame.
741 (elf_x86_64_link_hash_newfunc): Updated.
742 (elf_x86_64_allocate_dynrelocs): Likewise.
743 (elf_x86_64_size_dynamic_sections): Likewise.
744 (elf_x86_64_relocate_section): Likewise.
745 (elf_x86_64_finish_dynamic_symbol): Likewise.
746 (elf_x86_64_finish_dynamic_sections): Likewise.
747 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
748 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
750 (elf_backend_setup_gnu_properties): Updated. Create the
751 .plt.sec section instead of the .plt.sec section.
753 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
755 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
756 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
757 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
759 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
761 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
762 (bfd_elf64_set_reloc): Define.
763 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
765 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
767 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
768 (struct bfd_target): New field _bfd_set_reloc.
769 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
770 * reloc.c (_bfd_generic_set_reloc): New function.
771 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
772 * nlm-target.h (nlm_set_reloc): Likewise.
773 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
774 * aout-tic30.c (MY_set_reloc): Likewise.
775 * aout-target.h (MY_set_reloc): Likewise.
776 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
777 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
778 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
779 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
780 * aout-adobe.c (aout_32_set_reloc): Likewise.
781 * bout.c (b_out_set_reloc): Likewise.
782 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
783 * i386os9k.c (aout_32_set_reloc): Likewise.
784 * ieee.c (ieee_set_reloc): Likewise.
785 * oasys.c (oasys_set_reloc): Likewise.
786 * som.c (som_set_reloc): Likewise.
787 * versados.c (versados_set_reloc): Likewise.
788 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
789 _bfd_generic_set_reloc.
790 (rs6000_xcoff64_aix_vec): LIkewise.
791 * libbfd.c (_bfd_norelocs_set_reloc): New function.
792 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
793 * i386msdos.c (msdos_set_reloc): Define to
794 _bfd_norelocs_set_reloc.
795 * elfcode.h (elf_set_reloc): Define.
796 * bfd-in2.h: Regenerated.
798 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
801 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
802 for IFUNC function address.
804 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
806 * elf32-arc.c (FEATURE_LIST_NAME): Define.
807 (CONFLICT_LIST): Likewise.
808 (opcode/arc-attrs.h): Include.
809 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
810 (arc_extract_features): New file.
811 (arc_stralloc): Likewise.
812 (arc_elf_merge_attributes): Likewise.
813 (arc_elf_merge_private_bfd_data): Use object attributes.
814 (bfd_arc_get_mach_from_attributes): New function.
815 (arc_elf_object_p): Use object attributes.
816 (arc_elf_final_write_processing): Likewise.
817 (elf32_arc_obj_attrs_arg_type): New function.
818 (elf32_arc_obj_attrs_handle_unknown): Likewise.
819 (elf32_arc_section_from_shdr): Likewise.
820 (elf_backend_obj_attrs_vendor): Define.
821 (elf_backend_obj_attrs_section): Likewise.
822 (elf_backend_obj_attrs_arg_type): Likewise.
823 (elf_backend_obj_attrs_section_type): Likewise.
824 (elf_backend_obj_attrs_handle_unknown): Likewise.
825 (elf_backend_section_from_shdr): Likewise.
827 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
830 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
831 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
832 and the destination is a Thumb symbol.
834 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
836 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
837 initializer to silence GCC 4.2.
838 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
840 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
842 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
843 (LAZY_PLT_ENTRY_SIZE): This.
844 (NON_LAZY_PLT_ENTRY_SIZE): New.
845 (elf_x86_64_plt0_entry): Renamed to ...
846 (elf_x86_64_lazy_plt0_entry): This.
847 (elf_x86_64_plt_entry): Renamed to ...
848 (elf_x86_64_lazy_plt_entry): This.
849 (elf_x86_64_bnd_plt0_entry): Renamed to ...
850 (elf_x86_64_lazy_bnd_plt0_entry): This.
851 (elf_x86_64_legacy_plt_entry): Removed.
852 (elf_x86_64_bnd_plt_entry): Renamed to ...
853 (elf_x86_64_lazy_bnd_plt_entry): This.
854 (elf_x86_64_legacy_plt2_entry): Renamed to ...
855 (elf_x86_64_non_lazy_plt_entry): This.
856 (elf_x86_64_bnd_plt2_entry): Renamed to ...
857 (elf_x86_64_non_lazy_bnd_plt_entry): This.
858 (elf_x86_64_eh_frame_plt): Renamed to ...
859 (elf_x86_64_eh_frame_lazy_plt): This.
860 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
861 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
862 (elf_x86_64_eh_frame_plt_got): Renamed to ...
863 (elf_x86_64_eh_frame_non_lazy_plt): This.
864 (elf_x86_64_lazy_plt_layout): New.
865 (elf_x86_64_non_lazy_plt_layout): Likewise.
866 (elf_x86_64_plt_layout): Likewise.
867 (elf_x86_64_backend_data): Remove PLT layout information. Add
868 os for target system.
869 (GET_PLT_ENTRY_SIZE): Removed.
870 (elf_x86_64_lazy_plt): New.
871 (elf_x86_64_non_lazy_plt): Likewise.
872 (elf_x86_64_lazy_bnd_plt): Likewise.
873 (elf_x86_64_non_lazy_bnd_plt): Likewise.
874 (elf_x86-64_arch_bed): Updated.
875 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
876 (elf_x86_64_create_dynamic_sections): Removed.
877 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
878 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
879 (elf_x86-64_adjust_dynamic_symbol): Updated.
880 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
881 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
882 size for PLT0 if there is no PLT0. Get plt_entry_size from
883 non_lazy_plt for non-lazy PLT entries.
884 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
885 from non_lazy_plt for non-lazy PLT entries.
886 (elf_x86-64_relocate_section): Updated. Properly get PLT index
888 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
889 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
890 entries with non-lazy PLT layout. Don't fill the second and third
891 slots in the PLT entry if there is no PLT0.
892 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
893 if there is no PLT0. Set sh_entsize on the .plt.got section.
894 (compare_relocs): New.
895 (elf_x86_64_plt_type): Likewise.
896 (elf_x86_64_plt): Likewise.
897 (elf_x86_64_nacl_plt): New. Forward declaration.
898 (elf_x86_64_get_plt_sym_val): Removed.
899 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
900 against all dynamic relocations.
901 (elf_x86_64_link_setup_gnu_properties): New function.
902 (elf_backend_create_dynamic_sections): Updated.
903 (elf_backend_setup_gnu_properties): New.
904 (elf_x86_64_nacl_plt): New.
905 (elf_x86_64_nacl_arch_bed): Updated.
907 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
909 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
910 (LAZY_PLT_ENTRY_SIZE): This.
911 (NON_LAZY_PLT_ENTRY_SIZE): New.
912 (elf_i386_plt0_entry): Renamed to ...
913 (elf_i386_lazy_plt0_entry): This.
914 (elf_i386_plt_entry): Renamed to ...
915 (elf_i386_lazy_plt_entry): This.
916 (elf_i386_pic_plt0_entry): Renamed to ...
917 (elf_i386_pic_lazy_plt0_entry): This.
918 (elf_i386_pic_plt_entry): Renamed to ...
919 (elf_i386_pic_lazy_plt_entry): This.
920 (elf_i386_got_plt_entry): Renamed to ...
921 (elf_i386_non_lazy_plt_entry): This.
922 (elf_i386_pic_got_plt_entry): Renamed to ...
923 (elf_i386_pic_non_lazy_plt_entry): This.
924 (elf_i386_eh_frame_plt): Renamed to ...
925 (elf_i386_eh_frame_lazy_plt): This.
926 (elf_i386_eh_frame_plt_got): Renamed to ...
927 (elf_i386_eh_frame_non_lazy_plt): This.
928 (elf_i386_plt_layout): Renamed to ...
929 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
930 eh_frame_plt_got_size.
931 (elf_i386_non_lazy_plt_layout): New.
932 (elf_i386_plt_layout): Likewise.
933 (elf_i386_non_lazy_plt): Likewise.
934 (GET_PLT_ENTRY_SIZE): Removed.
935 (elf_i386_plt): Renamed to ...
936 (elf_i386_lazy_plt): This.
937 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
938 (elf_i386_arch_bed): Updated.
939 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
940 (elf_i386_create_dynamic_sections): Removed.
941 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
942 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
943 (elf_i386_adjust_dynamic_symbol): Updated.
944 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
945 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
946 size for PLT0 if there is no PLT0.
947 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
948 output section is discarded only if GOT isn't empty.
949 (elf_i386_relocate_section): Updated. Properly get PLT index
951 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
952 second and third slots in the PLT entry if there is no PLT0.
953 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
954 if there is no PLT0. Set sh_entsize on the .plt.got section.
955 (elf_i386_nacl_plt): Forward declaration.
956 (elf_i386_get_plt_sym_val): Removed.
957 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
958 against all dynamic relocations.
959 (elf_i386_link_setup_gnu_properties): New function.
960 (elf_backend_create_dynamic_sections): Updated.
961 (elf_backend_setup_gnu_properties): New.
962 (elf_i386_nacl_plt): Updated.
963 (elf_i386_nacl_arch_bed): Likewise.
964 (elf_i386_vxworks_arch_bed): Likewise.
966 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
968 * elflink.c (elf_output_implib): Remove executable flag from import
970 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
971 library is a relocatable object file.
973 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
976 * elf32-avr.c (avr_should_move_sym): New function.
977 (avr_should_reduce_sym_size): Likewise.
978 (avr_should_increase_sym_size): Likewise.
979 (elf32_avr_relax_delete_bytes): Adjust symbol values
980 and sizes by calling new functions.
982 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
984 * config.bfd (riscv32-*): Enable rv64.
986 2017-05-02 Alan Modra <amodra@gmail.com>
989 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
990 rather than h->root.type == bfd_link_hash_new.
991 (bfd_elf_record_link_assignment): Similarly, call
992 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
994 2017-04-29 Alan Modra <amodra@gmail.com>
997 * reloc.c (reloc_offset_in_range): New function.
998 (bfd_perform_relocation, bfd_install_relocation): Use it.
999 (_bfd_final_link_relocate): Likewise.
1001 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
1003 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
1004 before using .plt.got.
1005 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
1007 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
1009 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
1010 instead of "+=" to update 0.
1012 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
1014 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
1015 .plt.got section here.
1016 (elf_i386_check_relocs): Don't create the .plt.got section.
1017 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
1018 the .plt.got and .plt.bnd sections here.
1019 (elf_x86_64_check_relocs): Don't create the .plt.got nor
1022 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
1024 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
1026 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
1027 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
1028 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
1029 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
1032 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
1034 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
1036 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
1037 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
1038 the first relocatable ELF input with GNU properties.
1040 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
1042 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
1043 VxWorks for non-PIC.
1045 2017-04-27 Alan Modra <amodra@gmail.com>
1047 * elf-bfd.h (struct elf_backend_data): Make asection param of
1048 elf_backend_eh_frame_address_size const.
1049 (_bfd_elf_eh_frame_address_size): Likewise.
1050 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
1051 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
1052 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
1053 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
1054 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
1055 (next_cie_fde_offset): Constify params.
1056 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
1058 2017-04-27 Alan Modra <amodra@gmail.com>
1060 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
1061 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
1062 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
1064 (offset_adjust): New function.
1065 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
1066 (adjust_eh_frame_local_symbols): Likewise.
1067 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
1068 after changing anything. Return true if anything changed.
1069 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
1070 _bfd_elf_adjust_eh_frame_global_symbol for globals.
1072 2017-04-27 Alan Modra <amodra@gmail.com>
1074 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
1077 2017-04-27 Alan Modra <amodra@gmail.com>
1079 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
1080 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
1081 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
1082 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
1083 for undef and undefweak dyn_relocs.
1084 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
1085 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
1086 (allocate_got, allocate_dynrelocs): Likewise.
1087 (ppc64_elf_relocate_section): Likewise.
1089 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
1091 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
1092 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
1093 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
1094 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
1096 2017-04-26 Nick Clifton <nickc@redhat.com>
1099 * reloc.c (bfd_perform_relocation): Check for a negative address
1102 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
1105 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
1107 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
1108 (elf_backend_always_renumber_dynsyms): Define.
1109 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
1110 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
1111 * elflink.c (bfd_elf_size_dynamic_sections): Also call
1112 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
1114 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
1116 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
1118 * elflink.c (bfd_elf_size_dynamic_sections): Only call
1119 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
1120 sections have been created.
1122 2017-04-26 Nick Clifton <nickc@redhat.com>
1125 * compress.c (bfd_init_section_compress_status): Check the return
1126 value from bfd_malloc.
1128 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
1130 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
1131 no_finish_dynamic_symbol.
1132 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
1134 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
1135 weak symbol, don't make it dynamic.
1136 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
1137 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
1138 relocation for GOT reference.
1139 (elf_x86_64_finish_dynamic_symbol): Abort if
1140 no_finish_dynamic_symbol isn't 0.
1142 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
1145 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
1146 undefined weak symbol, don't make it dynamic.
1147 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
1148 set no_finish_dynamic_symbol and generate R_386_RELATIVE
1149 relocation for R_386_GOT32.
1151 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
1154 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
1156 2017-04-23 Alan Modra <amodra@gmail.com>
1159 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
1160 * elf.c (lcomm_sym): New.
1161 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
1162 * bfd-in2.h: Regenerate.
1164 2017-04-23 Alan Modra <amodra@gmail.com>
1167 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
1168 parameters and comment.
1169 (_bfd_elf_get_reloc_section): Delete.
1170 (_bfd_elf_plt_get_reloc_section): Declare.
1171 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
1172 New functions. Don't blindly skip over assumed .rel/.rela prefix.
1174 (_bfd_elf_get_reloc_section): ..here. Delete.
1175 (assign_section_numbers): Call elf_get_reloc_section.
1176 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
1177 * elfxx-target.h (elf_backend_get_reloc_section): Update.
1179 2017-04-23 Alan Modra <amodra@gmail.com>
1182 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
1185 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
1188 * elf32-i386.c (elf_i386_link_hash_entry): Add
1189 no_finish_dynamic_symbol.
1190 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
1191 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
1192 symbol, don't make it dynamic in PIE.
1193 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
1194 set no_finish_dynamic_symbol and generate R_386_RELATIVE
1195 relocation for R_386_GOT32
1196 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
1199 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
1203 * elflink.c (elf_link_add_object_symbols): Require
1204 --no-dynamic-linker with -E/--dynamic-list when creating
1207 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
1209 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
1212 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
1214 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
1215 dynamic symbol sorting.
1217 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
1220 * elflink.c (elf_link_add_object_symbols): Preserve
1221 dynamic_ref_after_ir_def when restoring the symbol table for
1222 unneeded dynamic object.
1224 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
1227 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
1228 on on undefined IFUNC symbol in the second PLT.
1230 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
1232 * peXXigen.c (pe_print_reloc): Correct chunk_end.
1234 2017-04-19 Alan Modra <amodra@gmail.com>
1236 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
1237 or make dynamic for info->dynamic_undefined_weak 0 and 1.
1238 * elf32-ppc.c:Formatting.
1239 (ensure_undefweak_dynamic): Don't make dynamic when
1240 info->dynamic_undefined_weak is zero.
1241 (allocate_dynrelocs): Discard undefweak dyn_relocs for
1242 info->dynamic_undefined_weak. Discard undef dyn_relocs when
1243 not default visibility. Discard undef and undefweak
1245 (ppc_elf_relocate_section): Adjust to suit.
1246 * elf64-ppc.c: Formatting.
1247 (ensure_undefweak_dynamic): Don't make dynamic when
1248 info->dynamic_undefined_weak is zero.
1249 (allocate_dynrelocs): Discard undefweak dyn_relocs for
1250 info->dynamic_undefined_weak. Discard them earlier.
1252 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
1255 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
1256 before generating the version definition section.
1258 2017-04-17 Alan Modra <amodra@gmail.com>
1260 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
1261 state when a regular object file defines a symbol with
1262 incompatible type to that defined by an earlier shared lib.
1264 2017-04-13 Alan Modra <amodra@gmail.com>
1266 * coffcode.h: Wrap some overly long _bfd_error_handler args.
1268 * elf32-arm.c: Likewise.
1269 * elf32-i386.c: Likewise.
1270 * elf32-mep.c: Likewise.
1271 * elf64-ia64-vms.c: Likewise.
1272 * elf64-x86-64.c: Likewise.
1273 * elflink.c: Likewise.
1274 * elfnn-ia64.c: Likewise.
1275 * elfxx-mips.c: Likewise.
1277 2017-04-13 Alan Modra <amodra@gmail.com>
1279 * aoutx.h: Use %B and %A in error messages throughout file.
1280 * aout-cris.c: Likewise.
1281 * archive.c: Likewise.
1282 * binary.c: Likewise.
1283 * coff-rs6000.c: Likewise.
1284 * coff-tic4x.c: Likewise.
1285 * coffcode.h: Likewise.
1286 * coffgen.c: Likewise.
1287 * cofflink.c: Likewise.
1288 * coffswap.h: Likewise.
1289 * cpu-arm.c: Likewise.
1290 * elf-eh-frame.c: Likewise.
1291 * elf-m10300.c: Likewise.
1293 * elf32-arc.c: Likewise.
1294 * elf32-arm.c: Likewise.
1295 * elf32-bfin.c: Likewise.
1296 * elf32-frv.c: Likewise.
1297 * elf32-iq2000.c: Likewise.
1298 * elf32-m32c.c: Likewise.
1299 * elf32-microblaze.c: Likewise.
1300 * elf32-nds32.c: Likewise.
1301 * elf32-rl78.c: Likewise.
1302 * elf32-rx.c: Likewise.
1303 * elf32-score.c: Likewise.
1304 * elf32-score7.c: Likewise.
1305 * elf32-sh64.c: Likewise.
1306 * elf32-v850.c: Likewise.
1307 * elf32-vax.c: Likewise.
1308 * elf32-visium.c: Likewise.
1309 * elf64-ia64-vms.c: Likewise.
1310 * elf64-mmix.c: Likewise.
1311 * elf64-sh64.c: Likewise.
1312 * elfcode.h: Likewise.
1313 * elfnn-aarch64.c: Likewise.
1314 * elfnn-ia64.c: Likewise.
1315 * elfxx-mips.c: Likewise.
1316 * hpux-core.c: Likewise.
1319 * linker.c: Likewise.
1320 * merge.c: Likewise.
1322 * oasys.c: Likewise.
1323 * pdp11.c: Likewise.
1324 * peXXigen.c: Likewise.
1325 * rs6000-core.c: Likewise.
1326 * vms-alpha.c: Likewise.
1327 * xcofflink.c: Likewise.
1329 2017-04-13 Alan Modra <amodra@gmail.com>
1331 * bfd.c (PRINT_TYPE): Define.
1332 (_doprnt): New function.
1333 (error_handler_internal): Use _doprnt.
1334 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
1335 calls in their natural order, throughout file.
1336 * coff-mcore.c: Likewise.
1337 * coff-ppc.c: Likewise.
1338 * coff-tic80.c: Likewise.
1339 * cofflink.c: Likewise.
1340 * elf-s390-common.c: Likewise.
1342 * elf32-arm.c: Likewise.
1343 * elf32-i386.c: Likewise.
1344 * elf32-m32r.c: Likewise.
1345 * elf32-msp430.c: Likewise.
1346 * elf32-spu.c: Likewise.
1347 * elf64-ia64-vms.c: Likewise.
1348 * elf64-sparc.c: Likewise.
1349 * elf64-x86-64.c: Likewise.
1350 * elflink.c: Likewise.
1351 * elfnn-aarch64.c: Likewise.
1352 * elfnn-ia64.c: Likewise.
1353 * elfxx-mips.c: Likewise.
1355 2017-04-13 Alan Modra <amodra@gmail.com>
1357 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
1358 branch veneers" error. Fix double space and format message.
1359 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
1360 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
1362 2017-04-13 Alan Modra <amodra@gmail.com>
1364 * bfd-in2.h: Regenerate.
1366 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
1368 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
1369 extra `\n' in warning/error messages.
1370 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
1371 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
1373 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
1375 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
1376 processor-specific properties with generic ELF target vector.
1378 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
1380 * elf32-sparc.c (elf_backend_fixup_symbol): New.
1381 * elf64-sparc.c (elf_backend_fixup_symbol): New.
1382 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
1383 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
1385 (link_hash_newfunc): Initialize has_got_reloc and
1387 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
1389 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
1391 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
1393 (_bfd_sparc_elf_fixup_symbol): New function.
1394 (allocate_dynrelocs): Don't allocate space for dynamic
1395 relocations and discard relocations against resolved undefined
1396 weak symbols in executable. Don't make resolved undefined weak
1397 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
1398 relocation against undefined weak symbols in PIE.
1399 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
1400 relocations against resolved undefined weak symbols in PIE
1401 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
1402 without ynamic PLT/GOT relocations for resolved undefined weak
1404 Don't generate dynamic relocation against resolved undefined
1405 weak symbol in executable.
1406 (pie_finish_undefweak_symbol): New function.
1407 (_bfd_sparc_elf_finish_dynamic_sections): Call
1408 pie_finish_undefweak_symbol on all symbols in PIE.
1409 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
1410 (_bfd_sparc_elf_fixup_symbol): New function.
1412 2017-04-10 Nick Clifton <nickc@redhat.com>
1414 * config.bfd: Remove ns32k from obsolete list.
1416 2017-04-10 Alan Modra <amodra@gmail.com>
1419 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
1420 (special_sections_i): Likewise for .init_array.
1421 (special_sections_p): Likewise for .preinit_array.
1423 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
1427 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
1428 ELF_COMMON_DEF_P for common symbols.
1429 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
1430 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1431 * elflink.c (_bfd_elf_merge_symbol): Revert commits
1432 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
1433 07492f668d2173da7a2bda3707ff0985e0f460b6.
1435 2017-04-07 Pedro Alves <palves@redhat.com>
1437 * opncls.c (bfd_get_debug_link_info): Rename to...
1438 (bfd_get_debug_link_info_1): ... this. Change type of second
1439 parameter to void pointer. Adjust.
1440 (bfd_get_debug_link_info): Reimplement on top of
1441 bfd_get_debug_link_info_1.
1442 (separate_debug_file_exists, separate_alt_debug_file_exists):
1443 Change type of second parameter to void pointer. Adjust.
1444 (get_func_type, check_func_type): Change type of second parameter
1446 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
1447 the callback functions instead of passing the address of a local.
1448 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
1449 find_separate_debug_file.
1450 (get_alt_debug_link_info_shim): Change type of second parameter to
1451 void pointer. Adjust.
1452 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
1453 find_separate_debug_file.
1454 (get_build_id_name, bfd_boolean check_build_id_file): Change type
1455 of second parameter to void pointer. Adjust.
1456 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
1457 pointer local to find_separate_debug_file.
1459 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
1461 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
1462 external symbols with a definition.
1463 (_bfd_coff_gc_mark_extra_sections): Fix typo.
1465 2017-04-07 Alan Modra <amodra@gmail.com>
1467 * po/SRC-POTFILES.in: Regenerate.
1469 2017-04-05 Alan Modra <amodra@gmail.com>
1471 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
1474 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
1476 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
1477 numbers for DataDirectory entry indicies passed to
1480 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
1482 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
1483 each GNU_MBIND section and align GNU_MBIND section to page size.
1484 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
1485 segment for each GNU_MBIND section.
1486 (_bfd_elf_init_private_section_data): Copy sh_info from input
1487 for GNU_MBIND section.
1489 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
1491 * elfnn-riscv.c (GP_NAME): Delete.
1492 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
1493 (_bfd_riscv_relax_lui): Likewise.
1495 2017-04-04 Nick Clifton <nickc@redhat.com>
1498 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
1500 (bfd_elf_final_link): Only initialize the extended symbol index
1501 section if there are extended symbol tables to list.
1503 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
1505 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
1506 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
1507 * configure.ac (elf): Add elf-properties.lo.
1508 * Makefile.in: Regenerated.
1509 * configure: Likewise.
1510 * elf-bfd.h (elf_property_kind): New.
1511 (elf_property): Likewise.
1512 (elf_property_list): Likewise.
1513 (elf_properties): Likewise.
1514 (_bfd_elf_parse_gnu_properties): Likewise.
1515 (_bfd_elf_get_property): Likewise.
1516 (_bfd_elf_link_setup_gnu_properties): Likewise.
1517 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
1518 and setup_gnu_properties.
1519 (elf_obj_tdata): Add properties.
1520 * elf-properties.c: New file.
1521 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
1522 (elf_i386_merge_gnu_properties): Likewise.
1523 (elf_backend_parse_gnu_properties): Likewise.
1524 (elf_backend_merge_gnu_properties): Likewise.
1525 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
1526 (elf_x86_64_merge_gnu_properties): Likewise.
1527 (elf_backend_parse_gnu_properties): Likewise.
1528 (elf_backend_merge_gnu_properties): Likewise.
1529 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
1530 (elf_backend_parse_gnu_properties): Likewise.
1531 (elf_backend_setup_gnu_properties): Likewise.
1532 (elfNN_bed): Add elf_backend_parse_gnu_properties,
1533 elf_backend_merge_gnu_properties and
1534 elf_backend_setup_gnu_properties.
1536 2017-03-30 Pip Cet <pipcet@gmail.com>
1538 * elf32-wasm32.c: Add relocation code, two relocs.
1539 * reloc.c: Add wasm32 relocations.
1540 * libbfd.h: Regenerate.
1541 * bfd-in2.h: Regenerate.
1542 * bfd/po/bfd.pot: Regenerate.
1544 2017-03-29 Nick Clifton <nickc@redhat.com>
1547 * coff-bfd.h (struct coff_section_data): Add new fields:
1548 saved_bias and bias.
1549 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
1550 computed for PE binaries.
1551 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
1554 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
1557 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
1558 to handle a local symbol with a hash-symbol-entry; without PLT.
1559 Add BFD_ASSERT for an incidental case with GOT entry present.
1560 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
1561 isn't forced-or-set local.
1563 2017-03-27 Pip Cet <pipcet@gmail.com>
1565 * wasm-module.c: New file to support WebAssembly modules.
1566 * wasm-module.h: New file to support WebAssembly modules.
1567 * doc/webassembly.texi: Start documenting wasm-module.c.
1568 * config.bfd: Add wasm_vec.
1569 * targets.c: Likewise.
1570 * configure.ac: Likewise.
1571 * Makefile.am: Add entries for wasm-module.c.
1572 * Makefile.in: Regenerate.
1573 * configure: Regenerate.
1574 * po/SRC-POTFILES.in: Regenerate.
1576 2017-03-27 Pip Cet <pipcet@gmail.com>
1578 * cpu-wasm32.c: New file to support wasm32 architecture.
1579 * elf32-wasm32.c: New file to support wasm32 architecture.
1580 * Makefile.am: Add wasm32 architecture.
1581 * archures.c: Likewise.
1582 * config.bfd: Likewise.
1583 * configure.ac: Likewise.
1584 * targets.c: Likewise.
1585 * Makefile.in: Regenerate.
1586 * bfd-in2.h: Regenerate.
1587 * configure: Regenerate.
1588 * po/SRC-POTFILES.in: Regenerate.
1590 2017-03-20 Alan Modra <amodra@gmail.com>
1593 * elf64-ppc.c (compare_symbols): Stabilize sort.
1595 2017-03-18 Alan Modra <amodra@gmail.com>
1597 * elf64-ppc.c (struct ppc_link_hash_table): Add
1598 local_ifunc_resolver and maybe_local_ifunc_resolver.
1599 (ppc_build_one_stub): Set flags on emitting dynamic
1600 relocation to ifunc.
1601 (ppc64_elf_relocate_section): Likewise.
1602 (ppc64_elf_finish_dynamic_symbol): Likewise.
1603 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
1604 local dynamic relocs to ifuncs.
1605 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
1606 local_ifunc_resolver and maybe_local_ifunc_resolver.
1607 (ppc_elf_relocate_section): Set flag on emitting dynamic
1608 relocation to ifuncs.
1609 (ppc_elf_finish_dynamic_symbol): Likewise.
1610 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
1611 dynamic relocs to ifuncs.
1613 2017-03-13 Nick Clifton <nickc@redhat.com>
1616 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
1617 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
1618 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
1619 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
1620 * bfd-in2.h: Regenerate.
1621 * libbfd.h: Regenerate.
1622 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
1624 (IS_AARCH64_TLSDESC_RELOC): Likewise.
1625 (elfNN_aarch64_howto_table): Likewise.
1626 (aarch64_tls_transition_without_check): Likewise.
1627 (aarch64_reloc_got_type): Likewise.
1628 (elfNN_aarch64_final_link_relocate): Likewise.
1629 (elfNN_aarch64_tls_relax): Likewise.
1630 (elfNN_aarch64_relocate_section): Likewise.
1631 (elfNN_aarch64_gc_sweep_hook): Likewise.
1632 (elfNN_aarch64_check_relocs): Likewise.
1633 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
1634 (_bfd_aarch64_elf_resolve_relocation): Likewise.
1636 2017-03-11 Alan Modra <amodra@gmail.com>
1638 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
1639 parameter is in fact used. Whitespace fixes.
1640 * elf64-ppc.c: Likewise.
1642 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
1644 * rs6000-core.c (CORE_NEW): Simplify macro when
1645 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
1647 2017-03-07 Alan Modra <amodra@gmail.com>
1651 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
1654 2017-03-05 Alan Modra <amodra@gmail.com>
1656 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
1657 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
1658 (next_cie_fde_offset): New function.
1659 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
1660 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
1661 four bytes. Align CIEs to four or eight bytes depending on
1662 per_encoding_aligned8. Align FDEs according to their encoding.
1663 Pad last FDE to output section alignment.
1664 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
1666 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
1667 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
1668 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
1670 2017-03-02 Martin Bickel <binutils@ineranves.de>
1673 * elf.c (rewrite_elf_program_header): Do not issue a warning for
1674 empty segments which have a zero filesz, but a non-zero memsz.
1676 2017-03-02 Alan Modra <amodra@gmail.com>
1678 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
1680 2017-02-28 Alan Modra <amodra@gmail.com>
1682 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
1683 (ppc64_elf_relocate_section): Likewise.
1685 2017-02-28 Alan Modra <amodra@gmail.com>
1688 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
1689 rather than elf32_nios2_hash_table or elf_hash_table.
1690 (create_got_section): Likewise.
1691 (nios2_elf32_finish_dynamic_symbol): Likewise.
1692 (nios2_elf32_adjust_dynamic_symbol): Likewise.
1693 (nios2_elf32_size_dynamic_sections): Likewise.
1694 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
1695 vars. Use htab equivalents directly instead. Don't create
1696 all dynamic sections on needing just the GOT. Use a goto
1697 rather than a fall-through with reloc test. Ensure
1698 htab->dynobj is set when making dynamic sreloc section.
1699 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
1700 equivalent directly instead. Don't segfault on looking for
1701 .dynamic when dynamic sections have not been created. Don't
1702 segfault on .got.plt being discarded.
1703 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
1704 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
1705 fixme and another not so relevant comment.
1706 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
1707 already set, set hash table dynobj on creating .sbss.
1709 2017-02-28 Alan Modra <amodra@gmail.com>
1711 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
1712 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
1713 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
1714 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
1715 (ppc64_elf_relocate_section): Likewise.
1716 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
1717 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
1718 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
1719 * libbfd.h: Regenerate.
1720 * bfd-in2.h: Regenerate.
1722 2017-02-28 Alan Modra <amodra@gmail.com>
1724 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
1725 dynamic .data.rel.ro read-only.
1726 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
1727 rather than section flags when deciding where copy reloc goes.
1728 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
1729 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
1730 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
1731 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
1732 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
1733 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
1734 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
1735 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
1736 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
1737 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
1738 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
1739 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
1740 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
1741 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
1742 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
1743 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
1744 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
1745 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
1746 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
1748 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
1750 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
1751 `jalr $0, $25' instruction encoding.
1753 2017-02-27 Nick Clifton <nickc@redhat.com>
1756 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
1757 generating a seg-fault when encountering a symbol that has been
1758 deleted by garbage collection.
1760 2017-02-25 Alan Modra <amodra@gmail.com>
1762 * elf32-arc.c (struct dynamic_sections): Delete.
1763 (enum dyn_section_types): Delete.
1764 (dyn_section_names): Delete.
1765 (arc_create_dynamic_sections): Delete.
1766 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
1767 segfault on discarded .rela.plt section.
1768 (elf_arc_size_dynamic_sections): Formatting. Don't call
1769 arc_create_dynamic_sections. Don't allocate memory for sections
1770 handled by the generic linker. Correct code finding relocs in
1771 read-only sections. Set SEC_EXCLUDE on zero size .got,
1772 .got.plt, and .dynbss sections. Do set .interp for pies.
1774 2017-02-24 Andrew Waterman <andrew@sifive.com>
1776 * elfnn-riscv.c (GP_NAME): New macro.
1777 (riscv_global_pointer_value): Use it.
1778 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
1779 output section, consider only that section's alignment.
1781 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
1783 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
1784 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
1785 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
1786 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
1788 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
1790 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
1791 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
1794 2017-02-23 Alan Modra <amodra@gmail.com>
1797 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
1799 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
1800 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
1803 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
1806 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
1807 processing ahead of the call to `elf_gc_sweep_symbol'.
1809 2017-02-22 Nick Clifton <nickc@redhat.com>
1812 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
1813 created section 4-byte alignment.
1815 2017-02-22 Alan Modra <amodra@gmail.com>
1817 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
1818 on .got or .plt output section being discarded by script.
1819 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
1822 2017-02-21 Alan Modra <amodra@gmail.com>
1824 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
1825 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
1827 2017-02-20 Alan Modra <amodra@gmail.com>
1830 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
1831 if DT_RELSZ/DT_RELASZ is zero.
1833 2017-02-17 Nick Clifton <nickc@redhat.com>
1835 * compress.c (bfd_get_full_section_contents): Remember to reduce
1836 compressed size by the sizeof the compression header when
1837 decompressing the contents.
1839 2017-02-17 Pedro Alves <palves@redhat.com>
1841 * srec.c (Chunk): Rename to ...
1842 (_bfd_srec_len): ... this.
1843 (S3Forced): Rename to ...
1844 (_bfd_srec_forceS3): ... this.
1845 * objcopy.c: Adjust all references.
1847 2017-02-17 Pedro Alves <palves@redhat.com>
1849 * archive.c (bsd_write_armap): Rename to ...
1850 (_bfd_bsd_write_armap): ... this.
1851 (coff_write_armap): Rename to ...
1852 (_bfd_coff_write_armap): ... this.
1853 * libbfd-in.h (bsd_write_armap): Rename to ...
1854 (_bfd_bsd_write_armap): ... this.
1855 (coff_write_armap): Rename to ...
1856 (_bfd_coff_write_armap): ... this.
1857 * aout-target.h, aout-tic30.c: Adjust all users.
1858 * libbfd.h: Regenerate.
1860 2017-02-17 Pedro Alves <palves@redhat.com>
1862 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
1863 (warn_deprecated): Rename to ...
1864 (_bfd_warn_deprecated): ... this.
1865 * libbfd.c (warn_deprecated): Rename to ...
1866 (_bfd_warn_deprecated): ... this.
1867 * bfd-in2.h: Regenerate.
1869 2017-02-17 Pedro Alves <palves@redhat.com>
1871 * bfdio.c (real_ftell): Rename to ...
1872 (_bfd_real_ftell): ... this.
1873 (real_fseek): Rename to ...
1874 (_bfd_real_fseek): ... this.
1875 (real_fopen): Rename to ...
1876 (_bfd_real_fopen): ... this.
1877 * libbfd-in.h (real_ftell): Rename to ...
1878 (_bfd_real_ftell): ... this.
1879 (real_fseek): Rename to ...
1880 (_bfd_real_fseek): ... this.
1881 (real_fopen): Rename to ...
1882 (_bfd_real_fopen): ... this.
1883 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
1884 * libbfd.h: Regenerate.
1886 2017-02-17 Pedro Alves <palves@redhat.com>
1888 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
1889 * libbfd.c (read_unsigned_leb128): Rename to ...
1890 (_bfd_read_unsigned_leb128): ... this.
1891 (read_signed_leb128): Rename to ...
1892 (_bfd_read_signed_leb128): ... this.
1893 (safe_read_leb128): Rename to ...
1894 (_bfd_safe_read_leb128): ... this.
1895 * libbfd-in.h (read_unsigned_leb128): Rename to ...
1896 (_bfd_read_unsigned_leb128): ... this.
1897 (read_signed_leb128): Rename to ...
1898 (_bfd_read_signed_leb128): ... this.
1899 (safe_read_leb128): Rename to ...
1900 (_bfd_safe_read_leb128): ... this.
1901 * libbfd.h: Renegerate.
1903 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
1905 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
1906 before trying to fine matching file and line information.
1908 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
1910 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
1911 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
1912 not match current bfd, then reload debug information. Record bfd
1913 we're loading debug info for in the stash. If we have debug
1914 informatin in the cache then perform section placement before
1917 2017-02-16 Alan Modra <amodra@gmail.com>
1920 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
1921 * elfxx-target.h (elf_backend_no_page_alias): Define.
1922 (elfNN_bed): Init new field.
1923 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
1924 ensure PT_LOAD segment starts on a new page.
1925 * elf32-hppa.c (elf_backend_no_page_alias): Define.
1927 2017-02-16 Alan Modra <amodra@gmail.com>
1930 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
1933 2017-02-16 Jiong Wang <jiong.wang@arm.com>
1935 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
1936 * bfd-in2.h: Regenerated.
1938 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
1941 * elf32-i386.c (elf_i386_relocate_section): Allow
1942 "lea foo@GOT, %reg" in PIC.
1944 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
1947 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
1948 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
1949 error against local IFUNC symbol without a base register for
1952 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
1954 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
1955 `%P: %H:' with `info->callbacks->einfo'.
1956 (ppc_elf_relocate_section): Likewise.
1957 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
1958 (ppc64_elf_edit_toc): Likewise.
1959 (ppc64_elf_relocate_section): Likewise.
1961 2017-02-14 Alan Modra <amodra@gmail.com>
1963 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
1964 --gc-keep-exported, and test versioned field of sym rather than
1965 looking for @ in name.
1967 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
1969 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
1972 2017-02-13 Nick Clifton <nickc@redhat.com>
1975 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
1978 2017-02-07 Andrew Waterman <andrew@sifive.com>
1980 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
1981 entry size if PLT header is written.
1983 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
1985 Fix sparc64 dynamic relocation processing to use the dynamic
1987 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
1988 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
1991 2017-02-03 Nick Clifton <nickc@redhat.com>
1994 * coffcode.h (coff_write_object_contents): Enlarge size of
1995 s_name_buf in order to avoid compile time warning about possible
1997 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
1998 32-bits of insn value before printing into buffer.
2000 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
2002 * elfxx-mips.c (mips_elf_hash_sort_data): Add
2003 `max_local_dynindx'.
2004 (mips_elf_sort_hash_table): Handle it.
2005 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
2006 symbols bump up `max_local_dynindx' rather than
2007 `max_non_got_dynindx'.
2009 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
2011 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
2012 `min_got_dynindx', `max_unref_got_dynindx' and
2013 `max_non_got_dynindx' members to the `bfd_size_type' data type.
2014 (mips_elf_sort_hash_table): Adjust accordingly.
2016 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
2018 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
2019 to access the hash table.
2021 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
2023 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
2024 non-NULL `htab' to the beginning.
2026 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
2028 * elflink.c (elf_gc_sweep): Wrap overlong line.
2030 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
2032 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
2033 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
2034 * elfxx-mips.c (mips_elf_link_hash_table): Add
2035 `ignore_branch_isa' member.
2036 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
2037 in branch relocation calculation as an error if
2038 `ignore_branch_isa' has been set.
2039 (_bfd_mips_elf_insn32): Rename to...
2040 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
2041 parameter to `insn32' and add an `ignore_branch_isa' parameter.
2042 Handle the new parameter.
2044 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
2046 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
2047 local variable dynobj.
2050 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
2051 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
2052 executable from read-only sections into sdynrelro.
2053 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
2054 dynamic relocs in sdynrelro.
2055 (elf_backend_want_dynrelro): Define.
2057 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
2059 * config.bfd (*-*-rtemsaout*): Mark as removed.
2061 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
2063 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
2064 (arm-*-rtems*): Move to (arm*-*-eabi*).
2065 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
2066 (m68-*-rtems*): Move to (m68*-*-elf*).
2068 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
2070 * config.bfd (*-*-rtemscoff*): Mark as removed.
2072 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
2075 * elflink.c (bfd_elf_record_link_assignment): Revert last
2076 change and don't ever clear `forced_local'. Set `mark'
2078 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
2080 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
2081 (bfd_elf_size_dynamic_sections): ... here.
2082 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
2083 and set `mark' instead in `__tls_get_addr_opt' processing.
2084 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
2086 2017-01-24 Alan Modra <amodra@gmail.com>
2088 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
2089 where dynamic relocs are preferable. Allow ifunc too.
2090 (ensure_undefweak_dynamic): New function.
2091 (allocate_dynrelocs): Use it here. Move plt handling last and
2092 don't make symbols dynamic, simplifying loop. Only make undef
2093 weak symbols with GOT entries dynamic. Correct condition
2094 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
2095 comments. Remove goto.
2096 (ppc_elf_relocate_section): Correct test for using dynamic
2097 symbol on GOT relocs. Rearrange test for emitting GOT relocs
2098 to suit. Set up explicit tls_index entries and implicit GOT
2099 tls_index entries resolvable at link time for
2100 __tls_get_addr_opt. Simplify test to clear mem for prelink.
2101 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
2102 (ensure_undefweak_dynamic): New function.
2103 (allocate_dynrelocs): Use it here. Only make undef weak symbols
2104 with GOT entries dynamic. Remove unnecessary test of
2105 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
2106 (ppc64_elf_relocate_section): Correct test for using dynamic
2107 symbol on GOT relocs. Rearrange test for emitting GOT relocs
2108 to suit. Set up explicit tls_index entries and implicit GOT
2109 tls_index entries resolvable at link time for __tls_get_addr_opt.
2110 Simplify expression to clear mem for prelink.
2112 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
2114 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
2116 2017-01-20 Jiong Wang <jiong.wang@arm.com>
2118 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
2119 (elf_backend_hash_symbol): Define.
2121 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
2124 * elflink.c (bfd_elf_record_link_assignment): Clear any
2125 `forced_local' marking for DSO symbols that are not being
2128 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
2130 * elfnn-riscv.c (riscv_elf_object_p): New function.
2132 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
2135 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
2137 (elf_x86_64_check_relocs): Create .eh_frame section for the
2139 (elf_x86_64_size_dynamic_sections): Allocate and initialize
2140 .eh_frame section for the .plt.bnd section.
2141 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
2142 for the .plt.bnd section.
2144 2017-01-12 Nick Clifton <nickc@redhat.com>
2147 * opncls.c (find_separate_debug_file): Add include_dirs
2148 parameter. Only include the directory part of the bfd's filename
2149 in search paths if include_dirs is true. Add a couple of extra
2150 locations for looking for debug files.
2151 ( bfd_follow_gnu_debuglink): Update invocation of
2152 find_separate_debug_file.
2153 (bfd_follow_gnu_debugaltlink): Likewise.
2154 (get_build_id): New function: Finds the build-id of the given bfd.
2155 (get_build_id_name): New function: Computes the name of the
2156 separate debug info file for a bfd, based upon its build-id.
2157 (check_build_id_file): New function: Checks to see if a separate
2158 debug info file exists at the given location, and that its
2159 build-id matches that of the original bfd.
2160 (bfd_follow_build_id_debuglink): New function: Finds a separate
2161 debug info file for a given bfd by using the build-id method.
2162 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
2163 method of locating a separate debug info file before using the
2165 * bfd-in2.h: Regenerate.
2167 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
2170 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
2171 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
2172 elf_x86_64_eh_frame_plt_got.
2173 (elf_x86_64_size_dynamic_sections): Get unwind info from
2174 elf_x86_64_bnd_arch_bed for the BND PLT.
2176 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
2178 * config.bfd: Add entries for i686-redox and x86_64-redox.
2180 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
2182 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
2184 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
2185 .eh_frame section to 4 bytes for x32.
2186 (elf_x86_64_check_relocs): Likewise.
2188 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
2191 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
2192 (PLT_GOT_FDE_LENGTH): Likewise.
2193 (elf_i386_plt_layout): Add eh_frame_plt_got and
2194 eh_frame_plt_got_size.
2195 (elf_i386_plt): Updated.
2196 (elf_i386_link_hash_table): Add plt_got_eh_frame.
2197 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
2198 (elf_i386_size_dynamic_sections): Allocate and initialize
2199 .eh_frame section for .plt.got.
2200 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
2202 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
2203 eh_frame_plt_got_size.
2204 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
2205 (PLT_GOT_FDE_LENGTH): Likewise.
2206 (elf_x86_64_backend_data): Add eh_frame_plt_got and
2207 eh_frame_plt_got_size.
2208 (elf_x86_64_arch_bed): Updated.
2209 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
2210 eh_frame_plt_got_size.
2211 (elf_x86_64_nacl_arch_bed): Likewise.
2212 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
2213 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
2214 (elf_x86_64_size_dynamic_sections): Allocate and initialize
2215 .eh_frame section for .plt.got.
2216 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
2219 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
2221 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
2222 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
2224 2017-01-09 Nick Clifton <nickc@redhat.com>
2226 * dwarf2.c (lookup_address_in_function_table): Return early if
2227 there are no functions in the given comp unit, or if the high
2228 address of the last function in the comp unit is less than the
2231 2017-01-09 Nick Clifton <nickc@redhat.com>
2234 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
2235 message if there are too many symbols to load.
2237 2017-01-04 James Clarke <jrtc27@jrtc27.com>
2239 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
2240 if relocs are cached.
2242 2017-01-03 Rich Felker <bugdal@aerifal.cx>
2245 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
2246 for R_MICROBLAZE_GOTOFF_64.
2248 2017-01-03 Nick Clifton <nickc@redhat.com>
2250 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
2251 warning about using a possibly uninitialised variable.
2253 2017-01-02 Alan Modra <amodra@gmail.com>
2255 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
2256 (allocate_plt_static, allocate_dynrelocs): Use it.
2258 2017-01-02 Alan Modra <amodra@gmail.com>
2260 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
2261 .PARISC.unwind section.
2263 2017-01-02 Alan Modra <amodra@gmail.com>
2266 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
2267 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
2268 indirect to GOT pointer relative code edit.
2270 2017-01-02 Alan Modra <amodra@gmail.com>
2272 Update year range in copyright notice of all files.
2274 For older changes see ChangeLog-2016
2276 Copyright (C) 2017 Free Software Foundation, Inc.
2278 Copying and distribution of this file, with or without modification,
2279 are permitted in any medium without royalty provided the copyright
2280 notice and this notice are preserved.
2286 version-control: never