1 2017-06-25 Sergei Trofimovich <slyfox@gentoo.org>
3 * elf.c (find_link): Bounds check "hint".
5 2017-06-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
7 * elf32-arm.c (using_thumb_only): Update list of architectures in
8 BFD_ASSERT for which the logic is valid.
9 (using_thumb2_bl): Likewise.
10 (using_thumb2): Likewise and return true for ARMv8-R.
11 (arch_has_arm_nop): Likewise.
12 (tag_cpu_arch_combine): New v8r table for ARMv8-R Tag_CPU_arch
13 merging logic. Update commentis for value 15 of v8m_baseline,
14 v8m_mainline and v4t_plus_v6_m arrays. Use v8r array to decide
15 merging of value 15 of Tag_CPU_arch.
17 2017-06-23 Jiong Wang <jiong.wang@arm.com>
19 * reloc.c (BFD_RELOC_AARCH64_ADR_GOTPAGE): Rename to
20 BFD_RELOC_AARCH64_ADR_GOT_PAGE
21 * bfd-in2.h: Regenerate.
23 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
25 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Move
26 the error_alignment label forward. Properly align program
27 property note section.
29 2017-06-22 Eric Christopher <echristo@gmail.com>
31 * elf32-arm.c (elf32_arm_final_link_relocate): Use labs rather than
32 abs to fix a truncation warning.
34 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
36 * elf32-i386.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Resolve
37 local undefined weak symbol to 0.
38 * elf64-x86-64.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Likewise.
40 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
42 * elf32-i386.c (elf_i386_merge_gnu_properties): If info->shstk
43 is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
44 (elf_i386_link_setup_gnu_properties): If info->shstk is set,
45 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
46 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): If
47 info->shstk is set, turn on GNU_PROPERTY_X86_FEATURE_1_SHSTK.
48 (elf_x86_64_link_setup_gnu_properties): If info->shstk is set,
49 turn on GNU_PROPERTY_X86_FEATURE_1_IBT.
51 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
53 * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
54 (elf_i386_lazy_ibt_plt_entry): Likewise.
55 (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
56 (elf_i386_non_lazy_ibt_plt_entry): Likewise.
57 (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
58 (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
59 (elf_i386_lazy_plt_layout): Likewise.
60 (elf_i386_non_lazy_plt_layout): Likewise.
61 (elf_i386_link_hash_entry): Add plt_second.
62 (elf_i386_link_hash_table): Add plt_second and
64 (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
65 (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
66 the second PLT. Check the second PLT.
67 (elf_i386_relocate_section): Use the second PLT to resolve
68 PLT reference if needed.
69 (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
71 (elf_i386_finish_dynamic_sections): Set sh_entsize on the
72 second PLT. Generate unwind info for the second PLT.
73 (elf_i386_plt_type): Add plt_second.
74 (elf_i386_get_synthetic_symtab): Support the second PLT.
75 (elf_i386_parse_gnu_properties): Support
76 GNU_PROPERTY_X86_FEATURE_1_AND.
77 (elf_i386_merge_gnu_properties): Support
78 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
79 on GNU_PROPERTY_X86_FEATURE_1_IBT
80 (elf_i386_link_setup_gnu_properties): If info->ibt is set,
81 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
82 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
83 is set on all relocatable inputs.
84 * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
85 (elf_x32_lazy_ibt_plt_entry): Likewise.
86 (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
87 (elf_x32_non_lazy_ibt_plt_entry): Likewise.
88 (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
89 (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
90 (elf_x86_64_lazy_ibt_plt): Likewise.
91 (elf_x32_lazy_ibt_plt): Likewise.
92 (elf_x86_64_non_lazy_ibt_plt): Likewise.
93 (elf_x32_non_lazy_ibt_plt): Likewise.
94 (elf_x86_64_get_synthetic_symtab): Support the second PLT.
95 (elf_x86_64_parse_gnu_properties): Support
96 GNU_PROPERTY_X86_FEATURE_1_AND.
97 (elf_x86_64_merge_gnu_properties): Support
98 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
99 on GNU_PROPERTY_X86_FEATURE_1_IBT
100 (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
101 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
102 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
103 is set on all relocatable inputs.
105 2017-06-22 Nick Clifton <nickc@redhat.com>
108 * som.c (setup_sections): NUL terminate the space_strings buffer.
109 Check that the space.name field does not index beyond the end of
110 the space_strings buffer.
112 2017-06-21 Nick Clifton <nickc@redhat.com>
115 * coff-sh.c (sh_reloc): Check for an out of range reloc.
117 2017-06-21 Nick Clifton <nickc@redhat.com>
120 * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
121 type of the size parameter.
122 (_bfd_vms_save_counted_string): Add second parameter - the maximum
123 length of the counted string.
124 * vms.h (_bfd_vms_save_sized_string): Update prototype.
125 (_bfd_vms_save_counted_string): Likewise.
126 * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
127 _bfd_vms_save_counted_string.
128 (_bfd_vms_slurp_ehdr): Likewise.
129 (_bfd_vms_slurp_egsd): Likewise.
130 (Parse_module): Likewise.
132 2017-06-21 Alan Modra <amodra@gmail.com>
134 * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
135 calls before tocsave calls.
136 (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
139 2017-06-21 Nick Clifton <nickc@redhat.com>
142 * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
143 bfd_get_full_section_contents returns no contents.
145 2017-06-21 Nick Clifton <nickc@redhat.com>
148 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
151 2017-06-21 Nick Clifton <nickc@redhat.com>
154 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
156 (image_set_ptr): Likewise.
157 (alpha_vms_fix_sec_rel): Likewise.
158 (alpha_vms_slurp_relocs): Likewise.
160 2017-06-21 Nick Clifton <nickc@redhat.com>
163 * ieee.c (ieee_slurp_sections): Check for a NULL return from
165 (ieee_archive_p): Likewise.
166 (ieee_object_p): Likewise.
168 2017-06-21 Nick Clifton <nickc@redhat.com>
171 * elf.c (setup_group): Zero the group section pointer list after
172 allocation so that loops can be caught. Check for NULL pointers
173 when processing a group list.
175 2017-06-19 H.J. Lu <hongjiu.lu@intel.com>
178 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
179 the DYNAMIC bit instead of bfd_count_sections.
181 2017-06-19 Nick Clifton <nickc@redhat.com>
184 * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
186 (evax_bfd_print_eeom): Likewise.
187 (evax_bfd_print_egsd): Check for an overlarge record length.
188 (evax_bfd_print_etir): Likewise.
190 2017-06-19 Nick Clifton <nickc@redhat.com>
193 * libieee.h (struct common_header_type): Add end_p field.
194 * ieee.c (this_byte_and_next): Do not advance input_p beyond
196 (read_id): Check for a length that exceeds the remaining bytes in
198 (ieee_seek): Initialise end_p.
199 (ieee_archive_p): Likewise.
200 (ieee_object_p): Likewise.
202 2017-06-19 Nick Clifton <nickc@redhat.com>
205 * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
206 before reading the EIHS structure entries.
208 2017-06-19 Nick Clifton <nickc@redhat.com>
211 * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
212 gsd_size. Check that there are enough bytes remaining to read the
213 type and size of the next egsd. Check that the size of the egsd
214 does not exceed the size of the record.
216 2017-06-19 Alan Modra <amodra@gmail.com>
218 * config.bfd: Correct targ_underscore for cris.
220 2017-06-18 Alan Modra <amodra@gmail.com>
222 * config.bfd: Correct targ_underscore for epiphany, ip2k,
223 m32c, mn10200, pru, rl78, rx, crisv32 and v850.
225 2017-06-16 Nick Clifton <nickc@redhat.com>
227 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
228 bucketlist is empty because there are no symbols to add to the
231 2017-06-16 Alan Modra <amodra@gmail.com>
237 * targets.c (struct bfd_target): Add _bfd_define_start_stop.
238 (BFD_JUMP_TABLE_LINK): Likewise.
239 * elf-bfd.h (bfd_elf_define_start_stop): Declare.
240 * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
241 (bfd_elf_define_start_stop): New function.
242 * linker.c (bfd_generic_define_start_stop): New function.
243 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
245 * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
246 * aout-target.h (MY_bfd_define_start_stop): Define.
247 * aout-tic30.c (MY_bfd_define_start_stop): Define.
248 * binary.c (binary_bfd_define_start_stop): Define.
249 * bout.c (b_out_bfd_define_start_stop): Define.
250 * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
251 * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
252 * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
253 * coffcode.h (coff_bfd_define_start_stop): Define.
254 * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
255 * i386msdos.c (msdos_bfd_define_start_stop): Define.
256 * i386os9k.c (os9k_bfd_define_start_stop): Define.
257 * ieee.c (ieee_bfd_define_start_stop): Define.
258 * ihex.c (ihex_bfd_define_start_stop): Define.
259 * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
260 * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
261 * mmo.c (mmo_bfd_define_start_stop): Define.
262 * nlm-target.h (nlm_bfd_define_start_stop): Define.
263 * oasys.c (oasys_bfd_define_start_stop): Define.
264 * pef.c (bfd_pef_bfd_define_start_stop): Define.
265 * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
266 * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
267 * som.c (som_bfd_define_start_stop): Define.
268 * srec.c (srec_bfd_define_start_stop): Define.
269 * tekhex.c (tekhex_bfd_define_start_stop): Define.
270 * versados.c (versados_bfd_define_start_stop): Define.
271 * vms-alpha.c (vms_bfd_define_start_stop): Define.
272 (alpha_vms_bfd_define_start_stop): Define.
273 * xsym.c (bfd_sym_bfd_define_start_stop): Define.
274 * bfd-in2.h: Regenerate.
275 * libbfd.h: Regenerate.
277 2017-06-16 Jiong Wang <jiong.wang@arm.com>
279 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
280 SYMBOL_REFERENCES_LOCAL.
282 2017-06-15 Jiong Wang <jiong.wang@arm.com>
285 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
286 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
287 runtime for if there needs copy relocation elimination.
288 (need_copy_relocation_p): New function. Return true for symbol with
289 pc-relative references and if it's against read-only sections.
290 (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
291 (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
292 that are related with accessing external objects.
293 (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
294 in elfNN_aarch64_check_relocs.
296 2017-06-15 Nick Clifton <nickc@redhat.com>
299 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
302 (ieee_archive_p): Likewise.
304 2017-06-15 Nick Clifton <nickc@redhat.com>
307 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
309 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
311 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
312 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
313 keep both windowed and call0 ABI PLT definitions.
314 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
315 elf_xtensa_*_plt_entry endex.
316 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
318 2017-06-14 Nick Clifton <nickc@redhat.com>
321 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
324 2017-06-14 Nick Clifton <nickc@redhat.com>
327 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
328 maximum value for the ascic pointer. Check that name processing
329 does not read beyond this value.
330 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
333 2017-06-14 Nick Clifton <nickc@redhat.com>
336 * versados.c (versados_mkobject): Zero the allocated tdata structure.
337 (process_otr): Check for an invalid offset in the otr structure.
339 2017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
341 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
343 2017-06-13 H.J. Lu <hongjiu.lu@intel.com>
349 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
350 vtable field to a union.
351 (_bfd_elf_is_start_stop): Removed.
352 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
353 __start_SECNAME and __stop_SECNAME symbols.
354 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
355 * elflink.c (_bfd_elf_is_start_stop): Removed.
356 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
357 _bfd_elf_is_start_stop.
358 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
359 __stop_SECNAME symbols. Updated.
360 (elf_gc_smash_unused_vtentry_relocs): Likewise.
361 (bfd_elf_gc_record_vtinherit): Likewise.
362 (bfd_elf_gc_record_vtentry): Likewise.
364 2017-06-13 Nick Clifton <nickc@redhat.com>
367 * elflink.c (elf_link_adjust_relocs): Generate an error when
368 encountering a reloc against a symbol removed by garbage
371 2017-06-12 H.J. Lu <hongjiu.lu@intel.com>
373 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
374 to merge_gnu_properties.
375 * elf-properties.c (elf_merge_gnu_properties): Add struct
376 bfd_link_info * and pass it to merge_gnu_properties.
377 (elf_merge_gnu_property_list): Add struct bfd_link_info *
378 and pass it to elf_merge_gnu_properties.
379 (_bfd_elf_link_setup_gnu_properties): Pass info to
380 elf_merge_gnu_property_list.
381 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
383 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
385 2017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
388 * binary.c (binary_set_section_contents): Scale lma by octets
389 per byte to set filepos.
391 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
393 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
396 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
398 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
401 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
403 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
404 patched section contents for TLS IE reloc.
405 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
407 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
409 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
410 RELOC_FOR_GLOBAL_SYMBOL macro.
412 2018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
414 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
417 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
419 * config/tc-arc.c (md_undefined_symbol): Changed.
420 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
422 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
424 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
427 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
429 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
430 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
432 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
434 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
437 2017-06-08 Richard Earnshaw <rearnsha@arm.com>
439 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
440 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
441 is non-zero. Add clarifying comments.
443 2017-06-08 H.J. Lu <hongjiu.lu@intel.com>
445 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
446 name. Use local IFUNC symbol name string to report unsupported
447 non-PIC call to IFUNC function.
448 (elf_i386_relocate_section): Dump local IFUNC name with minfo
449 when generating R_386_IRELATIVE relocation.
450 (elf_i386_finish_dynamic_symbol): Likewise.
451 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
453 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
454 when generating R_X86_64_IRELATIVE relocation.
455 (elf_x86_64_finish_dynamic_symbol): Likewise.
457 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
459 * elf.c (setup_group): Make sure BFD sections are created for all
460 group sections in the input file when processing SHF_GROUP
462 (bfd_section_from_shdr): Avoid duplicating logic already
463 implemented in `setup_group'.
465 2017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
468 * peXXigen.c (pe_print_idata): Use the address of the first thunk
469 if the hint address is zero.
471 2017-06-06 James Clarke <jrtc27@jrtc27.com>
474 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
475 ELF_COMMON_DEF_P for common symbols.
477 2017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
479 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
480 SEC_GROUP sections as SEC_EXCLUDE.
481 (bfd_elf_set_group_contents): Replace use of abort with an assert.
482 (assign_section_numbers): Use resolve_section_groups flag instead
483 of relocatable link type.
484 (_bfd_elf_init_private_section_data): Use resolve_section_groups
485 flag instead of checking the final_link flag for part of the
486 checks in here. Fix white space as a result.
487 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
488 instead of relocatable link type.
489 (bfd_elf_final_link): Likewise.
491 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
493 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
495 * elf32-score.c (score_elf_final_link_relocate): Likewise.
496 (s3_bfd_score_elf_check_relocs): Likewise.
497 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
498 (score_elf_final_link_relocate): Likewise.
499 (s7_bfd_score_elf_check_relocs): Likewise.
501 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
503 * elflink.c (init_reloc_cookie_rels): Remove unused variable
506 2017-06-06 Maciej W. Rozycki <macro@imgtec.com>
508 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
509 from `reloc_count' rather than decrementing it.
510 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
511 `reloc_count' by `int_rels_per_ext_rel'.
512 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
513 `reloc_count' by `int_rels_per_ext_rel' for last relocation
515 (s3_bfd_score_elf_check_relocs): Likewise.
516 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
517 (s7_bfd_score_elf_relocate_section): Likewise.
518 (s7_bfd_score_elf_check_relocs): Likewise.
519 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
520 prototype and function.
521 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
522 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
523 triple rather than once the sum of REL and RELA relocation entry
525 (bfd_elf64_get_reloc_upper_bound): Remove macro.
526 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
527 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
528 storage allocation size determination.
529 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
530 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
531 by `int_rels_per_ext_rel' for last relocation entry
533 (bfd_elf_final_link): Do not multiply `reloc_count' by
534 `int_rels_per_ext_rel' for internal relocation storage
535 allocation size determination.
536 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
537 `int_rels_per_ext_rel' for last relocation entry determination.
538 (elf_gc_smash_unused_vtentry_relocs): Likewise.
539 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
540 (_bfd_mips_elf_relocate_section): Likewise.
542 2017-06-05 Alan Modra <amodra@gmail.com>
545 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
547 2017-06-01 John Baldwin <jhb@FreeBSD.org>
549 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
550 determine structure sizes.
551 (elfcore_grok_freebsd_prstatus): Likewise.
553 2017-06-01 Alan Modra <amodra@gmail.com>
555 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
556 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
558 (is_elfv2_localentry0): New function.
559 (ppc64_elf_tls_setup): Default params->plt_localentry0.
560 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
561 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
562 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
563 optimized localentry:0 stubs.
564 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
565 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
567 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
569 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
571 2017-05-30 Casey Smith <clegg89@gmail.com>
574 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
575 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
577 2017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
579 * cpu-arc.c (arc_compatible): New function.
581 2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
583 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
585 2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
588 * bfdio.c (bfd_get_file_size): New function.
589 * bfd-in2.h: Regenerated.
591 2017-05-23 Dilian Palauzov <git-dpa@aegee.org>
593 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
596 2017-05-22 H.J. Lu <hongjiu.lu@intel.com>
598 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
599 dynobj instead of htab->elf.dynobj.
601 2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
603 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
605 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
606 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
607 actual number of internal relocations retrieved. Adjust
608 function description.
609 (bfd_elf64_canonicalize_reloc): Remove macro.
610 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
612 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
614 * archures.c (bfd_mach_sparc_v9m8): Define.
615 (bfd_mach_sparc_v8plusm8): Likewise.
616 (bfd_mach_sparc_v9_p): Adjust to M8.
617 (bfd_mach_sparc_64bit_p): Likewise.
618 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
619 bfd_mach_sparc_v8plusm8.
620 * bfd-in2.h: Regenerated.
621 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
623 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
624 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
625 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
627 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
628 bfd_mach_sparc_v8plusm8.
630 2017-05-19 Alan Modra <amodra@gmail.com>
632 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
633 debug and special sections when no non-note alloc sections in an
636 2017-05-18 Alan Modra <amodra@gmail.com>
638 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
639 * elf-m10300.c: Likewise.
641 * elf32-arc.c: Likewise.
642 * elf32-bfin.c: Likewise.
643 * elf32-m68k.c: Likewise.
644 * elf32-nds32.c: Likewise.
645 * elf32-tilepro.c: Likewise.
646 * elflink.c: Likewise.
647 * elfnn-aarch64.c: Likewise.
648 * elfnn-riscv.c: Likewise.
649 * elfxx-tilegx.c: Likewise.
650 * mach-o.c: Likewise.
651 * peXXigen.c: Likewise.
652 * vms-alpha.c: Likewise.
653 * vms-lib.c: Likewise.
655 2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
658 * elflink.c (elf_gc_mark_debug_section): New function.
659 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
660 referenced by kept debug sections.
662 2017-05-16 Alan Modra <amodra@gmail.com>
664 * elf-m10300.c: Rename occurrences of non_ir_ref.
665 * elf32-arm.c: Likewise.
666 * elf32-bfin.c: Likewise.
667 * elf32-cr16.c: Likewise.
668 * elf32-cris.c: Likewise.
669 * elf32-d10v.c: Likewise.
670 * elf32-dlx.c: Likewise.
671 * elf32-fr30.c: Likewise.
672 * elf32-frv.c: Likewise.
673 * elf32-hppa.c: Likewise.
674 * elf32-i370.c: Likewise.
675 * elf32-i386.c: Likewise.
676 * elf32-iq2000.c: Likewise.
677 * elf32-lm32.c: Likewise.
678 * elf32-m32c.c: Likewise.
679 * elf32-m32r.c: Likewise.
680 * elf32-m68hc1x.c: Likewise.
681 * elf32-m68k.c: Likewise.
682 * elf32-mcore.c: Likewise.
683 * elf32-metag.c: Likewise.
684 * elf32-microblaze.c: Likewise.
685 * elf32-moxie.c: Likewise.
686 * elf32-msp430.c: Likewise.
687 * elf32-mt.c: Likewise.
688 * elf32-nios2.c: Likewise.
689 * elf32-or1k.c: Likewise.
690 * elf32-ppc.c: Likewise.
691 * elf32-rl78.c: Likewise.
692 * elf32-s390.c: Likewise.
693 * elf32-score.c: Likewise.
694 * elf32-score7.c: Likewise.
695 * elf32-sh.c: Likewise.
696 * elf32-tic6x.c: Likewise.
697 * elf32-tilepro.c: Likewise.
698 * elf32-v850.c: Likewise.
699 * elf32-vax.c: Likewise.
700 * elf32-xstormy16.c: Likewise.
701 * elf32-xtensa.c: Likewise.
702 * elf64-alpha.c: Likewise.
703 * elf64-hppa.c: Likewise.
704 * elf64-ia64-vms.c: Likewise.
705 * elf64-mmix.c: Likewise.
706 * elf64-ppc.c: Likewise.
707 * elf64-s390.c: Likewise.
708 * elf64-sh64.c: Likewise.
709 * elf64-x86-64.c: Likewise.
710 * elflink.c: Likewise.
711 * elfnn-aarch64.c: Likewise.
712 * elfnn-ia64.c: Likewise.
713 * elfnn-riscv.c: Likewise.
714 * elfxx-mips.c: Likewise.
715 * elfxx-sparc.c: Likewise.
716 * elfxx-tilegx.c: Likewise.
717 * linker.c: Likewise.
719 2017-05-16 Alan Modra <amodra@gmail.com>
721 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
722 * elflink.c (elf_link_add_object_symbols): Update to use
724 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
726 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
728 2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
730 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
732 2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
734 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
735 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
737 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
739 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
741 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
743 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
744 to plt_second/plt_second_eh_frame.
745 (elf_x86_64_link_hash_newfunc): Updated.
746 (elf_x86_64_allocate_dynrelocs): Likewise.
747 (elf_x86_64_size_dynamic_sections): Likewise.
748 (elf_x86_64_relocate_section): Likewise.
749 (elf_x86_64_finish_dynamic_symbol): Likewise.
750 (elf_x86_64_finish_dynamic_sections): Likewise.
751 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
752 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
754 (elf_backend_setup_gnu_properties): Updated. Create the
755 .plt.sec section instead of the .plt.sec section.
757 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
759 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
760 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
761 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
763 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
765 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
766 (bfd_elf64_set_reloc): Define.
767 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
769 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
771 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
772 (struct bfd_target): New field _bfd_set_reloc.
773 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
774 * reloc.c (_bfd_generic_set_reloc): New function.
775 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
776 * nlm-target.h (nlm_set_reloc): Likewise.
777 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
778 * aout-tic30.c (MY_set_reloc): Likewise.
779 * aout-target.h (MY_set_reloc): Likewise.
780 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
781 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
782 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
783 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
784 * aout-adobe.c (aout_32_set_reloc): Likewise.
785 * bout.c (b_out_set_reloc): Likewise.
786 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
787 * i386os9k.c (aout_32_set_reloc): Likewise.
788 * ieee.c (ieee_set_reloc): Likewise.
789 * oasys.c (oasys_set_reloc): Likewise.
790 * som.c (som_set_reloc): Likewise.
791 * versados.c (versados_set_reloc): Likewise.
792 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
793 _bfd_generic_set_reloc.
794 (rs6000_xcoff64_aix_vec): LIkewise.
795 * libbfd.c (_bfd_norelocs_set_reloc): New function.
796 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
797 * i386msdos.c (msdos_set_reloc): Define to
798 _bfd_norelocs_set_reloc.
799 * elfcode.h (elf_set_reloc): Define.
800 * bfd-in2.h: Regenerated.
802 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
805 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
806 for IFUNC function address.
808 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
810 * elf32-arc.c (FEATURE_LIST_NAME): Define.
811 (CONFLICT_LIST): Likewise.
812 (opcode/arc-attrs.h): Include.
813 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
814 (arc_extract_features): New file.
815 (arc_stralloc): Likewise.
816 (arc_elf_merge_attributes): Likewise.
817 (arc_elf_merge_private_bfd_data): Use object attributes.
818 (bfd_arc_get_mach_from_attributes): New function.
819 (arc_elf_object_p): Use object attributes.
820 (arc_elf_final_write_processing): Likewise.
821 (elf32_arc_obj_attrs_arg_type): New function.
822 (elf32_arc_obj_attrs_handle_unknown): Likewise.
823 (elf32_arc_section_from_shdr): Likewise.
824 (elf_backend_obj_attrs_vendor): Define.
825 (elf_backend_obj_attrs_section): Likewise.
826 (elf_backend_obj_attrs_arg_type): Likewise.
827 (elf_backend_obj_attrs_section_type): Likewise.
828 (elf_backend_obj_attrs_handle_unknown): Likewise.
829 (elf_backend_section_from_shdr): Likewise.
831 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
834 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
835 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
836 and the destination is a Thumb symbol.
838 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
840 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
841 initializer to silence GCC 4.2.
842 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
844 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
846 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
847 (LAZY_PLT_ENTRY_SIZE): This.
848 (NON_LAZY_PLT_ENTRY_SIZE): New.
849 (elf_x86_64_plt0_entry): Renamed to ...
850 (elf_x86_64_lazy_plt0_entry): This.
851 (elf_x86_64_plt_entry): Renamed to ...
852 (elf_x86_64_lazy_plt_entry): This.
853 (elf_x86_64_bnd_plt0_entry): Renamed to ...
854 (elf_x86_64_lazy_bnd_plt0_entry): This.
855 (elf_x86_64_legacy_plt_entry): Removed.
856 (elf_x86_64_bnd_plt_entry): Renamed to ...
857 (elf_x86_64_lazy_bnd_plt_entry): This.
858 (elf_x86_64_legacy_plt2_entry): Renamed to ...
859 (elf_x86_64_non_lazy_plt_entry): This.
860 (elf_x86_64_bnd_plt2_entry): Renamed to ...
861 (elf_x86_64_non_lazy_bnd_plt_entry): This.
862 (elf_x86_64_eh_frame_plt): Renamed to ...
863 (elf_x86_64_eh_frame_lazy_plt): This.
864 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
865 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
866 (elf_x86_64_eh_frame_plt_got): Renamed to ...
867 (elf_x86_64_eh_frame_non_lazy_plt): This.
868 (elf_x86_64_lazy_plt_layout): New.
869 (elf_x86_64_non_lazy_plt_layout): Likewise.
870 (elf_x86_64_plt_layout): Likewise.
871 (elf_x86_64_backend_data): Remove PLT layout information. Add
872 os for target system.
873 (GET_PLT_ENTRY_SIZE): Removed.
874 (elf_x86_64_lazy_plt): New.
875 (elf_x86_64_non_lazy_plt): Likewise.
876 (elf_x86_64_lazy_bnd_plt): Likewise.
877 (elf_x86_64_non_lazy_bnd_plt): Likewise.
878 (elf_x86-64_arch_bed): Updated.
879 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
880 (elf_x86_64_create_dynamic_sections): Removed.
881 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
882 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
883 (elf_x86-64_adjust_dynamic_symbol): Updated.
884 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
885 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
886 size for PLT0 if there is no PLT0. Get plt_entry_size from
887 non_lazy_plt for non-lazy PLT entries.
888 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
889 from non_lazy_plt for non-lazy PLT entries.
890 (elf_x86-64_relocate_section): Updated. Properly get PLT index
892 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
893 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
894 entries with non-lazy PLT layout. Don't fill the second and third
895 slots in the PLT entry if there is no PLT0.
896 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
897 if there is no PLT0. Set sh_entsize on the .plt.got section.
898 (compare_relocs): New.
899 (elf_x86_64_plt_type): Likewise.
900 (elf_x86_64_plt): Likewise.
901 (elf_x86_64_nacl_plt): New. Forward declaration.
902 (elf_x86_64_get_plt_sym_val): Removed.
903 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
904 against all dynamic relocations.
905 (elf_x86_64_link_setup_gnu_properties): New function.
906 (elf_backend_create_dynamic_sections): Updated.
907 (elf_backend_setup_gnu_properties): New.
908 (elf_x86_64_nacl_plt): New.
909 (elf_x86_64_nacl_arch_bed): Updated.
911 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
913 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
914 (LAZY_PLT_ENTRY_SIZE): This.
915 (NON_LAZY_PLT_ENTRY_SIZE): New.
916 (elf_i386_plt0_entry): Renamed to ...
917 (elf_i386_lazy_plt0_entry): This.
918 (elf_i386_plt_entry): Renamed to ...
919 (elf_i386_lazy_plt_entry): This.
920 (elf_i386_pic_plt0_entry): Renamed to ...
921 (elf_i386_pic_lazy_plt0_entry): This.
922 (elf_i386_pic_plt_entry): Renamed to ...
923 (elf_i386_pic_lazy_plt_entry): This.
924 (elf_i386_got_plt_entry): Renamed to ...
925 (elf_i386_non_lazy_plt_entry): This.
926 (elf_i386_pic_got_plt_entry): Renamed to ...
927 (elf_i386_pic_non_lazy_plt_entry): This.
928 (elf_i386_eh_frame_plt): Renamed to ...
929 (elf_i386_eh_frame_lazy_plt): This.
930 (elf_i386_eh_frame_plt_got): Renamed to ...
931 (elf_i386_eh_frame_non_lazy_plt): This.
932 (elf_i386_plt_layout): Renamed to ...
933 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
934 eh_frame_plt_got_size.
935 (elf_i386_non_lazy_plt_layout): New.
936 (elf_i386_plt_layout): Likewise.
937 (elf_i386_non_lazy_plt): Likewise.
938 (GET_PLT_ENTRY_SIZE): Removed.
939 (elf_i386_plt): Renamed to ...
940 (elf_i386_lazy_plt): This.
941 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
942 (elf_i386_arch_bed): Updated.
943 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
944 (elf_i386_create_dynamic_sections): Removed.
945 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
946 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
947 (elf_i386_adjust_dynamic_symbol): Updated.
948 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
949 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
950 size for PLT0 if there is no PLT0.
951 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
952 output section is discarded only if GOT isn't empty.
953 (elf_i386_relocate_section): Updated. Properly get PLT index
955 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
956 second and third slots in the PLT entry if there is no PLT0.
957 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
958 if there is no PLT0. Set sh_entsize on the .plt.got section.
959 (elf_i386_nacl_plt): Forward declaration.
960 (elf_i386_get_plt_sym_val): Removed.
961 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
962 against all dynamic relocations.
963 (elf_i386_link_setup_gnu_properties): New function.
964 (elf_backend_create_dynamic_sections): Updated.
965 (elf_backend_setup_gnu_properties): New.
966 (elf_i386_nacl_plt): Updated.
967 (elf_i386_nacl_arch_bed): Likewise.
968 (elf_i386_vxworks_arch_bed): Likewise.
970 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
972 * elflink.c (elf_output_implib): Remove executable flag from import
974 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
975 library is a relocatable object file.
977 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
980 * elf32-avr.c (avr_should_move_sym): New function.
981 (avr_should_reduce_sym_size): Likewise.
982 (avr_should_increase_sym_size): Likewise.
983 (elf32_avr_relax_delete_bytes): Adjust symbol values
984 and sizes by calling new functions.
986 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
988 * config.bfd (riscv32-*): Enable rv64.
990 2017-05-02 Alan Modra <amodra@gmail.com>
993 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
994 rather than h->root.type == bfd_link_hash_new.
995 (bfd_elf_record_link_assignment): Similarly, call
996 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
998 2017-04-29 Alan Modra <amodra@gmail.com>
1001 * reloc.c (reloc_offset_in_range): New function.
1002 (bfd_perform_relocation, bfd_install_relocation): Use it.
1003 (_bfd_final_link_relocate): Likewise.
1005 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
1007 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
1008 before using .plt.got.
1009 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
1011 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
1013 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
1014 instead of "+=" to update 0.
1016 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
1018 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
1019 .plt.got section here.
1020 (elf_i386_check_relocs): Don't create the .plt.got section.
1021 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
1022 the .plt.got and .plt.bnd sections here.
1023 (elf_x86_64_check_relocs): Don't create the .plt.got nor
1026 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
1028 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
1030 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
1031 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
1032 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
1033 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
1036 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
1038 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
1040 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
1041 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
1042 the first relocatable ELF input with GNU properties.
1044 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
1046 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
1047 VxWorks for non-PIC.
1049 2017-04-27 Alan Modra <amodra@gmail.com>
1051 * elf-bfd.h (struct elf_backend_data): Make asection param of
1052 elf_backend_eh_frame_address_size const.
1053 (_bfd_elf_eh_frame_address_size): Likewise.
1054 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
1055 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
1056 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
1057 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
1058 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
1059 (next_cie_fde_offset): Constify params.
1060 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
1062 2017-04-27 Alan Modra <amodra@gmail.com>
1064 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
1065 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
1066 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
1068 (offset_adjust): New function.
1069 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
1070 (adjust_eh_frame_local_symbols): Likewise.
1071 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
1072 after changing anything. Return true if anything changed.
1073 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
1074 _bfd_elf_adjust_eh_frame_global_symbol for globals.
1076 2017-04-27 Alan Modra <amodra@gmail.com>
1078 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
1081 2017-04-27 Alan Modra <amodra@gmail.com>
1083 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
1084 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
1085 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
1086 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
1087 for undef and undefweak dyn_relocs.
1088 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
1089 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
1090 (allocate_got, allocate_dynrelocs): Likewise.
1091 (ppc64_elf_relocate_section): Likewise.
1093 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
1095 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
1096 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
1097 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
1098 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
1100 2017-04-26 Nick Clifton <nickc@redhat.com>
1103 * reloc.c (bfd_perform_relocation): Check for a negative address
1106 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
1109 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
1111 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
1112 (elf_backend_always_renumber_dynsyms): Define.
1113 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
1114 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
1115 * elflink.c (bfd_elf_size_dynamic_sections): Also call
1116 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
1118 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
1120 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
1122 * elflink.c (bfd_elf_size_dynamic_sections): Only call
1123 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
1124 sections have been created.
1126 2017-04-26 Nick Clifton <nickc@redhat.com>
1129 * compress.c (bfd_init_section_compress_status): Check the return
1130 value from bfd_malloc.
1132 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
1134 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
1135 no_finish_dynamic_symbol.
1136 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
1138 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
1139 weak symbol, don't make it dynamic.
1140 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
1141 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
1142 relocation for GOT reference.
1143 (elf_x86_64_finish_dynamic_symbol): Abort if
1144 no_finish_dynamic_symbol isn't 0.
1146 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
1149 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
1150 undefined weak symbol, don't make it dynamic.
1151 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
1152 set no_finish_dynamic_symbol and generate R_386_RELATIVE
1153 relocation for R_386_GOT32.
1155 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
1158 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
1160 2017-04-23 Alan Modra <amodra@gmail.com>
1163 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
1164 * elf.c (lcomm_sym): New.
1165 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
1166 * bfd-in2.h: Regenerate.
1168 2017-04-23 Alan Modra <amodra@gmail.com>
1171 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
1172 parameters and comment.
1173 (_bfd_elf_get_reloc_section): Delete.
1174 (_bfd_elf_plt_get_reloc_section): Declare.
1175 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
1176 New functions. Don't blindly skip over assumed .rel/.rela prefix.
1178 (_bfd_elf_get_reloc_section): ..here. Delete.
1179 (assign_section_numbers): Call elf_get_reloc_section.
1180 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
1181 * elfxx-target.h (elf_backend_get_reloc_section): Update.
1183 2017-04-23 Alan Modra <amodra@gmail.com>
1186 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
1189 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
1192 * elf32-i386.c (elf_i386_link_hash_entry): Add
1193 no_finish_dynamic_symbol.
1194 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
1195 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
1196 symbol, don't make it dynamic in PIE.
1197 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
1198 set no_finish_dynamic_symbol and generate R_386_RELATIVE
1199 relocation for R_386_GOT32
1200 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
1203 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
1207 * elflink.c (elf_link_add_object_symbols): Require
1208 --no-dynamic-linker with -E/--dynamic-list when creating
1211 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
1213 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
1216 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
1218 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
1219 dynamic symbol sorting.
1221 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
1224 * elflink.c (elf_link_add_object_symbols): Preserve
1225 dynamic_ref_after_ir_def when restoring the symbol table for
1226 unneeded dynamic object.
1228 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
1231 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
1232 on on undefined IFUNC symbol in the second PLT.
1234 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
1236 * peXXigen.c (pe_print_reloc): Correct chunk_end.
1238 2017-04-19 Alan Modra <amodra@gmail.com>
1240 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
1241 or make dynamic for info->dynamic_undefined_weak 0 and 1.
1242 * elf32-ppc.c:Formatting.
1243 (ensure_undefweak_dynamic): Don't make dynamic when
1244 info->dynamic_undefined_weak is zero.
1245 (allocate_dynrelocs): Discard undefweak dyn_relocs for
1246 info->dynamic_undefined_weak. Discard undef dyn_relocs when
1247 not default visibility. Discard undef and undefweak
1249 (ppc_elf_relocate_section): Adjust to suit.
1250 * elf64-ppc.c: Formatting.
1251 (ensure_undefweak_dynamic): Don't make dynamic when
1252 info->dynamic_undefined_weak is zero.
1253 (allocate_dynrelocs): Discard undefweak dyn_relocs for
1254 info->dynamic_undefined_weak. Discard them earlier.
1256 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
1259 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
1260 before generating the version definition section.
1262 2017-04-17 Alan Modra <amodra@gmail.com>
1264 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
1265 state when a regular object file defines a symbol with
1266 incompatible type to that defined by an earlier shared lib.
1268 2017-04-13 Alan Modra <amodra@gmail.com>
1270 * coffcode.h: Wrap some overly long _bfd_error_handler args.
1272 * elf32-arm.c: Likewise.
1273 * elf32-i386.c: Likewise.
1274 * elf32-mep.c: Likewise.
1275 * elf64-ia64-vms.c: Likewise.
1276 * elf64-x86-64.c: Likewise.
1277 * elflink.c: Likewise.
1278 * elfnn-ia64.c: Likewise.
1279 * elfxx-mips.c: Likewise.
1281 2017-04-13 Alan Modra <amodra@gmail.com>
1283 * aoutx.h: Use %B and %A in error messages throughout file.
1284 * aout-cris.c: Likewise.
1285 * archive.c: Likewise.
1286 * binary.c: Likewise.
1287 * coff-rs6000.c: Likewise.
1288 * coff-tic4x.c: Likewise.
1289 * coffcode.h: Likewise.
1290 * coffgen.c: Likewise.
1291 * cofflink.c: Likewise.
1292 * coffswap.h: Likewise.
1293 * cpu-arm.c: Likewise.
1294 * elf-eh-frame.c: Likewise.
1295 * elf-m10300.c: Likewise.
1297 * elf32-arc.c: Likewise.
1298 * elf32-arm.c: Likewise.
1299 * elf32-bfin.c: Likewise.
1300 * elf32-frv.c: Likewise.
1301 * elf32-iq2000.c: Likewise.
1302 * elf32-m32c.c: Likewise.
1303 * elf32-microblaze.c: Likewise.
1304 * elf32-nds32.c: Likewise.
1305 * elf32-rl78.c: Likewise.
1306 * elf32-rx.c: Likewise.
1307 * elf32-score.c: Likewise.
1308 * elf32-score7.c: Likewise.
1309 * elf32-sh64.c: Likewise.
1310 * elf32-v850.c: Likewise.
1311 * elf32-vax.c: Likewise.
1312 * elf32-visium.c: Likewise.
1313 * elf64-ia64-vms.c: Likewise.
1314 * elf64-mmix.c: Likewise.
1315 * elf64-sh64.c: Likewise.
1316 * elfcode.h: Likewise.
1317 * elfnn-aarch64.c: Likewise.
1318 * elfnn-ia64.c: Likewise.
1319 * elfxx-mips.c: Likewise.
1320 * hpux-core.c: Likewise.
1323 * linker.c: Likewise.
1324 * merge.c: Likewise.
1326 * oasys.c: Likewise.
1327 * pdp11.c: Likewise.
1328 * peXXigen.c: Likewise.
1329 * rs6000-core.c: Likewise.
1330 * vms-alpha.c: Likewise.
1331 * xcofflink.c: Likewise.
1333 2017-04-13 Alan Modra <amodra@gmail.com>
1335 * bfd.c (PRINT_TYPE): Define.
1336 (_doprnt): New function.
1337 (error_handler_internal): Use _doprnt.
1338 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
1339 calls in their natural order, throughout file.
1340 * coff-mcore.c: Likewise.
1341 * coff-ppc.c: Likewise.
1342 * coff-tic80.c: Likewise.
1343 * cofflink.c: Likewise.
1344 * elf-s390-common.c: Likewise.
1346 * elf32-arm.c: Likewise.
1347 * elf32-i386.c: Likewise.
1348 * elf32-m32r.c: Likewise.
1349 * elf32-msp430.c: Likewise.
1350 * elf32-spu.c: Likewise.
1351 * elf64-ia64-vms.c: Likewise.
1352 * elf64-sparc.c: Likewise.
1353 * elf64-x86-64.c: Likewise.
1354 * elflink.c: Likewise.
1355 * elfnn-aarch64.c: Likewise.
1356 * elfnn-ia64.c: Likewise.
1357 * elfxx-mips.c: Likewise.
1359 2017-04-13 Alan Modra <amodra@gmail.com>
1361 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
1362 branch veneers" error. Fix double space and format message.
1363 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
1364 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
1366 2017-04-13 Alan Modra <amodra@gmail.com>
1368 * bfd-in2.h: Regenerate.
1370 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
1372 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
1373 extra `\n' in warning/error messages.
1374 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
1375 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
1377 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
1379 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
1380 processor-specific properties with generic ELF target vector.
1382 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
1384 * elf32-sparc.c (elf_backend_fixup_symbol): New.
1385 * elf64-sparc.c (elf_backend_fixup_symbol): New.
1386 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
1387 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
1389 (link_hash_newfunc): Initialize has_got_reloc and
1391 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
1393 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
1395 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
1397 (_bfd_sparc_elf_fixup_symbol): New function.
1398 (allocate_dynrelocs): Don't allocate space for dynamic
1399 relocations and discard relocations against resolved undefined
1400 weak symbols in executable. Don't make resolved undefined weak
1401 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
1402 relocation against undefined weak symbols in PIE.
1403 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
1404 relocations against resolved undefined weak symbols in PIE
1405 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
1406 without ynamic PLT/GOT relocations for resolved undefined weak
1408 Don't generate dynamic relocation against resolved undefined
1409 weak symbol in executable.
1410 (pie_finish_undefweak_symbol): New function.
1411 (_bfd_sparc_elf_finish_dynamic_sections): Call
1412 pie_finish_undefweak_symbol on all symbols in PIE.
1413 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
1414 (_bfd_sparc_elf_fixup_symbol): New function.
1416 2017-04-10 Nick Clifton <nickc@redhat.com>
1418 * config.bfd: Remove ns32k from obsolete list.
1420 2017-04-10 Alan Modra <amodra@gmail.com>
1423 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
1424 (special_sections_i): Likewise for .init_array.
1425 (special_sections_p): Likewise for .preinit_array.
1427 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
1431 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
1432 ELF_COMMON_DEF_P for common symbols.
1433 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
1434 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1435 * elflink.c (_bfd_elf_merge_symbol): Revert commits
1436 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
1437 07492f668d2173da7a2bda3707ff0985e0f460b6.
1439 2017-04-07 Pedro Alves <palves@redhat.com>
1441 * opncls.c (bfd_get_debug_link_info): Rename to...
1442 (bfd_get_debug_link_info_1): ... this. Change type of second
1443 parameter to void pointer. Adjust.
1444 (bfd_get_debug_link_info): Reimplement on top of
1445 bfd_get_debug_link_info_1.
1446 (separate_debug_file_exists, separate_alt_debug_file_exists):
1447 Change type of second parameter to void pointer. Adjust.
1448 (get_func_type, check_func_type): Change type of second parameter
1450 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
1451 the callback functions instead of passing the address of a local.
1452 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
1453 find_separate_debug_file.
1454 (get_alt_debug_link_info_shim): Change type of second parameter to
1455 void pointer. Adjust.
1456 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
1457 find_separate_debug_file.
1458 (get_build_id_name, bfd_boolean check_build_id_file): Change type
1459 of second parameter to void pointer. Adjust.
1460 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
1461 pointer local to find_separate_debug_file.
1463 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
1465 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
1466 external symbols with a definition.
1467 (_bfd_coff_gc_mark_extra_sections): Fix typo.
1469 2017-04-07 Alan Modra <amodra@gmail.com>
1471 * po/SRC-POTFILES.in: Regenerate.
1473 2017-04-05 Alan Modra <amodra@gmail.com>
1475 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
1478 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
1480 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
1481 numbers for DataDirectory entry indicies passed to
1484 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
1486 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
1487 each GNU_MBIND section and align GNU_MBIND section to page size.
1488 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
1489 segment for each GNU_MBIND section.
1490 (_bfd_elf_init_private_section_data): Copy sh_info from input
1491 for GNU_MBIND section.
1493 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
1495 * elfnn-riscv.c (GP_NAME): Delete.
1496 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
1497 (_bfd_riscv_relax_lui): Likewise.
1499 2017-04-04 Nick Clifton <nickc@redhat.com>
1502 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
1504 (bfd_elf_final_link): Only initialize the extended symbol index
1505 section if there are extended symbol tables to list.
1507 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
1509 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
1510 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
1511 * configure.ac (elf): Add elf-properties.lo.
1512 * Makefile.in: Regenerated.
1513 * configure: Likewise.
1514 * elf-bfd.h (elf_property_kind): New.
1515 (elf_property): Likewise.
1516 (elf_property_list): Likewise.
1517 (elf_properties): Likewise.
1518 (_bfd_elf_parse_gnu_properties): Likewise.
1519 (_bfd_elf_get_property): Likewise.
1520 (_bfd_elf_link_setup_gnu_properties): Likewise.
1521 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
1522 and setup_gnu_properties.
1523 (elf_obj_tdata): Add properties.
1524 * elf-properties.c: New file.
1525 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
1526 (elf_i386_merge_gnu_properties): Likewise.
1527 (elf_backend_parse_gnu_properties): Likewise.
1528 (elf_backend_merge_gnu_properties): Likewise.
1529 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
1530 (elf_x86_64_merge_gnu_properties): Likewise.
1531 (elf_backend_parse_gnu_properties): Likewise.
1532 (elf_backend_merge_gnu_properties): Likewise.
1533 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
1534 (elf_backend_parse_gnu_properties): Likewise.
1535 (elf_backend_setup_gnu_properties): Likewise.
1536 (elfNN_bed): Add elf_backend_parse_gnu_properties,
1537 elf_backend_merge_gnu_properties and
1538 elf_backend_setup_gnu_properties.
1540 2017-03-30 Pip Cet <pipcet@gmail.com>
1542 * elf32-wasm32.c: Add relocation code, two relocs.
1543 * reloc.c: Add wasm32 relocations.
1544 * libbfd.h: Regenerate.
1545 * bfd-in2.h: Regenerate.
1546 * bfd/po/bfd.pot: Regenerate.
1548 2017-03-29 Nick Clifton <nickc@redhat.com>
1551 * coff-bfd.h (struct coff_section_data): Add new fields:
1552 saved_bias and bias.
1553 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
1554 computed for PE binaries.
1555 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
1558 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
1561 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
1562 to handle a local symbol with a hash-symbol-entry; without PLT.
1563 Add BFD_ASSERT for an incidental case with GOT entry present.
1564 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
1565 isn't forced-or-set local.
1567 2017-03-27 Pip Cet <pipcet@gmail.com>
1569 * wasm-module.c: New file to support WebAssembly modules.
1570 * wasm-module.h: New file to support WebAssembly modules.
1571 * doc/webassembly.texi: Start documenting wasm-module.c.
1572 * config.bfd: Add wasm_vec.
1573 * targets.c: Likewise.
1574 * configure.ac: Likewise.
1575 * Makefile.am: Add entries for wasm-module.c.
1576 * Makefile.in: Regenerate.
1577 * configure: Regenerate.
1578 * po/SRC-POTFILES.in: Regenerate.
1580 2017-03-27 Pip Cet <pipcet@gmail.com>
1582 * cpu-wasm32.c: New file to support wasm32 architecture.
1583 * elf32-wasm32.c: New file to support wasm32 architecture.
1584 * Makefile.am: Add wasm32 architecture.
1585 * archures.c: Likewise.
1586 * config.bfd: Likewise.
1587 * configure.ac: Likewise.
1588 * targets.c: Likewise.
1589 * Makefile.in: Regenerate.
1590 * bfd-in2.h: Regenerate.
1591 * configure: Regenerate.
1592 * po/SRC-POTFILES.in: Regenerate.
1594 2017-03-20 Alan Modra <amodra@gmail.com>
1597 * elf64-ppc.c (compare_symbols): Stabilize sort.
1599 2017-03-18 Alan Modra <amodra@gmail.com>
1601 * elf64-ppc.c (struct ppc_link_hash_table): Add
1602 local_ifunc_resolver and maybe_local_ifunc_resolver.
1603 (ppc_build_one_stub): Set flags on emitting dynamic
1604 relocation to ifunc.
1605 (ppc64_elf_relocate_section): Likewise.
1606 (ppc64_elf_finish_dynamic_symbol): Likewise.
1607 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
1608 local dynamic relocs to ifuncs.
1609 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
1610 local_ifunc_resolver and maybe_local_ifunc_resolver.
1611 (ppc_elf_relocate_section): Set flag on emitting dynamic
1612 relocation to ifuncs.
1613 (ppc_elf_finish_dynamic_symbol): Likewise.
1614 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
1615 dynamic relocs to ifuncs.
1617 2017-03-13 Nick Clifton <nickc@redhat.com>
1620 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
1621 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
1622 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
1623 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
1624 * bfd-in2.h: Regenerate.
1625 * libbfd.h: Regenerate.
1626 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
1628 (IS_AARCH64_TLSDESC_RELOC): Likewise.
1629 (elfNN_aarch64_howto_table): Likewise.
1630 (aarch64_tls_transition_without_check): Likewise.
1631 (aarch64_reloc_got_type): Likewise.
1632 (elfNN_aarch64_final_link_relocate): Likewise.
1633 (elfNN_aarch64_tls_relax): Likewise.
1634 (elfNN_aarch64_relocate_section): Likewise.
1635 (elfNN_aarch64_gc_sweep_hook): Likewise.
1636 (elfNN_aarch64_check_relocs): Likewise.
1637 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
1638 (_bfd_aarch64_elf_resolve_relocation): Likewise.
1640 2017-03-11 Alan Modra <amodra@gmail.com>
1642 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
1643 parameter is in fact used. Whitespace fixes.
1644 * elf64-ppc.c: Likewise.
1646 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
1648 * rs6000-core.c (CORE_NEW): Simplify macro when
1649 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
1651 2017-03-07 Alan Modra <amodra@gmail.com>
1655 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
1658 2017-03-05 Alan Modra <amodra@gmail.com>
1660 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
1661 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
1662 (next_cie_fde_offset): New function.
1663 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
1664 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
1665 four bytes. Align CIEs to four or eight bytes depending on
1666 per_encoding_aligned8. Align FDEs according to their encoding.
1667 Pad last FDE to output section alignment.
1668 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
1670 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
1671 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
1672 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
1674 2017-03-02 Martin Bickel <binutils@ineranves.de>
1677 * elf.c (rewrite_elf_program_header): Do not issue a warning for
1678 empty segments which have a zero filesz, but a non-zero memsz.
1680 2017-03-02 Alan Modra <amodra@gmail.com>
1682 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
1684 2017-02-28 Alan Modra <amodra@gmail.com>
1686 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
1687 (ppc64_elf_relocate_section): Likewise.
1689 2017-02-28 Alan Modra <amodra@gmail.com>
1692 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
1693 rather than elf32_nios2_hash_table or elf_hash_table.
1694 (create_got_section): Likewise.
1695 (nios2_elf32_finish_dynamic_symbol): Likewise.
1696 (nios2_elf32_adjust_dynamic_symbol): Likewise.
1697 (nios2_elf32_size_dynamic_sections): Likewise.
1698 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
1699 vars. Use htab equivalents directly instead. Don't create
1700 all dynamic sections on needing just the GOT. Use a goto
1701 rather than a fall-through with reloc test. Ensure
1702 htab->dynobj is set when making dynamic sreloc section.
1703 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
1704 equivalent directly instead. Don't segfault on looking for
1705 .dynamic when dynamic sections have not been created. Don't
1706 segfault on .got.plt being discarded.
1707 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
1708 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
1709 fixme and another not so relevant comment.
1710 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
1711 already set, set hash table dynobj on creating .sbss.
1713 2017-02-28 Alan Modra <amodra@gmail.com>
1715 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
1716 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
1717 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
1718 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
1719 (ppc64_elf_relocate_section): Likewise.
1720 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
1721 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
1722 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
1723 * libbfd.h: Regenerate.
1724 * bfd-in2.h: Regenerate.
1726 2017-02-28 Alan Modra <amodra@gmail.com>
1728 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
1729 dynamic .data.rel.ro read-only.
1730 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
1731 rather than section flags when deciding where copy reloc goes.
1732 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
1733 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
1734 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
1735 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
1736 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
1737 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
1738 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
1739 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
1740 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
1741 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
1742 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
1743 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
1744 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
1745 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
1746 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
1747 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
1748 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
1749 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
1750 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
1752 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
1754 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
1755 `jalr $0, $25' instruction encoding.
1757 2017-02-27 Nick Clifton <nickc@redhat.com>
1760 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
1761 generating a seg-fault when encountering a symbol that has been
1762 deleted by garbage collection.
1764 2017-02-25 Alan Modra <amodra@gmail.com>
1766 * elf32-arc.c (struct dynamic_sections): Delete.
1767 (enum dyn_section_types): Delete.
1768 (dyn_section_names): Delete.
1769 (arc_create_dynamic_sections): Delete.
1770 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
1771 segfault on discarded .rela.plt section.
1772 (elf_arc_size_dynamic_sections): Formatting. Don't call
1773 arc_create_dynamic_sections. Don't allocate memory for sections
1774 handled by the generic linker. Correct code finding relocs in
1775 read-only sections. Set SEC_EXCLUDE on zero size .got,
1776 .got.plt, and .dynbss sections. Do set .interp for pies.
1778 2017-02-24 Andrew Waterman <andrew@sifive.com>
1780 * elfnn-riscv.c (GP_NAME): New macro.
1781 (riscv_global_pointer_value): Use it.
1782 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
1783 output section, consider only that section's alignment.
1785 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
1787 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
1788 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
1789 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
1790 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
1792 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
1794 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
1795 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
1798 2017-02-23 Alan Modra <amodra@gmail.com>
1801 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
1803 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
1804 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
1807 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
1810 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
1811 processing ahead of the call to `elf_gc_sweep_symbol'.
1813 2017-02-22 Nick Clifton <nickc@redhat.com>
1816 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
1817 created section 4-byte alignment.
1819 2017-02-22 Alan Modra <amodra@gmail.com>
1821 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
1822 on .got or .plt output section being discarded by script.
1823 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
1826 2017-02-21 Alan Modra <amodra@gmail.com>
1828 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
1829 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
1831 2017-02-20 Alan Modra <amodra@gmail.com>
1834 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
1835 if DT_RELSZ/DT_RELASZ is zero.
1837 2017-02-17 Nick Clifton <nickc@redhat.com>
1839 * compress.c (bfd_get_full_section_contents): Remember to reduce
1840 compressed size by the sizeof the compression header when
1841 decompressing the contents.
1843 2017-02-17 Pedro Alves <palves@redhat.com>
1845 * srec.c (Chunk): Rename to ...
1846 (_bfd_srec_len): ... this.
1847 (S3Forced): Rename to ...
1848 (_bfd_srec_forceS3): ... this.
1849 * objcopy.c: Adjust all references.
1851 2017-02-17 Pedro Alves <palves@redhat.com>
1853 * archive.c (bsd_write_armap): Rename to ...
1854 (_bfd_bsd_write_armap): ... this.
1855 (coff_write_armap): Rename to ...
1856 (_bfd_coff_write_armap): ... this.
1857 * libbfd-in.h (bsd_write_armap): Rename to ...
1858 (_bfd_bsd_write_armap): ... this.
1859 (coff_write_armap): Rename to ...
1860 (_bfd_coff_write_armap): ... this.
1861 * aout-target.h, aout-tic30.c: Adjust all users.
1862 * libbfd.h: Regenerate.
1864 2017-02-17 Pedro Alves <palves@redhat.com>
1866 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
1867 (warn_deprecated): Rename to ...
1868 (_bfd_warn_deprecated): ... this.
1869 * libbfd.c (warn_deprecated): Rename to ...
1870 (_bfd_warn_deprecated): ... this.
1871 * bfd-in2.h: Regenerate.
1873 2017-02-17 Pedro Alves <palves@redhat.com>
1875 * bfdio.c (real_ftell): Rename to ...
1876 (_bfd_real_ftell): ... this.
1877 (real_fseek): Rename to ...
1878 (_bfd_real_fseek): ... this.
1879 (real_fopen): Rename to ...
1880 (_bfd_real_fopen): ... this.
1881 * libbfd-in.h (real_ftell): Rename to ...
1882 (_bfd_real_ftell): ... this.
1883 (real_fseek): Rename to ...
1884 (_bfd_real_fseek): ... this.
1885 (real_fopen): Rename to ...
1886 (_bfd_real_fopen): ... this.
1887 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
1888 * libbfd.h: Regenerate.
1890 2017-02-17 Pedro Alves <palves@redhat.com>
1892 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
1893 * libbfd.c (read_unsigned_leb128): Rename to ...
1894 (_bfd_read_unsigned_leb128): ... this.
1895 (read_signed_leb128): Rename to ...
1896 (_bfd_read_signed_leb128): ... this.
1897 (safe_read_leb128): Rename to ...
1898 (_bfd_safe_read_leb128): ... this.
1899 * libbfd-in.h (read_unsigned_leb128): Rename to ...
1900 (_bfd_read_unsigned_leb128): ... this.
1901 (read_signed_leb128): Rename to ...
1902 (_bfd_read_signed_leb128): ... this.
1903 (safe_read_leb128): Rename to ...
1904 (_bfd_safe_read_leb128): ... this.
1905 * libbfd.h: Renegerate.
1907 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
1909 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
1910 before trying to fine matching file and line information.
1912 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
1914 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
1915 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
1916 not match current bfd, then reload debug information. Record bfd
1917 we're loading debug info for in the stash. If we have debug
1918 informatin in the cache then perform section placement before
1921 2017-02-16 Alan Modra <amodra@gmail.com>
1924 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
1925 * elfxx-target.h (elf_backend_no_page_alias): Define.
1926 (elfNN_bed): Init new field.
1927 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
1928 ensure PT_LOAD segment starts on a new page.
1929 * elf32-hppa.c (elf_backend_no_page_alias): Define.
1931 2017-02-16 Alan Modra <amodra@gmail.com>
1934 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
1937 2017-02-16 Jiong Wang <jiong.wang@arm.com>
1939 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
1940 * bfd-in2.h: Regenerated.
1942 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
1945 * elf32-i386.c (elf_i386_relocate_section): Allow
1946 "lea foo@GOT, %reg" in PIC.
1948 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
1951 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
1952 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
1953 error against local IFUNC symbol without a base register for
1956 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
1958 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
1959 `%P: %H:' with `info->callbacks->einfo'.
1960 (ppc_elf_relocate_section): Likewise.
1961 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
1962 (ppc64_elf_edit_toc): Likewise.
1963 (ppc64_elf_relocate_section): Likewise.
1965 2017-02-14 Alan Modra <amodra@gmail.com>
1967 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
1968 --gc-keep-exported, and test versioned field of sym rather than
1969 looking for @ in name.
1971 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
1973 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
1976 2017-02-13 Nick Clifton <nickc@redhat.com>
1979 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
1982 2017-02-07 Andrew Waterman <andrew@sifive.com>
1984 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
1985 entry size if PLT header is written.
1987 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
1989 Fix sparc64 dynamic relocation processing to use the dynamic
1991 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
1992 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
1995 2017-02-03 Nick Clifton <nickc@redhat.com>
1998 * coffcode.h (coff_write_object_contents): Enlarge size of
1999 s_name_buf in order to avoid compile time warning about possible
2001 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
2002 32-bits of insn value before printing into buffer.
2004 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
2006 * elfxx-mips.c (mips_elf_hash_sort_data): Add
2007 `max_local_dynindx'.
2008 (mips_elf_sort_hash_table): Handle it.
2009 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
2010 symbols bump up `max_local_dynindx' rather than
2011 `max_non_got_dynindx'.
2013 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
2015 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
2016 `min_got_dynindx', `max_unref_got_dynindx' and
2017 `max_non_got_dynindx' members to the `bfd_size_type' data type.
2018 (mips_elf_sort_hash_table): Adjust accordingly.
2020 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
2022 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
2023 to access the hash table.
2025 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
2027 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
2028 non-NULL `htab' to the beginning.
2030 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
2032 * elflink.c (elf_gc_sweep): Wrap overlong line.
2034 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
2036 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
2037 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
2038 * elfxx-mips.c (mips_elf_link_hash_table): Add
2039 `ignore_branch_isa' member.
2040 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
2041 in branch relocation calculation as an error if
2042 `ignore_branch_isa' has been set.
2043 (_bfd_mips_elf_insn32): Rename to...
2044 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
2045 parameter to `insn32' and add an `ignore_branch_isa' parameter.
2046 Handle the new parameter.
2048 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
2050 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
2051 local variable dynobj.
2054 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
2055 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
2056 executable from read-only sections into sdynrelro.
2057 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
2058 dynamic relocs in sdynrelro.
2059 (elf_backend_want_dynrelro): Define.
2061 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
2063 * config.bfd (*-*-rtemsaout*): Mark as removed.
2065 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
2067 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
2068 (arm-*-rtems*): Move to (arm*-*-eabi*).
2069 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
2070 (m68-*-rtems*): Move to (m68*-*-elf*).
2072 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
2074 * config.bfd (*-*-rtemscoff*): Mark as removed.
2076 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
2079 * elflink.c (bfd_elf_record_link_assignment): Revert last
2080 change and don't ever clear `forced_local'. Set `mark'
2082 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
2084 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
2085 (bfd_elf_size_dynamic_sections): ... here.
2086 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
2087 and set `mark' instead in `__tls_get_addr_opt' processing.
2088 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
2090 2017-01-24 Alan Modra <amodra@gmail.com>
2092 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
2093 where dynamic relocs are preferable. Allow ifunc too.
2094 (ensure_undefweak_dynamic): New function.
2095 (allocate_dynrelocs): Use it here. Move plt handling last and
2096 don't make symbols dynamic, simplifying loop. Only make undef
2097 weak symbols with GOT entries dynamic. Correct condition
2098 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
2099 comments. Remove goto.
2100 (ppc_elf_relocate_section): Correct test for using dynamic
2101 symbol on GOT relocs. Rearrange test for emitting GOT relocs
2102 to suit. Set up explicit tls_index entries and implicit GOT
2103 tls_index entries resolvable at link time for
2104 __tls_get_addr_opt. Simplify test to clear mem for prelink.
2105 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
2106 (ensure_undefweak_dynamic): New function.
2107 (allocate_dynrelocs): Use it here. Only make undef weak symbols
2108 with GOT entries dynamic. Remove unnecessary test of
2109 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
2110 (ppc64_elf_relocate_section): Correct test for using dynamic
2111 symbol on GOT relocs. Rearrange test for emitting GOT relocs
2112 to suit. Set up explicit tls_index entries and implicit GOT
2113 tls_index entries resolvable at link time for __tls_get_addr_opt.
2114 Simplify expression to clear mem for prelink.
2116 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
2118 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
2120 2017-01-20 Jiong Wang <jiong.wang@arm.com>
2122 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
2123 (elf_backend_hash_symbol): Define.
2125 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
2128 * elflink.c (bfd_elf_record_link_assignment): Clear any
2129 `forced_local' marking for DSO symbols that are not being
2132 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
2134 * elfnn-riscv.c (riscv_elf_object_p): New function.
2136 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
2139 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
2141 (elf_x86_64_check_relocs): Create .eh_frame section for the
2143 (elf_x86_64_size_dynamic_sections): Allocate and initialize
2144 .eh_frame section for the .plt.bnd section.
2145 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
2146 for the .plt.bnd section.
2148 2017-01-12 Nick Clifton <nickc@redhat.com>
2151 * opncls.c (find_separate_debug_file): Add include_dirs
2152 parameter. Only include the directory part of the bfd's filename
2153 in search paths if include_dirs is true. Add a couple of extra
2154 locations for looking for debug files.
2155 ( bfd_follow_gnu_debuglink): Update invocation of
2156 find_separate_debug_file.
2157 (bfd_follow_gnu_debugaltlink): Likewise.
2158 (get_build_id): New function: Finds the build-id of the given bfd.
2159 (get_build_id_name): New function: Computes the name of the
2160 separate debug info file for a bfd, based upon its build-id.
2161 (check_build_id_file): New function: Checks to see if a separate
2162 debug info file exists at the given location, and that its
2163 build-id matches that of the original bfd.
2164 (bfd_follow_build_id_debuglink): New function: Finds a separate
2165 debug info file for a given bfd by using the build-id method.
2166 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
2167 method of locating a separate debug info file before using the
2169 * bfd-in2.h: Regenerate.
2171 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
2174 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
2175 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
2176 elf_x86_64_eh_frame_plt_got.
2177 (elf_x86_64_size_dynamic_sections): Get unwind info from
2178 elf_x86_64_bnd_arch_bed for the BND PLT.
2180 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
2182 * config.bfd: Add entries for i686-redox and x86_64-redox.
2184 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
2186 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
2188 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
2189 .eh_frame section to 4 bytes for x32.
2190 (elf_x86_64_check_relocs): Likewise.
2192 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
2195 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
2196 (PLT_GOT_FDE_LENGTH): Likewise.
2197 (elf_i386_plt_layout): Add eh_frame_plt_got and
2198 eh_frame_plt_got_size.
2199 (elf_i386_plt): Updated.
2200 (elf_i386_link_hash_table): Add plt_got_eh_frame.
2201 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
2202 (elf_i386_size_dynamic_sections): Allocate and initialize
2203 .eh_frame section for .plt.got.
2204 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
2206 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
2207 eh_frame_plt_got_size.
2208 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
2209 (PLT_GOT_FDE_LENGTH): Likewise.
2210 (elf_x86_64_backend_data): Add eh_frame_plt_got and
2211 eh_frame_plt_got_size.
2212 (elf_x86_64_arch_bed): Updated.
2213 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
2214 eh_frame_plt_got_size.
2215 (elf_x86_64_nacl_arch_bed): Likewise.
2216 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
2217 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
2218 (elf_x86_64_size_dynamic_sections): Allocate and initialize
2219 .eh_frame section for .plt.got.
2220 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
2223 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
2225 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
2226 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
2228 2017-01-09 Nick Clifton <nickc@redhat.com>
2230 * dwarf2.c (lookup_address_in_function_table): Return early if
2231 there are no functions in the given comp unit, or if the high
2232 address of the last function in the comp unit is less than the
2235 2017-01-09 Nick Clifton <nickc@redhat.com>
2238 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
2239 message if there are too many symbols to load.
2241 2017-01-04 James Clarke <jrtc27@jrtc27.com>
2243 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
2244 if relocs are cached.
2246 2017-01-03 Rich Felker <bugdal@aerifal.cx>
2249 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
2250 for R_MICROBLAZE_GOTOFF_64.
2252 2017-01-03 Nick Clifton <nickc@redhat.com>
2254 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
2255 warning about using a possibly uninitialised variable.
2257 2017-01-02 Alan Modra <amodra@gmail.com>
2259 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
2260 (allocate_plt_static, allocate_dynrelocs): Use it.
2262 2017-01-02 Alan Modra <amodra@gmail.com>
2264 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
2265 .PARISC.unwind section.
2267 2017-01-02 Alan Modra <amodra@gmail.com>
2270 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
2271 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
2272 indirect to GOT pointer relative code edit.
2274 2017-01-02 Alan Modra <amodra@gmail.com>
2276 Update year range in copyright notice of all files.
2278 For older changes see ChangeLog-2016
2280 Copyright (C) 2017 Free Software Foundation, Inc.
2282 Copying and distribution of this file, with or without modification,
2283 are permitted in any medium without royalty provided the copyright
2284 notice and this notice are preserved.
2290 version-control: never