1 2017-06-22 H.J. Lu <hongjiu.lu@intel.com>
3 * elf32-i386.c (elf_i386_lazy_ibt_plt0_entry): New.
4 (elf_i386_lazy_ibt_plt_entry): Likewise.
5 (elf_i386_pic_lazy_ibt_plt0_entry): Likewise.
6 (elf_i386_non_lazy_ibt_plt_entry): Likewise.
7 (elf_i386_pic_non_lazy_ibt_plt_entry): Likewise.
8 (elf_i386_eh_frame_lazy_ibt_plt): Likewise.
9 (elf_i386_lazy_plt_layout): Likewise.
10 (elf_i386_non_lazy_plt_layout): Likewise.
11 (elf_i386_link_hash_entry): Add plt_second.
12 (elf_i386_link_hash_table): Add plt_second and
14 (elf_i386_allocate_dynrelocs): Use the second PLT if needed.
15 (elf_i386_size_dynamic_sections): Use .plt.got unwind info for
16 the second PLT. Check the second PLT.
17 (elf_i386_relocate_section): Use the second PLT to resolve
18 PLT reference if needed.
19 (elf_i386_finish_dynamic_symbol): Fill and use the second PLT if
21 (elf_i386_finish_dynamic_sections): Set sh_entsize on the
22 second PLT. Generate unwind info for the second PLT.
23 (elf_i386_plt_type): Add plt_second.
24 (elf_i386_get_synthetic_symtab): Support the second PLT.
25 (elf_i386_parse_gnu_properties): Support
26 GNU_PROPERTY_X86_FEATURE_1_AND.
27 (elf_i386_merge_gnu_properties): Support
28 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
29 on GNU_PROPERTY_X86_FEATURE_1_IBT
30 (elf_i386_link_setup_gnu_properties): If info->ibt is set,
31 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
32 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
33 is set on all relocatable inputs.
34 * elf64-x86-64.c (elf_x86_64_lazy_ibt_plt_entry): New.
35 (elf_x32_lazy_ibt_plt_entry): Likewise.
36 (elf_x86_64_non_lazy_ibt_plt_entry): Likewise.
37 (elf_x32_non_lazy_ibt_plt_entry): Likewise.
38 (elf_x86_64_eh_frame_lazy_ibt_plt): Likewise.
39 (elf_x32_eh_frame_lazy_ibt_plt): Likewise.
40 (elf_x86_64_lazy_ibt_plt): Likewise.
41 (elf_x32_lazy_ibt_plt): Likewise.
42 (elf_x86_64_non_lazy_ibt_plt): Likewise.
43 (elf_x32_non_lazy_ibt_plt): Likewise.
44 (elf_x86_64_get_synthetic_symtab): Support the second PLT.
45 (elf_x86_64_parse_gnu_properties): Support
46 GNU_PROPERTY_X86_FEATURE_1_AND.
47 (elf_x86_64_merge_gnu_properties): Support
48 GNU_PROPERTY_X86_FEATURE_1_AND. If info->ibt is set, turn
49 on GNU_PROPERTY_X86_FEATURE_1_IBT
50 (elf_x86_64_link_setup_gnu_properties): If info->ibt is set,
51 turn on GNU_PROPERTY_X86_FEATURE_1_IBT. Use IBT-enabled PLT
52 for info->ibtplt, info->ibt or GNU_PROPERTY_X86_FEATURE_1_IBT
53 is set on all relocatable inputs.
55 2017-06-22 Nick Clifton <nickc@redhat.com>
58 * som.c (setup_sections): NUL terminate the space_strings buffer.
59 Check that the space.name field does not index beyond the end of
60 the space_strings buffer.
62 2017-06-21 Nick Clifton <nickc@redhat.com>
65 * coff-sh.c (sh_reloc): Check for an out of range reloc.
67 2017-06-21 Nick Clifton <nickc@redhat.com>
70 * vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
71 type of the size parameter.
72 (_bfd_vms_save_counted_string): Add second parameter - the maximum
73 length of the counted string.
74 * vms.h (_bfd_vms_save_sized_string): Update prototype.
75 (_bfd_vms_save_counted_string): Likewise.
76 * vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
77 _bfd_vms_save_counted_string.
78 (_bfd_vms_slurp_ehdr): Likewise.
79 (_bfd_vms_slurp_egsd): Likewise.
80 (Parse_module): Likewise.
82 2017-06-21 Alan Modra <amodra@gmail.com>
84 * elf64-ppc.c (ppc64_elf_size_stubs): Test for localentry:0 plt
85 calls before tocsave calls.
86 (ppc64_elf_relocate_section): Allow localentry:0 plt calls without
89 2017-06-21 Nick Clifton <nickc@redhat.com>
92 * reloc.c (bfd_generic_get_relocated_section_contents): Fail if
93 bfd_get_full_section_contents returns no contents.
95 2017-06-21 Nick Clifton <nickc@redhat.com>
98 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an undersized
101 2017-06-21 Nick Clifton <nickc@redhat.com>
104 * vms-alpha.c (_bfd_vms_slurp_egsd): Check for an empty section
106 (image_set_ptr): Likewise.
107 (alpha_vms_fix_sec_rel): Likewise.
108 (alpha_vms_slurp_relocs): Likewise.
110 2017-06-21 Nick Clifton <nickc@redhat.com>
113 * ieee.c (ieee_slurp_sections): Check for a NULL return from
115 (ieee_archive_p): Likewise.
116 (ieee_object_p): Likewise.
118 2017-06-21 Nick Clifton <nickc@redhat.com>
121 * elf.c (setup_group): Zero the group section pointer list after
122 allocation so that loops can be caught. Check for NULL pointers
123 when processing a group list.
125 2017-06-19 H.J. Lu <hongjiu.lu@intel.com>
128 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
129 the DYNAMIC bit instead of bfd_count_sections.
131 2017-06-19 Nick Clifton <nickc@redhat.com>
134 * vms-alpha.c (evax_bfd_print_emh): Check for insufficient record
136 (evax_bfd_print_eeom): Likewise.
137 (evax_bfd_print_egsd): Check for an overlarge record length.
138 (evax_bfd_print_etir): Likewise.
140 2017-06-19 Nick Clifton <nickc@redhat.com>
143 * libieee.h (struct common_header_type): Add end_p field.
144 * ieee.c (this_byte_and_next): Do not advance input_p beyond
146 (read_id): Check for a length that exceeds the remaining bytes in
148 (ieee_seek): Initialise end_p.
149 (ieee_archive_p): Likewise.
150 (ieee_object_p): Likewise.
152 2017-06-19 Nick Clifton <nickc@redhat.com>
155 * vms-alpha.c (_bfd_vms_slurp_eihs): Check for invalid offset
156 before reading the EIHS structure entries.
158 2017-06-19 Nick Clifton <nickc@redhat.com>
161 * vms-alpha.c (_bfd_vms_slurp_egsd): Use unsigned int for
162 gsd_size. Check that there are enough bytes remaining to read the
163 type and size of the next egsd. Check that the size of the egsd
164 does not exceed the size of the record.
166 2017-06-19 Alan Modra <amodra@gmail.com>
168 * config.bfd: Correct targ_underscore for cris.
170 2017-06-18 Alan Modra <amodra@gmail.com>
172 * config.bfd: Correct targ_underscore for epiphany, ip2k,
173 m32c, mn10200, pru, rl78, rx, crisv32 and v850.
175 2017-06-16 Nick Clifton <nickc@redhat.com>
177 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Do not fail if the
178 bucketlist is empty because there are no symbols to add to the
181 2017-06-16 Alan Modra <amodra@gmail.com>
187 * targets.c (struct bfd_target): Add _bfd_define_start_stop.
188 (BFD_JUMP_TABLE_LINK): Likewise.
189 * elf-bfd.h (bfd_elf_define_start_stop): Declare.
190 * elflink.c (_bfd_elf_gc_mark_rsec): Update comment.
191 (bfd_elf_define_start_stop): New function.
192 * linker.c (bfd_generic_define_start_stop): New function.
193 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Init
195 * aout-adobe.c (aout_32_bfd_define_start_stop): Define.
196 * aout-target.h (MY_bfd_define_start_stop): Define.
197 * aout-tic30.c (MY_bfd_define_start_stop): Define.
198 * binary.c (binary_bfd_define_start_stop): Define.
199 * bout.c (b_out_bfd_define_start_stop): Define.
200 * coff-alpha.c (_bfd_ecoff_bfd_define_start_stop): Define.
201 * coff-mips.c (_bfd_ecoff_bfd_define_start_stop): Define.
202 * coff-rs6000.c (_bfd_xcoff_bfd_define_start_stop): Define.
203 * coffcode.h (coff_bfd_define_start_stop): Define.
204 * elfxx-target.h (bfd_elfNN_bfd_define_start_stop): Define.
205 * i386msdos.c (msdos_bfd_define_start_stop): Define.
206 * i386os9k.c (os9k_bfd_define_start_stop): Define.
207 * ieee.c (ieee_bfd_define_start_stop): Define.
208 * ihex.c (ihex_bfd_define_start_stop): Define.
209 * libbfd-in.h (_bfd_nolink_bfd_define_start_stop): Define.
210 * mach-o-target.c (bfd_mach_o_bfd_define_start_stop): Define.
211 * mmo.c (mmo_bfd_define_start_stop): Define.
212 * nlm-target.h (nlm_bfd_define_start_stop): Define.
213 * oasys.c (oasys_bfd_define_start_stop): Define.
214 * pef.c (bfd_pef_bfd_define_start_stop): Define.
215 * plugin.c (bfd_plugin_bfd_define_start_stop): Define.
216 * ppcboot.c (ppcboot_bfd_define_start_stop): Define.
217 * som.c (som_bfd_define_start_stop): Define.
218 * srec.c (srec_bfd_define_start_stop): Define.
219 * tekhex.c (tekhex_bfd_define_start_stop): Define.
220 * versados.c (versados_bfd_define_start_stop): Define.
221 * vms-alpha.c (vms_bfd_define_start_stop): Define.
222 (alpha_vms_bfd_define_start_stop): Define.
223 * xsym.c (bfd_sym_bfd_define_start_stop): Define.
224 * bfd-in2.h: Regenerate.
225 * libbfd.h: Regenerate.
227 2017-06-16 Jiong Wang <jiong.wang@arm.com>
229 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
230 SYMBOL_REFERENCES_LOCAL.
232 2017-06-15 Jiong Wang <jiong.wang@arm.com>
235 * elfnn-aarch64.c (ELIMINATE_COPY_RELOCS): Set to 1.
236 (elfNN_aarch64_final_link_relocate): Also propagate relocations to
237 runtime for if there needs copy relocation elimination.
238 (need_copy_relocation_p): New function. Return true for symbol with
239 pc-relative references and if it's against read-only sections.
240 (elfNN_aarch64_adjust_dynamic_symbol): Use need_copy_relocation_p.
241 (elfNN_aarch64_check_relocs): Allocate dynrelocs for relocation types
242 that are related with accessing external objects.
243 (elfNN_aarch64_gc_sweep_hook): Sync the relocation types with the change
244 in elfNN_aarch64_check_relocs.
246 2017-06-15 Nick Clifton <nickc@redhat.com>
249 * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
252 (ieee_archive_p): Likewise.
254 2017-06-15 Nick Clifton <nickc@redhat.com>
257 * vms-alpha.c (_bfd_vms_slurp_etir): Extend check of cmd_length.
259 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
261 * elf32-xtensa.c (elf_xtensa_be_plt_entry,
262 elf_xtensa_le_plt_entry): Add dimension for the ABI to arrays,
263 keep both windowed and call0 ABI PLT definitions.
264 (elf_xtensa_create_plt_entry): Use selected ABI to choose upper
265 elf_xtensa_*_plt_entry endex.
266 (ELF_MAXPAGESIZE): Fix at minimal supported MMU page size.
268 2017-06-14 Nick Clifton <nickc@redhat.com>
271 * elf32-sh.c (sh_elf_set_mach_from_flags): Fix check for invalid
274 2017-06-14 Nick Clifton <nickc@redhat.com>
277 * vms-alpha.c (_bfd_vms_get_value): Add an extra parameter - the
278 maximum value for the ascic pointer. Check that name processing
279 does not read beyond this value.
280 (_bfd_vms_slurp_etir): Add checks for attempts to read beyond the
283 2017-06-14 Nick Clifton <nickc@redhat.com>
286 * versados.c (versados_mkobject): Zero the allocated tdata structure.
287 (process_otr): Check for an invalid offset in the otr structure.
289 2017-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
291 * config.bfd (epiphany-*-elf): Accept epiphany-*-*.
293 2017-06-13 H.J. Lu <hongjiu.lu@intel.com>
299 * elf-bfd.h (elf_link_hash_entry): Add start_stop. Change the
300 vtable field to a union.
301 (_bfd_elf_is_start_stop): Removed.
302 * elf32-i386.c (elf_i386_convert_load_reloc): Also check for
303 __start_SECNAME and __stop_SECNAME symbols.
304 * elf64-x86-64.c (elf_x86_64_convert_load_reloc): Likewise.
305 * elflink.c (_bfd_elf_is_start_stop): Removed.
306 (_bfd_elf_gc_mark_rsec): Check start_stop instead of calling
307 _bfd_elf_is_start_stop.
308 (elf_gc_propagate_vtable_entries_used): Skip __start_SECNAME and
309 __stop_SECNAME symbols. Updated.
310 (elf_gc_smash_unused_vtentry_relocs): Likewise.
311 (bfd_elf_gc_record_vtinherit): Likewise.
312 (bfd_elf_gc_record_vtentry): Likewise.
314 2017-06-13 Nick Clifton <nickc@redhat.com>
317 * elflink.c (elf_link_adjust_relocs): Generate an error when
318 encountering a reloc against a symbol removed by garbage
321 2017-06-12 H.J. Lu <hongjiu.lu@intel.com>
323 * elf-bfd.h (elf_backend_data): Add struct bfd_link_info *
324 to merge_gnu_properties.
325 * elf-properties.c (elf_merge_gnu_properties): Add struct
326 bfd_link_info * and pass it to merge_gnu_properties.
327 (elf_merge_gnu_property_list): Add struct bfd_link_info *
328 and pass it to elf_merge_gnu_properties.
329 (_bfd_elf_link_setup_gnu_properties): Pass info to
330 elf_merge_gnu_property_list.
331 * elf32-i386.c (elf_i386_merge_gnu_properties): Add struct
333 * elf64-x86-64.c (elf_x86_64_merge_gnu_properties): Likewise.
335 2017-06-11 Joe Zbiciak <joe.zbiciak@leftturnonly.info>
338 * binary.c (binary_set_section_contents): Scale lma by octets
339 per byte to set filepos.
341 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
343 * elf32-arc.c (elf_arc_check_relocs): Fixed conditions to generate
346 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
348 * elf32-arc.c (elf_arc_size_dynamic_sections): Changed condition to
351 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
353 * arc-got.h (relocate_fix_got_relocs_for_got_info): Added TCB_SIZE to
354 patched section contents for TLS IE reloc.
355 * elf32-arc.c: Remove TCB_SIZE preprocessor macro.
357 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
359 * elf32-arc.c (elf_arc_relocate_section): Added "call" to
360 RELOC_FOR_GLOBAL_SYMBOL macro.
362 2018-06-08 Cupertino Miranda <cmiranda@synopsys.com>
364 * elf32-arc.c (elf_arc_relocate_section): Small refactor and condition
367 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
369 * config/tc-arc.c (md_undefined_symbol): Changed.
370 * config/tc-arc.h (DYNAMIC_STRUCT_NAME): Removed.
372 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
374 * elf32-arc.c (elf_arc_relocate_section): Fixed reassign of indirect
377 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
379 * elf32-arc.c (elf_arc_check_relocs): Added condition to disable
380 warning and "Bad value" for local symbols ARC_32 or ARC_32_ME relocs.
382 2017-06-08 Cupertino Miranda <cmiranda@synopsys.com>
384 * elf32-arc.c (ADD_RELA): Changed to only work when dynamic
387 2017-06-08 Richard Earnshaw <rearnsha@arm.com>
389 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove assertion
390 that the input bfd has Tag_FP_ARCH non-zero if Tag_ABI_HardFP_use
391 is non-zero. Add clarifying comments.
393 2017-06-08 H.J. Lu <hongjiu.lu@intel.com>
395 * elf32-i386.c (elf_i386_check_relocs): Set local IFUNC symbol
396 name. Use local IFUNC symbol name string to report unsupported
397 non-PIC call to IFUNC function.
398 (elf_i386_relocate_section): Dump local IFUNC name with minfo
399 when generating R_386_IRELATIVE relocation.
400 (elf_i386_finish_dynamic_symbol): Likewise.
401 * elf_x86_64_check_relocs (elf_x86_64_check_relocs): Set local
403 (elf_x86_64_relocate_section): Dump local IFUNC name with minfo
404 when generating R_X86_64_IRELATIVE relocation.
405 (elf_x86_64_finish_dynamic_symbol): Likewise.
407 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
409 * elf.c (setup_group): Make sure BFD sections are created for all
410 group sections in the input file when processing SHF_GROUP
412 (bfd_section_from_shdr): Avoid duplicating logic already
413 implemented in `setup_group'.
415 2017-06-06 Daniel Bonniot de Ruisselet <bonniot@gmail.com>
418 * peXXigen.c (pe_print_idata): Use the address of the first thunk
419 if the hint address is zero.
421 2017-06-06 James Clarke <jrtc27@jrtc27.com>
424 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Check
425 ELF_COMMON_DEF_P for common symbols.
427 2017-06-06 Andrew Burgess <andrew.burgess@embecosm.com>
429 * elf.c (_bfd_elf_make_section_from_shdr): Don't initially mark
430 SEC_GROUP sections as SEC_EXCLUDE.
431 (bfd_elf_set_group_contents): Replace use of abort with an assert.
432 (assign_section_numbers): Use resolve_section_groups flag instead
433 of relocatable link type.
434 (_bfd_elf_init_private_section_data): Use resolve_section_groups
435 flag instead of checking the final_link flag for part of the
436 checks in here. Fix white space as a result.
437 * elflink.c (elf_link_input_bfd): Use resolve_section_groups flag
438 instead of relocatable link type.
439 (bfd_elf_final_link): Likewise.
441 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
443 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Remove unused
445 * elf32-score.c (score_elf_final_link_relocate): Likewise.
446 (s3_bfd_score_elf_check_relocs): Likewise.
447 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
448 (score_elf_final_link_relocate): Likewise.
449 (s7_bfd_score_elf_check_relocs): Likewise.
451 2017-06-06 Jose E. Marchesi <jose.marchesi@oracle.com>
453 * elflink.c (init_reloc_cookie_rels): Remove unused variable
456 2017-06-06 Maciej W. Rozycki <macro@imgtec.com>
458 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Subtract `count'
459 from `reloc_count' rather than decrementing it.
460 * elf.c (bfd_section_from_shdr): Multiply the adjustment to
461 `reloc_count' by `int_rels_per_ext_rel'.
462 * elf32-score.c (score_elf_final_link_relocate): Do not multiply
463 `reloc_count' by `int_rels_per_ext_rel' for last relocation
465 (s3_bfd_score_elf_check_relocs): Likewise.
466 * elf32-score7.c (score_elf_final_link_relocate): Likewise.
467 (s7_bfd_score_elf_relocate_section): Likewise.
468 (s7_bfd_score_elf_check_relocs): Likewise.
469 * elf64-mips.c (mips_elf64_get_reloc_upper_bound): Remove
470 prototype and function.
471 (mips_elf64_slurp_one_reloc_table): Do not update `reloc_count'.
472 (mips_elf64_slurp_reloc_table): Assert that `reloc_count' is
473 triple rather than once the sum of REL and RELA relocation entry
475 (bfd_elf64_get_reloc_upper_bound): Remove macro.
476 * elflink.c (_bfd_elf_link_read_relocs): Do not multiply
477 `reloc_count' by `int_rels_per_ext_rel' for internal relocation
478 storage allocation size determination.
479 (elf_link_input_bfd): Multiply `.ctors' and `.dtors' section's
480 size by `int_rels_per_ext_rel'. Do not multiply `reloc_count'
481 by `int_rels_per_ext_rel' for last relocation entry
483 (bfd_elf_final_link): Do not multiply `reloc_count' by
484 `int_rels_per_ext_rel' for internal relocation storage
485 allocation size determination.
486 (init_reloc_cookie_rels): Do not multiply `reloc_count' by
487 `int_rels_per_ext_rel' for last relocation entry determination.
488 (elf_gc_smash_unused_vtentry_relocs): Likewise.
489 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
490 (_bfd_mips_elf_relocate_section): Likewise.
492 2017-06-05 Alan Modra <amodra@gmail.com>
495 * linker.c (_bfd_generic_link_output_symbols): Handle BSF_GNU_UNIQUE.
497 2017-06-01 John Baldwin <jhb@FreeBSD.org>
499 * elf.c (elfcore_grok_freebsd_psinfo): Use ELF header class to
500 determine structure sizes.
501 (elfcore_grok_freebsd_prstatus): Likewise.
503 2017-06-01 Alan Modra <amodra@gmail.com>
505 * elf64-ppc.c (struct ppc_link_hash_table): Add has_plt_localentry0.
506 (ppc64_elf_merge_symbol_attribute): Merge localentry bits from
508 (is_elfv2_localentry0): New function.
509 (ppc64_elf_tls_setup): Default params->plt_localentry0.
510 (plt_stub_size): Adjust size for tls_get_addr_opt stub.
511 (build_tls_get_addr_stub): Use a simpler stub when r2 is not saved.
512 (ppc64_elf_size_stubs): Leave stub_type as ppc_stub_plt_call for
513 optimized localentry:0 stubs.
514 (ppc64_elf_build_stubs): Save r2 in ELFv2 __glink_PLTresolve.
515 (ppc64_elf_relocate_section): Leave nop unchanged for optimized
517 (ppc64_elf_finish_dynamic_sections): Set PPC64_OPT_LOCALENTRY in
519 * elf64-ppc.h (struct ppc64_elf_params): Add plt_localentry0.
521 2017-05-30 Casey Smith <clegg89@gmail.com>
524 * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
525 value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
527 2017-05-30 Anton Kolesov Anton.Kolesov@synopsys.com
529 * cpu-arc.c (arc_compatible): New function.
531 2017-05-30 Anton Kolesov <anton.kolesov@synopsys.com>
533 * cpu-arc.c (arch_info_struct): Remove duplicate ARC600 entry.
535 2017-05-30 H.J. Lu <hongjiu.lu@intel.com>
538 * bfdio.c (bfd_get_file_size): New function.
539 * bfd-in2.h: Regenerated.
541 2017-05-23 Dilian Palauzov <git-dpa@aegee.org>
543 * elf32-arc.c (arc_elf_merge_attributes): Add fall through
546 2017-05-22 H.J. Lu <hongjiu.lu@intel.com>
548 * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Use
549 dynobj instead of htab->elf.dynobj.
551 2017-05-19 Maciej W. Rozycki <macro@imgtec.com>
553 * elf64-mips.c (mips_elf64_canonicalize_reloc): Remove prototype
555 (mips_elf64_canonicalize_dynamic_reloc): Likewise.
556 (mips_elf64_slurp_one_reloc_table): Set `reloc_count' to the
557 actual number of internal relocations retrieved. Adjust
558 function description.
559 (bfd_elf64_canonicalize_reloc): Remove macro.
560 (bfd_elf64_canonicalize_dynamic_reloc): Likewise.
562 2017-05-19 Jose E. Marchesi <jose.marchesi@oracle.com>
564 * archures.c (bfd_mach_sparc_v9m8): Define.
565 (bfd_mach_sparc_v8plusm8): Likewise.
566 (bfd_mach_sparc_v9_p): Adjust to M8.
567 (bfd_mach_sparc_64bit_p): Likewise.
568 * aoutx.h (machine_type): Handle bfd_mach_sparc_v9m8 and
569 bfd_mach_sparc_v8plusm8.
570 * bfd-in2.h: Regenerated.
571 * cpu-sparc.c (arch_info_struct): Entries for sparc:v9m8 and
573 * elfxx-sparc.c (_bfd_sparc_elf_object_p): Handle
574 bfd_mach_sparc_v8plusm8 and bfd_mach_sparc_v9m8 using the new hw
575 capabilities ONADDSUB, ONMUL, ONDIV, DICTUNP, FPCPSHL, RLE and
577 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
578 bfd_mach_sparc_v8plusm8.
580 2017-05-19 Alan Modra <amodra@gmail.com>
582 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't keep
583 debug and special sections when no non-note alloc sections in an
586 2017-05-18 Alan Modra <amodra@gmail.com>
588 * arc-got.h: Don't compare boolean values against TRUE or FALSE.
589 * elf-m10300.c: Likewise.
591 * elf32-arc.c: Likewise.
592 * elf32-bfin.c: Likewise.
593 * elf32-m68k.c: Likewise.
594 * elf32-nds32.c: Likewise.
595 * elf32-tilepro.c: Likewise.
596 * elflink.c: Likewise.
597 * elfnn-aarch64.c: Likewise.
598 * elfnn-riscv.c: Likewise.
599 * elfxx-tilegx.c: Likewise.
600 * mach-o.c: Likewise.
601 * peXXigen.c: Likewise.
602 * vms-alpha.c: Likewise.
603 * vms-lib.c: Likewise.
605 2017-05-17 H.J. Lu <hongjiu.lu@intel.com>
608 * elflink.c (elf_gc_mark_debug_section): New function.
609 (_bfd_elf_gc_mark_extra_sections): Mark any debug sections
610 referenced by kept debug sections.
612 2017-05-16 Alan Modra <amodra@gmail.com>
614 * elf-m10300.c: Rename occurrences of non_ir_ref.
615 * elf32-arm.c: Likewise.
616 * elf32-bfin.c: Likewise.
617 * elf32-cr16.c: Likewise.
618 * elf32-cris.c: Likewise.
619 * elf32-d10v.c: Likewise.
620 * elf32-dlx.c: Likewise.
621 * elf32-fr30.c: Likewise.
622 * elf32-frv.c: Likewise.
623 * elf32-hppa.c: Likewise.
624 * elf32-i370.c: Likewise.
625 * elf32-i386.c: Likewise.
626 * elf32-iq2000.c: Likewise.
627 * elf32-lm32.c: Likewise.
628 * elf32-m32c.c: Likewise.
629 * elf32-m32r.c: Likewise.
630 * elf32-m68hc1x.c: Likewise.
631 * elf32-m68k.c: Likewise.
632 * elf32-mcore.c: Likewise.
633 * elf32-metag.c: Likewise.
634 * elf32-microblaze.c: Likewise.
635 * elf32-moxie.c: Likewise.
636 * elf32-msp430.c: Likewise.
637 * elf32-mt.c: Likewise.
638 * elf32-nios2.c: Likewise.
639 * elf32-or1k.c: Likewise.
640 * elf32-ppc.c: Likewise.
641 * elf32-rl78.c: Likewise.
642 * elf32-s390.c: Likewise.
643 * elf32-score.c: Likewise.
644 * elf32-score7.c: Likewise.
645 * elf32-sh.c: Likewise.
646 * elf32-tic6x.c: Likewise.
647 * elf32-tilepro.c: Likewise.
648 * elf32-v850.c: Likewise.
649 * elf32-vax.c: Likewise.
650 * elf32-xstormy16.c: Likewise.
651 * elf32-xtensa.c: Likewise.
652 * elf64-alpha.c: Likewise.
653 * elf64-hppa.c: Likewise.
654 * elf64-ia64-vms.c: Likewise.
655 * elf64-mmix.c: Likewise.
656 * elf64-ppc.c: Likewise.
657 * elf64-s390.c: Likewise.
658 * elf64-sh64.c: Likewise.
659 * elf64-x86-64.c: Likewise.
660 * elflink.c: Likewise.
661 * elfnn-aarch64.c: Likewise.
662 * elfnn-ia64.c: Likewise.
663 * elfnn-riscv.c: Likewise.
664 * elfxx-mips.c: Likewise.
665 * elfxx-sparc.c: Likewise.
666 * elfxx-tilegx.c: Likewise.
667 * linker.c: Likewise.
669 2017-05-16 Alan Modra <amodra@gmail.com>
671 * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic.
672 * elflink.c (elf_link_add_object_symbols): Update to use
674 (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to
676 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
678 2017-05-15 Maciej W. Rozycki <macro@imgtec.com>
680 * elfxx-mips.c (print_mips_ases): Handle MIPS16e2 ASE.
682 2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
684 * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
685 GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
687 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
689 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
691 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
693 (elf_x86_64_link_hash_table): Rename plt_bnd/plt_bnd_eh_frame
694 to plt_second/plt_second_eh_frame.
695 (elf_x86_64_link_hash_newfunc): Updated.
696 (elf_x86_64_allocate_dynrelocs): Likewise.
697 (elf_x86_64_size_dynamic_sections): Likewise.
698 (elf_x86_64_relocate_section): Likewise.
699 (elf_x86_64_finish_dynamic_symbol): Likewise.
700 (elf_x86_64_finish_dynamic_sections): Likewise.
701 (elf_x86_64_plt_type): Rename plt_bnd to plt_second.
702 (elf_x86_64_get_synthetic_symtab): Updated. Also scan the
704 (elf_backend_setup_gnu_properties): Updated. Create the
705 .plt.sec section instead of the .plt.sec section.
707 2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
709 * elf32-i386.c (elf_i386_allocate_dynrelocs): Partially revert
710 commit 25070364b0ce33eed46aa5d78ebebbec6accec7e.
711 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewse.
713 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
715 * elf64-sparc.c (elf64_sparc_set_reloc): New function.
716 (bfd_elf64_set_reloc): Define.
717 (elf64_sparc_write_relocs): Use `canon_reloc_count'.
719 2017-05-10 Jose E. Marchesi <jose.marchesi@oracle.com>
721 * targets.c (BFD_JUMP_TABLE_RELOCS): Add NAME##_set_reloc.
722 (struct bfd_target): New field _bfd_set_reloc.
723 * bfd.c (bfd_set_reloc): Call backend _set_bfd.
724 * reloc.c (_bfd_generic_set_reloc): New function.
725 * coffcode.h (coff_set_reloc): Define to _bfd_generic_set_reloc.
726 * nlm-target.h (nlm_set_reloc): Likewise.
727 * coff-rs6000.c (_bfd_xcoff_set_reloc): Likewise.
728 * aout-tic30.c (MY_set_reloc): Likewise.
729 * aout-target.h (MY_set_reloc): Likewise.
730 * elfxx-target.h (bfd_elfNN_set_reloc): Likewise.
731 * coff-alpha.c (_bfd_ecoff_set_reloc): Likewise.
732 * mach-o-target.c (bfd_mach_o_set_reloc): Likewise.
733 * vms-alpha.c (alpha_vms_set_reloc): Likewise.
734 * aout-adobe.c (aout_32_set_reloc): Likewise.
735 * bout.c (b_out_set_reloc): Likewise.
736 * coff-mips.c (_bfd_ecoff_set_reloc): Likewise.
737 * i386os9k.c (aout_32_set_reloc): Likewise.
738 * ieee.c (ieee_set_reloc): Likewise.
739 * oasys.c (oasys_set_reloc): Likewise.
740 * som.c (som_set_reloc): Likewise.
741 * versados.c (versados_set_reloc): Likewise.
742 * coff64-rs6000.c (rs6000_xcoff64_vec): Add
743 _bfd_generic_set_reloc.
744 (rs6000_xcoff64_aix_vec): LIkewise.
745 * libbfd.c (_bfd_norelocs_set_reloc): New function.
746 * libbfd-in.h: Prototype for _bfd_norelocs_set_reloc.
747 * i386msdos.c (msdos_set_reloc): Define to
748 _bfd_norelocs_set_reloc.
749 * elfcode.h (elf_set_reloc): Define.
750 * bfd-in2.h: Regenerated.
752 2017-05-10 H.J. Lu <hongjiu.lu@intel.com>
755 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Use .plt.bnd
756 for IFUNC function address.
758 2017-05-10 Claudiu Zissulescu <claziss@synopsys.com>
760 * elf32-arc.c (FEATURE_LIST_NAME): Define.
761 (CONFLICT_LIST): Likewise.
762 (opcode/arc-attrs.h): Include.
763 (arc_elf_print_private_bfd_data): Print OSABI v4 flag.
764 (arc_extract_features): New file.
765 (arc_stralloc): Likewise.
766 (arc_elf_merge_attributes): Likewise.
767 (arc_elf_merge_private_bfd_data): Use object attributes.
768 (bfd_arc_get_mach_from_attributes): New function.
769 (arc_elf_object_p): Use object attributes.
770 (arc_elf_final_write_processing): Likewise.
771 (elf32_arc_obj_attrs_arg_type): New function.
772 (elf32_arc_obj_attrs_handle_unknown): Likewise.
773 (elf32_arc_section_from_shdr): Likewise.
774 (elf_backend_obj_attrs_vendor): Define.
775 (elf_backend_obj_attrs_section): Likewise.
776 (elf_backend_obj_attrs_arg_type): Likewise.
777 (elf_backend_obj_attrs_section_type): Likewise.
778 (elf_backend_obj_attrs_handle_unknown): Likewise.
779 (elf_backend_section_from_shdr): Likewise.
781 2017-05-09 Andrew Goedhart <Andrewgoedhart@simplepowersolutions.co.za>
784 * elf32-arm.c (elf32_arm_final_link_relocate): Set the bottom bit
785 of the value when resolving a R_ARM_THM_ALU_PREL_11_0 relocation
786 and the destination is a Thumb symbol.
788 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
790 * elf32-i386.c (elf_i386_get_synthetic_symtab): Add missing
791 initializer to silence GCC 4.2.
792 * lf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.
794 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
796 * elf64-x86-64.c (PLT_ENTRY_SIZE): Renamed to ...
797 (LAZY_PLT_ENTRY_SIZE): This.
798 (NON_LAZY_PLT_ENTRY_SIZE): New.
799 (elf_x86_64_plt0_entry): Renamed to ...
800 (elf_x86_64_lazy_plt0_entry): This.
801 (elf_x86_64_plt_entry): Renamed to ...
802 (elf_x86_64_lazy_plt_entry): This.
803 (elf_x86_64_bnd_plt0_entry): Renamed to ...
804 (elf_x86_64_lazy_bnd_plt0_entry): This.
805 (elf_x86_64_legacy_plt_entry): Removed.
806 (elf_x86_64_bnd_plt_entry): Renamed to ...
807 (elf_x86_64_lazy_bnd_plt_entry): This.
808 (elf_x86_64_legacy_plt2_entry): Renamed to ...
809 (elf_x86_64_non_lazy_plt_entry): This.
810 (elf_x86_64_bnd_plt2_entry): Renamed to ...
811 (elf_x86_64_non_lazy_bnd_plt_entry): This.
812 (elf_x86_64_eh_frame_plt): Renamed to ...
813 (elf_x86_64_eh_frame_lazy_plt): This.
814 (elf_x86_64_eh_frame_bnd_plt): Renamed to ...
815 (elf_x86_64_eh_frame_lazy_bnd_plt): This.
816 (elf_x86_64_eh_frame_plt_got): Renamed to ...
817 (elf_x86_64_eh_frame_non_lazy_plt): This.
818 (elf_x86_64_lazy_plt_layout): New.
819 (elf_x86_64_non_lazy_plt_layout): Likewise.
820 (elf_x86_64_plt_layout): Likewise.
821 (elf_x86_64_backend_data): Remove PLT layout information. Add
822 os for target system.
823 (GET_PLT_ENTRY_SIZE): Removed.
824 (elf_x86_64_lazy_plt): New.
825 (elf_x86_64_non_lazy_plt): Likewise.
826 (elf_x86_64_lazy_bnd_plt): Likewise.
827 (elf_x86_64_non_lazy_bnd_plt): Likewise.
828 (elf_x86-64_arch_bed): Updated.
829 (elf_x86_64_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
830 (elf_x86_64_create_dynamic_sections): Removed.
831 (elf_x86_64_check_relocs): Don't check elf.dynobj. Don't call
832 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
833 (elf_x86-64_adjust_dynamic_symbol): Updated.
834 (elf_x86_64_allocate_dynrelocs): Updated. Pass 0 as PLT header
835 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
836 size for PLT0 if there is no PLT0. Get plt_entry_size from
837 non_lazy_plt for non-lazy PLT entries.
838 (elf_x86_64_size_dynamic_sections): Updated. Get plt_entry_size
839 from non_lazy_plt for non-lazy PLT entries.
840 (elf_x86-64_relocate_section): Updated. Properly get PLT index
842 (elf_x86_64_finish_dynamic_symbol): Updated. Fill the first slot
843 in the PLT entry with generic PLT layout. Fill the non-lazy PLT
844 entries with non-lazy PLT layout. Don't fill the second and third
845 slots in the PLT entry if there is no PLT0.
846 (elf_x86_64_finish_dynamic_sections): Updated. Don't fill PLT0
847 if there is no PLT0. Set sh_entsize on the .plt.got section.
848 (compare_relocs): New.
849 (elf_x86_64_plt_type): Likewise.
850 (elf_x86_64_plt): Likewise.
851 (elf_x86_64_nacl_plt): New. Forward declaration.
852 (elf_x86_64_get_plt_sym_val): Removed.
853 (elf_x86_64_get_synthetic_symtab): Rewrite to check PLT sections
854 against all dynamic relocations.
855 (elf_x86_64_link_setup_gnu_properties): New function.
856 (elf_backend_create_dynamic_sections): Updated.
857 (elf_backend_setup_gnu_properties): New.
858 (elf_x86_64_nacl_plt): New.
859 (elf_x86_64_nacl_arch_bed): Updated.
861 2017-05-08 H.J. Lu <hongjiu.lu@intel.com>
863 * elf32-i386.c (PLT_ENTRY_SIZE): Renamed to ...
864 (LAZY_PLT_ENTRY_SIZE): This.
865 (NON_LAZY_PLT_ENTRY_SIZE): New.
866 (elf_i386_plt0_entry): Renamed to ...
867 (elf_i386_lazy_plt0_entry): This.
868 (elf_i386_plt_entry): Renamed to ...
869 (elf_i386_lazy_plt_entry): This.
870 (elf_i386_pic_plt0_entry): Renamed to ...
871 (elf_i386_pic_lazy_plt0_entry): This.
872 (elf_i386_pic_plt_entry): Renamed to ...
873 (elf_i386_pic_lazy_plt_entry): This.
874 (elf_i386_got_plt_entry): Renamed to ...
875 (elf_i386_non_lazy_plt_entry): This.
876 (elf_i386_pic_got_plt_entry): Renamed to ...
877 (elf_i386_pic_non_lazy_plt_entry): This.
878 (elf_i386_eh_frame_plt): Renamed to ...
879 (elf_i386_eh_frame_lazy_plt): This.
880 (elf_i386_eh_frame_plt_got): Renamed to ...
881 (elf_i386_eh_frame_non_lazy_plt): This.
882 (elf_i386_plt_layout): Renamed to ...
883 (elf_i386_lazy_plt_layout): This. Remove eh_frame_plt_got and
884 eh_frame_plt_got_size.
885 (elf_i386_non_lazy_plt_layout): New.
886 (elf_i386_plt_layout): Likewise.
887 (elf_i386_non_lazy_plt): Likewise.
888 (GET_PLT_ENTRY_SIZE): Removed.
889 (elf_i386_plt): Renamed to ...
890 (elf_i386_lazy_plt): This.
891 (elf_i386_backend_data): Remove plt. Rename is_vxworks to os.
892 (elf_i386_arch_bed): Updated.
893 (elf_i386_link_hash_table): Add plt, lazy_plt and non_lazy_plt.
894 (elf_i386_create_dynamic_sections): Removed.
895 (elf_i386_check_relocs): Don't check elf.dynobj. Don't call
896 _bfd_elf_create_ifunc_sections nor _bfd_elf_create_got_section.
897 (elf_i386_adjust_dynamic_symbol): Updated.
898 (elf_i386_allocate_dynrelocs): Updated. Pass 0 as PLT header
899 size to _bfd_elf_allocate_ifunc_dyn_relocs and don't allocate
900 size for PLT0 if there is no PLT0.
901 (elf_i386_size_dynamic_sections): Updated. Check whether GOT
902 output section is discarded only if GOT isn't empty.
903 (elf_i386_relocate_section): Updated. Properly get PLT index
905 (elf_i386_finish_dynamic_symbol): Updated. Don't fill the
906 second and third slots in the PLT entry if there is no PLT0.
907 (elf_i386_finish_dynamic_sections): Updated. Don't fill PLT0
908 if there is no PLT0. Set sh_entsize on the .plt.got section.
909 (elf_i386_nacl_plt): Forward declaration.
910 (elf_i386_get_plt_sym_val): Removed.
911 (elf_i386_get_synthetic_symtab): Rewrite to check PLT sections
912 against all dynamic relocations.
913 (elf_i386_link_setup_gnu_properties): New function.
914 (elf_backend_create_dynamic_sections): Updated.
915 (elf_backend_setup_gnu_properties): New.
916 (elf_i386_nacl_plt): Updated.
917 (elf_i386_nacl_arch_bed): Likewise.
918 (elf_i386_vxworks_arch_bed): Likewise.
920 2017-05-08 Thomas Preud'homme <thomas.preudhomme@arm.com>
922 * elflink.c (elf_output_implib): Remove executable flag from import
924 * elf32-arm.c (elf32_arm_filter_implib_symbols): Assert that the import
925 library is a relocatable object file.
927 2017-05-01 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
930 * elf32-avr.c (avr_should_move_sym): New function.
931 (avr_should_reduce_sym_size): Likewise.
932 (avr_should_increase_sym_size): Likewise.
933 (elf32_avr_relax_delete_bytes): Adjust symbol values
934 and sizes by calling new functions.
936 2017-05-01 Palmer Dabbelt <palmer@dabbelt.com>
938 * config.bfd (riscv32-*): Enable rv64.
940 2017-05-02 Alan Modra <amodra@gmail.com>
943 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Test h->non_elf
944 rather than h->root.type == bfd_link_hash_new.
945 (bfd_elf_record_link_assignment): Similarly, call
946 bfd_elf_link_mark_dynamic_symbol when h->non_elf.
948 2017-04-29 Alan Modra <amodra@gmail.com>
951 * reloc.c (reloc_offset_in_range): New function.
952 (bfd_perform_relocation, bfd_install_relocation): Use it.
953 (_bfd_final_link_relocate): Likewise.
955 2017-04-28 H.J. Lu <hongjiu.lu@intel.com>
957 * elf32-i386.c (elf_i386_allocate_dynrelocs): Check plt_got
958 before using .plt.got.
959 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
961 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
963 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Use "="
964 instead of "+=" to update 0.
966 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
968 * elf32-i386.c (elf_i386_create_dynamic_sections): Create the
969 .plt.got section here.
970 (elf_i386_check_relocs): Don't create the .plt.got section.
971 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Create
972 the .plt.got and .plt.bnd sections here.
973 (elf_x86_64_check_relocs): Don't create the .plt.got nor
976 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
978 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Remove
980 (elf_x86_64_link_hash_newfunc): Don't clear has_bnd_reloc.
981 (elf_x86_64_copy_indirect_symbol): Don't copy has_bnd_reloc.
982 (elf_x86_64_check_relocs): Don't set has_bnd_reloc.
983 (elf_x86_64_finish_dynamic_symbol): Check bndplt instead of
986 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
988 * elf-bfd.h (elf_backend_data): Change setup_gnu_properties
990 (_bfd_elf_link_setup_gnu_properties): Return bfd *.
991 * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Return
992 the first relocatable ELF input with GNU properties.
994 2017-04-27 H.J. Lu <hongjiu.lu@intel.com>
996 * elf32-i386.c (elf_i386_finish_dynamic_sections): Simplify
999 2017-04-27 Alan Modra <amodra@gmail.com>
1001 * elf-bfd.h (struct elf_backend_data): Make asection param of
1002 elf_backend_eh_frame_address_size const.
1003 (_bfd_elf_eh_frame_address_size): Likewise.
1004 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): Likewise.
1005 * elf32-msp430.c (elf32_msp430_eh_frame_address_size): Likewise.
1006 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): Likewise.
1007 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Likewise.
1008 * elf-eh-frame.c (_bfd_elf_eh_frame_address_size): Likewise.
1009 (next_cie_fde_offset): Constify params.
1010 (offset_adjust, adjust_eh_frame_local_symbols): Likewise.
1012 2017-04-27 Alan Modra <amodra@gmail.com>
1014 * elf-bfd.h (struct eh_cie_fde): Add aug_str_len and aug_data_len.
1015 (_bfd_elf_adjust_eh_frame_global_symbol): Declare.
1016 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Set aug_str_len and
1018 (offset_adjust): New function.
1019 (_bfd_elf_adjust_eh_frame_global_symbol): Likewise.
1020 (adjust_eh_frame_local_symbols): Likewise.
1021 (_bfd_elf_discard_section_eh_frame): Call adjust_eh_frame_local_symbols
1022 after changing anything. Return true if anything changed.
1023 * elflink.c (bfd_elf_discard_info): If .eh_frame changed, call
1024 _bfd_elf_adjust_eh_frame_global_symbol for globals.
1026 2017-04-27 Alan Modra <amodra@gmail.com>
1028 * elflink.c (_bfd_elf_link_hash_hide_symbol): Clear dynstr_index
1031 2017-04-27 Alan Modra <amodra@gmail.com>
1033 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
1034 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Use it.
1035 (ppc_elf_adjust_dynamic_symbol, allocate_dynrelocs): Likewise.
1036 (ppc_elf_relocate_section): Likewise. Delete silly optimisation
1037 for undef and undefweak dyn_relocs.
1038 * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Define.
1039 (ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup): Use it.
1040 (allocate_got, allocate_dynrelocs): Likewise.
1041 (ppc64_elf_relocate_section): Likewise.
1043 2017-04-26 H.J. Lu <hongjiu.lu@intel.com>
1045 * elf32-i386.c (elf_i386_size_dynamic_sections): Alwasys add
1046 DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rel.plt section.
1047 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Alwasys
1048 add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL for .rela.plt section.
1050 2017-04-26 Nick Clifton <nickc@redhat.com>
1053 * reloc.c (bfd_perform_relocation): Check for a negative address
1056 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
1059 * elf-bfd.h (elf_backend_data): Add `always_renumber_dynsyms'
1061 * elfxx-target.h [!elf_backend_always_renumber_dynsyms]
1062 (elf_backend_always_renumber_dynsyms): Define.
1063 (elfNN_bed): Initialize `always_renumber_dynsyms' member.
1064 * elfxx-mips.h (elf_backend_always_renumber_dynsyms): Define.
1065 * elflink.c (bfd_elf_size_dynamic_sections): Also call
1066 `_bfd_elf_link_renumber_dynsyms' if the backend has requested
1068 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
1070 2017-04-26 Maciej W. Rozycki <macro@imgtec.com>
1072 * elflink.c (bfd_elf_size_dynamic_sections): Only call
1073 `_bfd_elf_link_renumber_dynsyms' after section GC if dynamic
1074 sections have been created.
1076 2017-04-26 Nick Clifton <nickc@redhat.com>
1079 * compress.c (bfd_init_section_compress_status): Check the return
1080 value from bfd_malloc.
1082 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
1084 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add
1085 no_finish_dynamic_symbol.
1086 (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to
1088 (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined
1089 weak symbol, don't make it dynamic.
1090 (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC,
1091 set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE
1092 relocation for GOT reference.
1093 (elf_x86_64_finish_dynamic_symbol): Abort if
1094 no_finish_dynamic_symbol isn't 0.
1096 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
1099 * elf32-i386.c (elf_i386_allocate_dynrelocs): If a symbol isn't
1100 undefined weak symbol, don't make it dynamic.
1101 (elf_i386_relocate_section): If a symbol isn't dynamic in PIC,
1102 set no_finish_dynamic_symbol and generate R_386_RELATIVE
1103 relocation for R_386_GOT32.
1105 2017-04-24 H.J. Lu <hongjiu.lu@intel.com>
1108 * elf32-i386.c (ELF_MAXPAGESIZE): Set to 0x1000 for VxWorks.
1110 2017-04-23 Alan Modra <amodra@gmail.com>
1113 * section.c (GLOBAL_SYM_INIT): Make available in bfd.h.
1114 * elf.c (lcomm_sym): New.
1115 (_bfd_elf_large_com_section): Use lcomm_sym section symbol.
1116 * bfd-in2.h: Regenerate.
1118 2017-04-23 Alan Modra <amodra@gmail.com>
1121 * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
1122 parameters and comment.
1123 (_bfd_elf_get_reloc_section): Delete.
1124 (_bfd_elf_plt_get_reloc_section): Declare.
1125 * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
1126 New functions. Don't blindly skip over assumed .rel/.rela prefix.
1128 (_bfd_elf_get_reloc_section): ..here. Delete.
1129 (assign_section_numbers): Call elf_get_reloc_section.
1130 * elf64-ppc.c (elf_backend_get_reloc_section): Define.
1131 * elfxx-target.h (elf_backend_get_reloc_section): Update.
1133 2017-04-23 Alan Modra <amodra@gmail.com>
1136 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
1139 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
1142 * elf32-i386.c (elf_i386_link_hash_entry): Add
1143 no_finish_dynamic_symbol.
1144 (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
1145 (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
1146 symbol, don't make it dynamic in PIE.
1147 (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
1148 set no_finish_dynamic_symbol and generate R_386_RELATIVE
1149 relocation for R_386_GOT32
1150 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
1153 2017-04-21 H.J. Lu <hongjiu.lu@intel.com>
1157 * elflink.c (elf_link_add_object_symbols): Require
1158 --no-dynamic-linker with -E/--dynamic-list when creating
1161 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
1163 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
1166 2017-04-20 Maciej W. Rozycki <macro@imgtec.com>
1168 * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
1169 dynamic symbol sorting.
1171 2017-04-20 H.J. Lu <hongjiu.lu@intel.com>
1174 * elflink.c (elf_link_add_object_symbols): Preserve
1175 dynamic_ref_after_ir_def when restoring the symbol table for
1176 unneeded dynamic object.
1178 2017-04-19 H.J. Lu <hongjiu.lu@intel.com>
1181 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
1182 on on undefined IFUNC symbol in the second PLT.
1184 2017-04-19 Wedson Almeida Filho <wedsonaf@gmail.com>
1186 * peXXigen.c (pe_print_reloc): Correct chunk_end.
1188 2017-04-19 Alan Modra <amodra@gmail.com>
1190 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
1191 or make dynamic for info->dynamic_undefined_weak 0 and 1.
1192 * elf32-ppc.c:Formatting.
1193 (ensure_undefweak_dynamic): Don't make dynamic when
1194 info->dynamic_undefined_weak is zero.
1195 (allocate_dynrelocs): Discard undefweak dyn_relocs for
1196 info->dynamic_undefined_weak. Discard undef dyn_relocs when
1197 not default visibility. Discard undef and undefweak
1199 (ppc_elf_relocate_section): Adjust to suit.
1200 * elf64-ppc.c: Formatting.
1201 (ensure_undefweak_dynamic): Don't make dynamic when
1202 info->dynamic_undefined_weak is zero.
1203 (allocate_dynrelocs): Discard undefweak dyn_relocs for
1204 info->dynamic_undefined_weak. Discard them earlier.
1206 2017-04-17 H.J. Lu <hongjiu.lu@intel.com>
1209 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
1210 before generating the version definition section.
1212 2017-04-17 Alan Modra <amodra@gmail.com>
1214 * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
1215 state when a regular object file defines a symbol with
1216 incompatible type to that defined by an earlier shared lib.
1218 2017-04-13 Alan Modra <amodra@gmail.com>
1220 * coffcode.h: Wrap some overly long _bfd_error_handler args.
1222 * elf32-arm.c: Likewise.
1223 * elf32-i386.c: Likewise.
1224 * elf32-mep.c: Likewise.
1225 * elf64-ia64-vms.c: Likewise.
1226 * elf64-x86-64.c: Likewise.
1227 * elflink.c: Likewise.
1228 * elfnn-ia64.c: Likewise.
1229 * elfxx-mips.c: Likewise.
1231 2017-04-13 Alan Modra <amodra@gmail.com>
1233 * aoutx.h: Use %B and %A in error messages throughout file.
1234 * aout-cris.c: Likewise.
1235 * archive.c: Likewise.
1236 * binary.c: Likewise.
1237 * coff-rs6000.c: Likewise.
1238 * coff-tic4x.c: Likewise.
1239 * coffcode.h: Likewise.
1240 * coffgen.c: Likewise.
1241 * cofflink.c: Likewise.
1242 * coffswap.h: Likewise.
1243 * cpu-arm.c: Likewise.
1244 * elf-eh-frame.c: Likewise.
1245 * elf-m10300.c: Likewise.
1247 * elf32-arc.c: Likewise.
1248 * elf32-arm.c: Likewise.
1249 * elf32-bfin.c: Likewise.
1250 * elf32-frv.c: Likewise.
1251 * elf32-iq2000.c: Likewise.
1252 * elf32-m32c.c: Likewise.
1253 * elf32-microblaze.c: Likewise.
1254 * elf32-nds32.c: Likewise.
1255 * elf32-rl78.c: Likewise.
1256 * elf32-rx.c: Likewise.
1257 * elf32-score.c: Likewise.
1258 * elf32-score7.c: Likewise.
1259 * elf32-sh64.c: Likewise.
1260 * elf32-v850.c: Likewise.
1261 * elf32-vax.c: Likewise.
1262 * elf32-visium.c: Likewise.
1263 * elf64-ia64-vms.c: Likewise.
1264 * elf64-mmix.c: Likewise.
1265 * elf64-sh64.c: Likewise.
1266 * elfcode.h: Likewise.
1267 * elfnn-aarch64.c: Likewise.
1268 * elfnn-ia64.c: Likewise.
1269 * elfxx-mips.c: Likewise.
1270 * hpux-core.c: Likewise.
1273 * linker.c: Likewise.
1274 * merge.c: Likewise.
1276 * oasys.c: Likewise.
1277 * pdp11.c: Likewise.
1278 * peXXigen.c: Likewise.
1279 * rs6000-core.c: Likewise.
1280 * vms-alpha.c: Likewise.
1281 * xcofflink.c: Likewise.
1283 2017-04-13 Alan Modra <amodra@gmail.com>
1285 * bfd.c (PRINT_TYPE): Define.
1286 (_doprnt): New function.
1287 (error_handler_internal): Use _doprnt.
1288 * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
1289 calls in their natural order, throughout file.
1290 * coff-mcore.c: Likewise.
1291 * coff-ppc.c: Likewise.
1292 * coff-tic80.c: Likewise.
1293 * cofflink.c: Likewise.
1294 * elf-s390-common.c: Likewise.
1296 * elf32-arm.c: Likewise.
1297 * elf32-i386.c: Likewise.
1298 * elf32-m32r.c: Likewise.
1299 * elf32-msp430.c: Likewise.
1300 * elf32-spu.c: Likewise.
1301 * elf64-ia64-vms.c: Likewise.
1302 * elf64-sparc.c: Likewise.
1303 * elf64-x86-64.c: Likewise.
1304 * elflink.c: Likewise.
1305 * elfnn-aarch64.c: Likewise.
1306 * elfnn-ia64.c: Likewise.
1307 * elfxx-mips.c: Likewise.
1309 2017-04-13 Alan Modra <amodra@gmail.com>
1311 * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
1312 branch veneers" error. Fix double space and format message.
1313 * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
1314 * elf64-ppc.c (tocsave_find): Supply missing %B arg.
1316 2017-04-13 Alan Modra <amodra@gmail.com>
1318 * bfd-in2.h: Regenerate.
1320 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
1322 * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
1323 extra `\n' in warning/error messages.
1324 * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
1325 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
1327 2017-04-11 H.J. Lu <hongjiu.lu@intel.com>
1329 * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
1330 processor-specific properties with generic ELF target vector.
1332 2017-04-10 Qing Zhao <qing.zhao@oracle.com>
1334 * elf32-sparc.c (elf_backend_fixup_symbol): New.
1335 * elf64-sparc.c (elf_backend_fixup_symbol): New.
1336 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
1337 (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
1339 (link_hash_newfunc): Initialize has_got_reloc and
1341 (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
1343 (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
1345 (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
1347 (_bfd_sparc_elf_fixup_symbol): New function.
1348 (allocate_dynrelocs): Don't allocate space for dynamic
1349 relocations and discard relocations against resolved undefined
1350 weak symbols in executable. Don't make resolved undefined weak
1351 symbols in executable dynamic. Keep dynamic non-GOT/non-PLT
1352 relocation against undefined weak symbols in PIE.
1353 (_bfd_sparc_elf_relocate_section): Don't generate dynamic
1354 relocations against resolved undefined weak symbols in PIE
1355 (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
1356 without ynamic PLT/GOT relocations for resolved undefined weak
1358 Don't generate dynamic relocation against resolved undefined
1359 weak symbol in executable.
1360 (pie_finish_undefweak_symbol): New function.
1361 (_bfd_sparc_elf_finish_dynamic_sections): Call
1362 pie_finish_undefweak_symbol on all symbols in PIE.
1363 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
1364 (_bfd_sparc_elf_fixup_symbol): New function.
1366 2017-04-10 Nick Clifton <nickc@redhat.com>
1368 * config.bfd: Remove ns32k from obsolete list.
1370 2017-04-10 Alan Modra <amodra@gmail.com>
1373 * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
1374 (special_sections_i): Likewise for .init_array.
1375 (special_sections_p): Likewise for .preinit_array.
1377 2017-04-07 H.J. Lu <hongjiu.lu@intel.com>
1381 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
1382 ELF_COMMON_DEF_P for common symbols.
1383 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
1384 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1385 * elflink.c (_bfd_elf_merge_symbol): Revert commits
1386 202ac193bbbecc96a4978d1ac3d17148253f9b01 and
1387 07492f668d2173da7a2bda3707ff0985e0f460b6.
1389 2017-04-07 Pedro Alves <palves@redhat.com>
1391 * opncls.c (bfd_get_debug_link_info): Rename to...
1392 (bfd_get_debug_link_info_1): ... this. Change type of second
1393 parameter to void pointer. Adjust.
1394 (bfd_get_debug_link_info): Reimplement on top of
1395 bfd_get_debug_link_info_1.
1396 (separate_debug_file_exists, separate_alt_debug_file_exists):
1397 Change type of second parameter to void pointer. Adjust.
1398 (get_func_type, check_func_type): Change type of second parameter
1400 (find_separate_debug_file): Add 'func_data' parameter. Pass it to
1401 the callback functions instead of passing the address of a local.
1402 (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
1403 find_separate_debug_file.
1404 (get_alt_debug_link_info_shim): Change type of second parameter to
1405 void pointer. Adjust.
1406 (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
1407 find_separate_debug_file.
1408 (get_build_id_name, bfd_boolean check_build_id_file): Change type
1409 of second parameter to void pointer. Adjust.
1410 (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
1411 pointer local to find_separate_debug_file.
1413 2017-04-07 Tristan Gingold <gingold@gingold-Precision-7510>
1415 * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
1416 external symbols with a definition.
1417 (_bfd_coff_gc_mark_extra_sections): Fix typo.
1419 2017-04-07 Alan Modra <amodra@gmail.com>
1421 * po/SRC-POTFILES.in: Regenerate.
1423 2017-04-05 Alan Modra <amodra@gmail.com>
1425 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
1428 2017-04-02 Jon Turney <jon.turney@dronecode.org.uk>
1430 (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
1431 numbers for DataDirectory entry indicies passed to
1434 2017-04-04 H.J. Lu <hongjiu.lu@intel.com>
1436 * elf.c (get_program_header_size): Add a GNU_MBIND segment for
1437 each GNU_MBIND section and align GNU_MBIND section to page size.
1438 (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
1439 segment for each GNU_MBIND section.
1440 (_bfd_elf_init_private_section_data): Copy sh_info from input
1441 for GNU_MBIND section.
1443 2017-04-03 Palmer Dabbelt <palmer@dabbelt.com>
1445 * elfnn-riscv.c (GP_NAME): Delete.
1446 (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
1447 (_bfd_riscv_relax_lui): Likewise.
1449 2017-04-04 Nick Clifton <nickc@redhat.com>
1452 * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
1454 (bfd_elf_final_link): Only initialize the extended symbol index
1455 section if there are extended symbol tables to list.
1457 2017-04-03 H.J. Lu <hongjiu.lu@intel.com>
1459 * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
1460 (BFD32_BACKENDS_CFILES): Add elf-properties.c.
1461 * configure.ac (elf): Add elf-properties.lo.
1462 * Makefile.in: Regenerated.
1463 * configure: Likewise.
1464 * elf-bfd.h (elf_property_kind): New.
1465 (elf_property): Likewise.
1466 (elf_property_list): Likewise.
1467 (elf_properties): Likewise.
1468 (_bfd_elf_parse_gnu_properties): Likewise.
1469 (_bfd_elf_get_property): Likewise.
1470 (_bfd_elf_link_setup_gnu_properties): Likewise.
1471 (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
1472 and setup_gnu_properties.
1473 (elf_obj_tdata): Add properties.
1474 * elf-properties.c: New file.
1475 * elf32-i386.c (elf_i386_parse_gnu_properties): New.
1476 (elf_i386_merge_gnu_properties): Likewise.
1477 (elf_backend_parse_gnu_properties): Likewise.
1478 (elf_backend_merge_gnu_properties): Likewise.
1479 * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
1480 (elf_x86_64_merge_gnu_properties): Likewise.
1481 (elf_backend_parse_gnu_properties): Likewise.
1482 (elf_backend_merge_gnu_properties): Likewise.
1483 * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
1484 (elf_backend_parse_gnu_properties): Likewise.
1485 (elf_backend_setup_gnu_properties): Likewise.
1486 (elfNN_bed): Add elf_backend_parse_gnu_properties,
1487 elf_backend_merge_gnu_properties and
1488 elf_backend_setup_gnu_properties.
1490 2017-03-30 Pip Cet <pipcet@gmail.com>
1492 * elf32-wasm32.c: Add relocation code, two relocs.
1493 * reloc.c: Add wasm32 relocations.
1494 * libbfd.h: Regenerate.
1495 * bfd-in2.h: Regenerate.
1496 * bfd/po/bfd.pot: Regenerate.
1498 2017-03-29 Nick Clifton <nickc@redhat.com>
1501 * coff-bfd.h (struct coff_section_data): Add new fields:
1502 saved_bias and bias.
1503 * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
1504 computed for PE binaries.
1505 * dwarf2.c (scan_unit_for_symbols): Only warn once about each
1508 2017-03-28 Hans-Peter Nilsson <hp@axis.com>
1511 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
1512 to handle a local symbol with a hash-symbol-entry; without PLT.
1513 Add BFD_ASSERT for an incidental case with GOT entry present.
1514 (cris_elf_check_relocs): Increment PLT refcount only if the symbol
1515 isn't forced-or-set local.
1517 2017-03-27 Pip Cet <pipcet@gmail.com>
1519 * wasm-module.c: New file to support WebAssembly modules.
1520 * wasm-module.h: New file to support WebAssembly modules.
1521 * doc/webassembly.texi: Start documenting wasm-module.c.
1522 * config.bfd: Add wasm_vec.
1523 * targets.c: Likewise.
1524 * configure.ac: Likewise.
1525 * Makefile.am: Add entries for wasm-module.c.
1526 * Makefile.in: Regenerate.
1527 * configure: Regenerate.
1528 * po/SRC-POTFILES.in: Regenerate.
1530 2017-03-27 Pip Cet <pipcet@gmail.com>
1532 * cpu-wasm32.c: New file to support wasm32 architecture.
1533 * elf32-wasm32.c: New file to support wasm32 architecture.
1534 * Makefile.am: Add wasm32 architecture.
1535 * archures.c: Likewise.
1536 * config.bfd: Likewise.
1537 * configure.ac: Likewise.
1538 * targets.c: Likewise.
1539 * Makefile.in: Regenerate.
1540 * bfd-in2.h: Regenerate.
1541 * configure: Regenerate.
1542 * po/SRC-POTFILES.in: Regenerate.
1544 2017-03-20 Alan Modra <amodra@gmail.com>
1547 * elf64-ppc.c (compare_symbols): Stabilize sort.
1549 2017-03-18 Alan Modra <amodra@gmail.com>
1551 * elf64-ppc.c (struct ppc_link_hash_table): Add
1552 local_ifunc_resolver and maybe_local_ifunc_resolver.
1553 (ppc_build_one_stub): Set flags on emitting dynamic
1554 relocation to ifunc.
1555 (ppc64_elf_relocate_section): Likewise.
1556 (ppc64_elf_finish_dynamic_symbol): Likewise.
1557 (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
1558 local dynamic relocs to ifuncs.
1559 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
1560 local_ifunc_resolver and maybe_local_ifunc_resolver.
1561 (ppc_elf_relocate_section): Set flag on emitting dynamic
1562 relocation to ifuncs.
1563 (ppc_elf_finish_dynamic_symbol): Likewise.
1564 (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
1565 dynamic relocs to ifuncs.
1567 2017-03-13 Nick Clifton <nickc@redhat.com>
1570 * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
1571 BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
1572 (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
1573 BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
1574 * bfd-in2.h: Regenerate.
1575 * libbfd.h: Regenerate.
1576 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
1578 (IS_AARCH64_TLSDESC_RELOC): Likewise.
1579 (elfNN_aarch64_howto_table): Likewise.
1580 (aarch64_tls_transition_without_check): Likewise.
1581 (aarch64_reloc_got_type): Likewise.
1582 (elfNN_aarch64_final_link_relocate): Likewise.
1583 (elfNN_aarch64_tls_relax): Likewise.
1584 (elfNN_aarch64_relocate_section): Likewise.
1585 (elfNN_aarch64_gc_sweep_hook): Likewise.
1586 (elfNN_aarch64_check_relocs): Likewise.
1587 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
1588 (_bfd_aarch64_elf_resolve_relocation): Likewise.
1590 2017-03-11 Alan Modra <amodra@gmail.com>
1592 * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
1593 parameter is in fact used. Whitespace fixes.
1594 * elf64-ppc.c: Likewise.
1596 2017-03-09 Sam Thursfield <sam.thursfield@codethink.co.uk>
1598 * rs6000-core.c (CORE_NEW): Simplify macro when
1599 AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
1601 2017-03-07 Alan Modra <amodra@gmail.com>
1605 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
1608 2017-03-05 Alan Modra <amodra@gmail.com>
1610 * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
1611 * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
1612 (next_cie_fde_offset): New function.
1613 (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
1614 (_bfd_elf_discard_section_eh_frame): Align zero terminator to
1615 four bytes. Align CIEs to four or eight bytes depending on
1616 per_encoding_aligned8. Align FDEs according to their encoding.
1617 Pad last FDE to output section alignment.
1618 (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove
1620 * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
1621 (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
1622 (ppc64_elf_finish_dynamic_sections): Adjust to suit.
1624 2017-03-02 Martin Bickel <binutils@ineranves.de>
1627 * elf.c (rewrite_elf_program_header): Do not issue a warning for
1628 empty segments which have a zero filesz, but a non-zero memsz.
1630 2017-03-02 Alan Modra <amodra@gmail.com>
1632 * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
1634 2017-02-28 Alan Modra <amodra@gmail.com>
1636 * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
1637 (ppc64_elf_relocate_section): Likewise.
1639 2017-02-28 Alan Modra <amodra@gmail.com>
1642 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
1643 rather than elf32_nios2_hash_table or elf_hash_table.
1644 (create_got_section): Likewise.
1645 (nios2_elf32_finish_dynamic_symbol): Likewise.
1646 (nios2_elf32_adjust_dynamic_symbol): Likewise.
1647 (nios2_elf32_size_dynamic_sections): Likewise.
1648 (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
1649 vars. Use htab equivalents directly instead. Don't create
1650 all dynamic sections on needing just the GOT. Use a goto
1651 rather than a fall-through with reloc test. Ensure
1652 htab->dynobj is set when making dynamic sreloc section.
1653 (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
1654 equivalent directly instead. Don't segfault on looking for
1655 .dynamic when dynamic sections have not been created. Don't
1656 segfault on .got.plt being discarded.
1657 (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
1658 Don't set "relocs" on .rela.plt. Do handle .sbss. Delete
1659 fixme and another not so relevant comment.
1660 (nios2_elf_add_symbol_hook): Delete dynobj var. If not
1661 already set, set hash table dynobj on creating .sbss.
1663 2017-02-28 Alan Modra <amodra@gmail.com>
1665 * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
1666 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
1667 (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
1668 (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
1669 (ppc64_elf_relocate_section): Likewise.
1670 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
1671 (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
1672 (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
1673 * libbfd.h: Regenerate.
1674 * bfd-in2.h: Regenerate.
1676 2017-02-28 Alan Modra <amodra@gmail.com>
1678 * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
1679 dynamic .data.rel.ro read-only.
1680 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
1681 rather than section flags when deciding where copy reloc goes.
1682 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
1683 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
1684 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
1685 * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
1686 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
1687 * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
1688 * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
1689 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
1690 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
1691 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
1692 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
1693 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
1694 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
1695 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
1696 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
1697 * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
1698 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
1699 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
1700 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
1702 2017-02-28 Maciej W. Rozycki <macro@imgtec.com>
1704 * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
1705 `jalr $0, $25' instruction encoding.
1707 2017-02-27 Nick Clifton <nickc@redhat.com>
1710 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
1711 generating a seg-fault when encountering a symbol that has been
1712 deleted by garbage collection.
1714 2017-02-25 Alan Modra <amodra@gmail.com>
1716 * elf32-arc.c (struct dynamic_sections): Delete.
1717 (enum dyn_section_types): Delete.
1718 (dyn_section_names): Delete.
1719 (arc_create_dynamic_sections): Delete.
1720 (elf_arc_finish_dynamic_sections): Don't call the above. Don't
1721 segfault on discarded .rela.plt section.
1722 (elf_arc_size_dynamic_sections): Formatting. Don't call
1723 arc_create_dynamic_sections. Don't allocate memory for sections
1724 handled by the generic linker. Correct code finding relocs in
1725 read-only sections. Set SEC_EXCLUDE on zero size .got,
1726 .got.plt, and .dynbss sections. Do set .interp for pies.
1728 2017-02-24 Andrew Waterman <andrew@sifive.com>
1730 * elfnn-riscv.c (GP_NAME): New macro.
1731 (riscv_global_pointer_value): Use it.
1732 (_bfd_riscv_relax_lui): If symbol and global pointer are in same
1733 output section, consider only that section's alignment.
1735 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
1737 * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
1738 * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
1739 * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
1740 * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
1742 2017-02-23 Maciej W. Rozycki <macro@imgtec.com>
1744 * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
1745 <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
1748 2017-02-23 Alan Modra <amodra@gmail.com>
1751 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
1753 (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
1754 (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
1757 2017-02-22 Maciej W. Rozycki <macro@imgtec.com>
1760 * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
1761 processing ahead of the call to `elf_gc_sweep_symbol'.
1763 2017-02-22 Nick Clifton <nickc@redhat.com>
1766 * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
1767 created section 4-byte alignment.
1769 2017-02-22 Alan Modra <amodra@gmail.com>
1771 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
1772 on .got or .plt output section being discarded by script.
1773 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise. Move
1776 2017-02-21 Alan Modra <amodra@gmail.com>
1778 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
1779 DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
1781 2017-02-20 Alan Modra <amodra@gmail.com>
1784 * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
1785 if DT_RELSZ/DT_RELASZ is zero.
1787 2017-02-17 Nick Clifton <nickc@redhat.com>
1789 * compress.c (bfd_get_full_section_contents): Remember to reduce
1790 compressed size by the sizeof the compression header when
1791 decompressing the contents.
1793 2017-02-17 Pedro Alves <palves@redhat.com>
1795 * srec.c (Chunk): Rename to ...
1796 (_bfd_srec_len): ... this.
1797 (S3Forced): Rename to ...
1798 (_bfd_srec_forceS3): ... this.
1799 * objcopy.c: Adjust all references.
1801 2017-02-17 Pedro Alves <palves@redhat.com>
1803 * archive.c (bsd_write_armap): Rename to ...
1804 (_bfd_bsd_write_armap): ... this.
1805 (coff_write_armap): Rename to ...
1806 (_bfd_coff_write_armap): ... this.
1807 * libbfd-in.h (bsd_write_armap): Rename to ...
1808 (_bfd_bsd_write_armap): ... this.
1809 (coff_write_armap): Rename to ...
1810 (_bfd_coff_write_armap): ... this.
1811 * aout-target.h, aout-tic30.c: Adjust all users.
1812 * libbfd.h: Regenerate.
1814 2017-02-17 Pedro Alves <palves@redhat.com>
1816 * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
1817 (warn_deprecated): Rename to ...
1818 (_bfd_warn_deprecated): ... this.
1819 * libbfd.c (warn_deprecated): Rename to ...
1820 (_bfd_warn_deprecated): ... this.
1821 * bfd-in2.h: Regenerate.
1823 2017-02-17 Pedro Alves <palves@redhat.com>
1825 * bfdio.c (real_ftell): Rename to ...
1826 (_bfd_real_ftell): ... this.
1827 (real_fseek): Rename to ...
1828 (_bfd_real_fseek): ... this.
1829 (real_fopen): Rename to ...
1830 (_bfd_real_fopen): ... this.
1831 * libbfd-in.h (real_ftell): Rename to ...
1832 (_bfd_real_ftell): ... this.
1833 (real_fseek): Rename to ...
1834 (_bfd_real_fseek): ... this.
1835 (real_fopen): Rename to ...
1836 (_bfd_real_fopen): ... this.
1837 * cache.c, dwarf2.c, opncls.c: Adjust all callers.
1838 * libbfd.h: Regenerate.
1840 2017-02-17 Pedro Alves <palves@redhat.com>
1842 * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
1843 * libbfd.c (read_unsigned_leb128): Rename to ...
1844 (_bfd_read_unsigned_leb128): ... this.
1845 (read_signed_leb128): Rename to ...
1846 (_bfd_read_signed_leb128): ... this.
1847 (safe_read_leb128): Rename to ...
1848 (_bfd_safe_read_leb128): ... this.
1849 * libbfd-in.h (read_unsigned_leb128): Rename to ...
1850 (_bfd_read_unsigned_leb128): ... this.
1851 (read_signed_leb128): Rename to ...
1852 (_bfd_read_signed_leb128): ... this.
1853 (safe_read_leb128): Rename to ...
1854 (_bfd_safe_read_leb128): ... this.
1855 * libbfd.h: Renegerate.
1857 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
1859 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
1860 before trying to fine matching file and line information.
1862 2017-02-16 Andrew Burgess <andrew.burgess@embecosm.com>
1864 * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
1865 (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
1866 not match current bfd, then reload debug information. Record bfd
1867 we're loading debug info for in the stash. If we have debug
1868 informatin in the cache then perform section placement before
1871 2017-02-16 Alan Modra <amodra@gmail.com>
1874 * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
1875 * elfxx-target.h (elf_backend_no_page_alias): Define.
1876 (elfNN_bed): Init new field.
1877 * elf.c (assign_file_positions_for_load_sections): If no_page_alias
1878 ensure PT_LOAD segment starts on a new page.
1879 * elf32-hppa.c (elf_backend_no_page_alias): Define.
1881 2017-02-16 Alan Modra <amodra@gmail.com>
1884 * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
1887 2017-02-16 Jiong Wang <jiong.wang@arm.com>
1889 * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
1890 * bfd-in2.h: Regenerated.
1892 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
1895 * elf32-i386.c (elf_i386_relocate_section): Allow
1896 "lea foo@GOT, %reg" in PIC.
1898 2017-02-15 H.J. Lu <hongjiu.lu@intel.com>
1901 * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
1902 symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
1903 error against local IFUNC symbol without a base register for
1906 2017-02-15 Maciej W. Rozycki <macro@imgtec.com>
1908 * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
1909 `%P: %H:' with `info->callbacks->einfo'.
1910 (ppc_elf_relocate_section): Likewise.
1911 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
1912 (ppc64_elf_edit_toc): Likewise.
1913 (ppc64_elf_relocate_section): Likewise.
1915 2017-02-14 Alan Modra <amodra@gmail.com>
1917 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
1918 --gc-keep-exported, and test versioned field of sym rather than
1919 looking for @ in name.
1921 2017-02-13 Palmer Dabbelt <palmer@dabbelt.com>
1923 * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
1926 2017-02-13 Nick Clifton <nickc@redhat.com>
1929 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
1932 2017-02-07 Andrew Waterman <andrew@sifive.com>
1934 * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
1935 entry size if PLT header is written.
1937 2017-02-06 Sheldon Lobo <sheldon.lobo@oracle.com>
1939 Fix sparc64 dynamic relocation processing to use the dynamic
1941 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
1942 to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
1945 2017-02-03 Nick Clifton <nickc@redhat.com>
1948 * coffcode.h (coff_write_object_contents): Enlarge size of
1949 s_name_buf in order to avoid compile time warning about possible
1951 * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
1952 32-bits of insn value before printing into buffer.
1954 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1956 * elfxx-mips.c (mips_elf_hash_sort_data): Add
1957 `max_local_dynindx'.
1958 (mips_elf_sort_hash_table): Handle it.
1959 (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
1960 symbols bump up `max_local_dynindx' rather than
1961 `max_non_got_dynindx'.
1963 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1965 * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
1966 `min_got_dynindx', `max_unref_got_dynindx' and
1967 `max_non_got_dynindx' members to the `bfd_size_type' data type.
1968 (mips_elf_sort_hash_table): Adjust accordingly.
1970 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1972 * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
1973 to access the hash table.
1975 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1977 * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
1978 non-NULL `htab' to the beginning.
1980 2017-02-02 Maciej W. Rozycki <macro@imgtec.com>
1982 * elflink.c (elf_gc_sweep): Wrap overlong line.
1984 2017-01-30 Maciej W. Rozycki <macro@imgtec.com>
1986 * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
1987 (_bfd_mips_elf_linker_flags): ... this. Add another parameter.
1988 * elfxx-mips.c (mips_elf_link_hash_table): Add
1989 `ignore_branch_isa' member.
1990 (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
1991 in branch relocation calculation as an error if
1992 `ignore_branch_isa' has been set.
1993 (_bfd_mips_elf_insn32): Rename to...
1994 (_bfd_mips_elf_linker_flags): ... this. Rename the `on'
1995 parameter to `insn32' and add an `ignore_branch_isa' parameter.
1996 Handle the new parameter.
1998 2017-01-27 Hans-Peter Nilsson <hp@axis.com>
2000 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
2001 local variable dynobj.
2004 * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
2005 (elf_cris_adjust_dynamic_symbol): Place variables copied into the
2006 executable from read-only sections into sdynrelro.
2007 (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
2008 dynamic relocs in sdynrelro.
2009 (elf_backend_want_dynrelro): Define.
2011 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
2013 * config.bfd (*-*-rtemsaout*): Mark as removed.
2015 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
2017 * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
2018 (arm-*-rtems*): Move to (arm*-*-eabi*).
2019 (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
2020 (m68-*-rtems*): Move to (m68*-*-elf*).
2022 2017-01-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
2024 * config.bfd (*-*-rtemscoff*): Mark as removed.
2026 2017-01-24 Maciej W. Rozycki <macro@imgtec.com>
2029 * elflink.c (bfd_elf_record_link_assignment): Revert last
2030 change and don't ever clear `forced_local'. Set `mark'
2032 (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
2034 (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
2035 (bfd_elf_size_dynamic_sections): ... here.
2036 * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
2037 and set `mark' instead in `__tls_get_addr_opt' processing.
2038 * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
2040 2017-01-24 Alan Modra <amodra@gmail.com>
2042 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
2043 where dynamic relocs are preferable. Allow ifunc too.
2044 (ensure_undefweak_dynamic): New function.
2045 (allocate_dynrelocs): Use it here. Move plt handling last and
2046 don't make symbols dynamic, simplifying loop. Only make undef
2047 weak symbols with GOT entries dynamic. Correct condition
2048 for GOT relocs. Handle dynamic relocs on ifuncs. Correct
2049 comments. Remove goto.
2050 (ppc_elf_relocate_section): Correct test for using dynamic
2051 symbol on GOT relocs. Rearrange test for emitting GOT relocs
2052 to suit. Set up explicit tls_index entries and implicit GOT
2053 tls_index entries resolvable at link time for
2054 __tls_get_addr_opt. Simplify test to clear mem for prelink.
2055 * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
2056 (ensure_undefweak_dynamic): New function.
2057 (allocate_dynrelocs): Use it here. Only make undef weak symbols
2058 with GOT entries dynamic. Remove unnecessary test of
2059 WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
2060 (ppc64_elf_relocate_section): Correct test for using dynamic
2061 symbol on GOT relocs. Rearrange test for emitting GOT relocs
2062 to suit. Set up explicit tls_index entries and implicit GOT
2063 tls_index entries resolvable at link time for __tls_get_addr_opt.
2064 Simplify expression to clear mem for prelink.
2066 2017-01-23 Yury Norov <ynorov@caviumnetworks.com>
2068 * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
2070 2017-01-20 Jiong Wang <jiong.wang@arm.com>
2072 * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
2073 (elf_backend_hash_symbol): Define.
2075 2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
2078 * elflink.c (bfd_elf_record_link_assignment): Clear any
2079 `forced_local' marking for DSO symbols that are not being
2082 2017-01-17 Kuan-Lin Chen <kuanlinchentw@gmail.com>
2084 * elfnn-riscv.c (riscv_elf_object_p): New function.
2086 2017-01-12 H.J. Lu <hongjiu.lu@intel.com>
2089 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
2091 (elf_x86_64_check_relocs): Create .eh_frame section for the
2093 (elf_x86_64_size_dynamic_sections): Allocate and initialize
2094 .eh_frame section for the .plt.bnd section.
2095 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
2096 for the .plt.bnd section.
2098 2017-01-12 Nick Clifton <nickc@redhat.com>
2101 * opncls.c (find_separate_debug_file): Add include_dirs
2102 parameter. Only include the directory part of the bfd's filename
2103 in search paths if include_dirs is true. Add a couple of extra
2104 locations for looking for debug files.
2105 ( bfd_follow_gnu_debuglink): Update invocation of
2106 find_separate_debug_file.
2107 (bfd_follow_gnu_debugaltlink): Likewise.
2108 (get_build_id): New function: Finds the build-id of the given bfd.
2109 (get_build_id_name): New function: Computes the name of the
2110 separate debug info file for a bfd, based upon its build-id.
2111 (check_build_id_file): New function: Checks to see if a separate
2112 debug info file exists at the given location, and that its
2113 build-id matches that of the original bfd.
2114 (bfd_follow_build_id_debuglink): New function: Finds a separate
2115 debug info file for a given bfd by using the build-id method.
2116 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
2117 method of locating a separate debug info file before using the
2119 * bfd-in2.h: Regenerate.
2121 2017-01-11 H.J. Lu <hongjiu.lu@intel.com>
2124 * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
2125 (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
2126 elf_x86_64_eh_frame_plt_got.
2127 (elf_x86_64_size_dynamic_sections): Get unwind info from
2128 elf_x86_64_bnd_arch_bed for the BND PLT.
2130 2017-01-11 Jeremy Soller <jackpot51@gmail.com>
2132 * config.bfd: Add entries for i686-redox and x86_64-redox.
2134 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
2136 * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
2138 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
2139 .eh_frame section to 4 bytes for x32.
2140 (elf_x86_64_check_relocs): Likewise.
2142 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
2145 * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
2146 (PLT_GOT_FDE_LENGTH): Likewise.
2147 (elf_i386_plt_layout): Add eh_frame_plt_got and
2148 eh_frame_plt_got_size.
2149 (elf_i386_plt): Updated.
2150 (elf_i386_link_hash_table): Add plt_got_eh_frame.
2151 (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
2152 (elf_i386_size_dynamic_sections): Allocate and initialize
2153 .eh_frame section for .plt.got.
2154 (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
2156 (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
2157 eh_frame_plt_got_size.
2158 * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
2159 (PLT_GOT_FDE_LENGTH): Likewise.
2160 (elf_x86_64_backend_data): Add eh_frame_plt_got and
2161 eh_frame_plt_got_size.
2162 (elf_x86_64_arch_bed): Updated.
2163 (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
2164 eh_frame_plt_got_size.
2165 (elf_x86_64_nacl_arch_bed): Likewise.
2166 (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
2167 (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
2168 (elf_x86_64_size_dynamic_sections): Allocate and initialize
2169 .eh_frame section for .plt.got.
2170 (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
2173 2017-01-10 H.J. Lu <hongjiu.lu@intel.com>
2175 * elf32-i386.c (elf_i386_size_dynamic_sections): Set
2176 plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
2178 2017-01-09 Nick Clifton <nickc@redhat.com>
2180 * dwarf2.c (lookup_address_in_function_table): Return early if
2181 there are no functions in the given comp unit, or if the high
2182 address of the last function in the comp unit is less than the
2185 2017-01-09 Nick Clifton <nickc@redhat.com>
2188 * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
2189 message if there are too many symbols to load.
2191 2017-01-04 James Clarke <jrtc27@jrtc27.com>
2193 * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
2194 if relocs are cached.
2196 2017-01-03 Rich Felker <bugdal@aerifal.cx>
2199 * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
2200 for R_MICROBLAZE_GOTOFF_64.
2202 2017-01-03 Nick Clifton <nickc@redhat.com>
2204 * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
2205 warning about using a possibly uninitialised variable.
2207 2017-01-02 Alan Modra <amodra@gmail.com>
2209 * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
2210 (allocate_plt_static, allocate_dynrelocs): Use it.
2212 2017-01-02 Alan Modra <amodra@gmail.com>
2214 * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
2215 .PARISC.unwind section.
2217 2017-01-02 Alan Modra <amodra@gmail.com>
2220 * elfxx-sparc.c (gdop_relative_offset_ok): New function.
2221 (_bfd_sparc_elf_relocate_section): Use it to validate GOT
2222 indirect to GOT pointer relative code edit.
2224 2017-01-02 Alan Modra <amodra@gmail.com>
2226 Update year range in copyright notice of all files.
2228 For older changes see ChangeLog-2016
2230 Copyright (C) 2017 Free Software Foundation, Inc.
2232 Copying and distribution of this file, with or without modification,
2233 are permitted in any medium without royalty provided the copyright
2234 notice and this notice are preserved.
2240 version-control: never