mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-09 04:21:49 +08:00
1be5d8d3bb
Spectre variant 2 mitigation for PowerPC and PowerPC64. bfd/ * elf32-ppc.c (GLINK_ENTRY_SIZE): Handle speculation barrier. (CRSETEQ, BEQCTRM): Define. (is_nonpic_glink_stub): Don't check bctr. (ppc_elf_link_hash_table_create): Init new ppc_elf_params field. (ppc_elf_relax_section): Size speculation barrier. (output_bctr): New function. (write_glink_stub): Use output_bctr. (ppc_elf_relocate_section): Use output_bctr for long branch stub. (ppc_elf_finish_dynamic_symbol): Likewise. (ppc_elf_finish_dynamic_sections): Use output_bctr. * elf32-ppc.h (struct ppc_elf_params): Add speculate_indirect_jumps. * elf64-ppc.c (CRSETEQ, BEQCTRM, BEQCTRLM): Define. (GLINK_PLTRESOLVE_SIZE): Size speculation barrier. (size_global_entry_stubs): Handle speculation barrier sizing. (plt_stub_size): Likewise. (output_bctr): New function. (build_plt_stub, build_tls_get_addr_stub): Output speculation barrier. (ppc_build_one_stub): Likewise for ppc_stub_plt_branch. (ppc_size_one_stub): Size speculation barrier in ppc_stub_plt_branch. (build_global_entry_stubs): Output speculation barrier. (ppc64_elf_build_stubs): Likewise in __glink_PLTresolve stub. * elf64-ppc.h (struct ppc64_elf_params): Add speculate_indirect_jumps. gold/ * options.h (speculate_indirect_jumps): New option. * powerpc.cc (beqctrm, beqctrlm, crseteq): New insn constants. (output_bctr): New function. (Stub_table::plt_call_size): Add space for speculation barrier. (Stub_table::branch_stub_size): Likewise. (Output_data_glink::pltresolve_size): Likewise. (Stub_table::do_write): Output speculation barriers. ld/ * emultempl/ppc32elf.em (params): Init new field. (OPTION_SPECULATE_INDIRECT_JUMPS): Define. (OPTION_NO_SPECULATE_INDIRECT_JUMPS): Define. (PARSE_AND_LIST_LONGOPTS): Handle new options. (PARSE_AND_LIST_ARGS_CASES): Likewise. (PARSE_AND_LIST_OPTIONS): Likewise. * emultempl/ppc64elf.em (params): Init new field. (OPTION_SPECULATE_INDIRECT_JUMPS): Define. (OPTION_NO_SPECULATE_INDIRECT_JUMPS): Define. (PARSE_AND_LIST_LONGOPTS): Handle --speculate-indirect-jumps. (PARSE_AND_LIST_OPTIONS): Likewise. (PARSE_AND_LIST_ARGS_CASES): Likewise. * ld.texinfo (--no-plt-thread-safe): Correct itemx. (--speculate-indirect-jumps): Document. * testsuite/ld-powerpc/elfv2exe.d, * testsuite/ld-powerpc/elfv2so.d, * testsuite/ld-powerpc/relbrlt.d, * testsuite/ld-powerpc/powerpc.exp: Disable plt alignment and speculation barriers on various tests.
72 lines
2.2 KiB
Plaintext
72 lines
2.2 KiB
Plaintext
2018-01-17 Alan Modra <amodra@gmail.com>
|
||
|
||
* options.h (speculate_indirect_jumps): New option.
|
||
* powerpc.cc (beqctrm, beqctrlm, crseteq): New insn constants.
|
||
(output_bctr): New function.
|
||
(Stub_table::plt_call_size): Add space for speculation barrier.
|
||
(Stub_table::branch_stub_size): Likewise.
|
||
(Output_data_glink::pltresolve_size): Likewise.
|
||
(Stub_table::do_write): Output speculation barriers.
|
||
|
||
2018-01-17 Alan Modra <amodra@gmail.com>
|
||
|
||
* options.h (plt_align): Support for PowerPC32 too.
|
||
* powerpc.cc (Stub_table::stub_align): Heed --plt-align for 32-bit.
|
||
(Stub_table::plt_call_size, branch_stub_size): Tidy.
|
||
(Stub_table::plt_call_align): Implement using stub_align.
|
||
(Output_data_glink::global_entry_align): New function.
|
||
(Output_data_glink::global_entry_off): New function.
|
||
(Output_data_glink::global_entry_address): Use global_entry_off.
|
||
(Output_data_glink::pltresolve_size): New function, replacing
|
||
pltresolve_size_ constant. Update all uses.
|
||
(Output_data_glink::add_global_entry): Align offset.
|
||
(Output_data_glink::set_final_data_size): Use global_entry_align.
|
||
(Stub_table::do_write): Don't pad __glink_PLTrelsolve with nops.
|
||
Tidy stub output. Use global_entry_off.
|
||
|
||
2018-01-15 Cary Coutant <ccoutant@gmail.com>
|
||
|
||
PR gold/22694
|
||
* options.h (-fuse-ld): Add correct helparg.
|
||
|
||
2018-01-15 Nick Clifton <nickc@redhat.com>
|
||
|
||
* po/uk.po: Updated Ukranian translation.
|
||
|
||
2018-01-13 Nick Clifton <nickc@redhat.com>
|
||
|
||
* po/gold.pot: Regenerated.
|
||
|
||
2018-01-13 Nick Clifton <nickc@redhat.com>
|
||
|
||
2.30 branch created.
|
||
|
||
2018-01-12 Cary Coutant <ccoutant@gmail.com>
|
||
|
||
* NEWS: Add new features in 1.15.
|
||
* version.cc (version_string): Bump to 1.15.
|
||
|
||
2018-01-12 Sterling Augustine <saugustine@google.com>
|
||
|
||
* cref.cc (Cref_inputs::Cref_table_compare::operator): Add
|
||
conditionals and calls to is_forwarder.
|
||
|
||
2018-01-03 Alan Modra <amodra@gmail.com>
|
||
|
||
Update year range in copyright notice of all files.
|
||
|
||
For older changes see ChangeLog-2017
|
||
|
||
Copyright (C) 2018 Free Software Foundation, Inc.
|
||
|
||
Copying and distribution of this file, with or without modification,
|
||
are permitted in any medium without royalty provided the copyright
|
||
notice and this notice are preserved.
|
||
|
||
Local Variables:
|
||
mode: change-log
|
||
left-margin: 8
|
||
fill-column: 74
|
||
version-control: never
|
||
End:
|