
This is in preparation for the next patch adding Spectre variant 2 mitigation for PowerPC and PowerPC64. Besides tidying code involved in stub output (to reduce the number of places where bctr is output), the patch adds some user visible features: 1) PowerPC64 ELFv2 global entry stubs now are aligned under the control of --plt-align, with a default alignment of 32 bytes. 2) PowerPC64 __glink_PLTresolve is no longer padded out with nops. 3) PowerPC32 PLT stubs are aligned under the control of --plt-align, with the default alignment being 16 bytes as before. 4) The PowerPC32 branch/nop table emitted before __glink_PLTresolve is now smaller in many cases. It was sized incorrectly when the __tls_get_addr_opt stub was used, and unnecessarily included space for local ifuncs. bfd/ * elf32-ppc.c (GLINK_ENTRY_SIZE): Add parameters, handle __tls_get_addr_opt, and alignment sizing. (TLS_GET_ADDR_GLINK_SIZE): Delete. (is_nonpic_glink_stub): Don't use GLINK_ENTRY_SIZE. (ppc_elf_get_synthetic_symtab): Recognize stubs spaced at 4, 6, or 8 insns. (ppc_elf_link_hash_table_create): Init new ppc_elf_params field. (allocate_dynrelocs): Use new GLINK_ENTRY_SIZE. (ppc_elf_size_dynamic_sections): Likewise. Size branch table by PLT reloc count. (write_glink_stub): Handle __tls_get_addr_opt stub. Pad out to size given by GLINK_ENTRY_SIZE. (ppc_elf_relocate_section): Adjust write_glink_stub call. (ppc_elf_finish_dynamic_symbol): Likewise. (ppc_elf_finish_dynamic_sections): Write PLTresolve without using insn array since so many need rewriting. * elf32-ppc.h (struct ppc_elf_params): Add plt_stub_align. * elf64-ppc.c (GLINK_PLTRESOLVE_SIZE): Rename from GLINK_CALL_STUB_SIZE. Add htab param and evaluate to size without nops. Adjust all uses. (ppc64_elf_get_synthetic_symtab): Don't use GLINK_CALL_STUB_SIZE in glink_vma calculation. (struct ppc_link_hash_table): Add global_entry section pointer. (create_linkage_sections): Create separate section for global entry stubs. (PPC_LO, PPC_HI, PPC_HA): Move earlier. (size_global_entry_stubs): Handle sizing for aligned stubs. (ppc64_elf_size_dynamic_sections): Handle global_entry alloc, and don't stash end of glink branch table in rawsize. (ppc_build_one_stub): Rewrite stub size calculations. (build_global_entry_stubs): Use new section. (ppc64_elf_build_stubs): Don't pad __glink_PLTresolve with nops. Build lazy link stubs out to end of section. Build global entry stubs in new section. gold/ * 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. ld/ * emultempl/ppc32elf.em (params): Init new field. (enum ppc32_opt): New enum to define OPTION_* values. Add OPTION_PLT_ALIGN and OPTION_NO_PLT_ALIGN. (PARSE_AND_LIST_LONGOPTS): Handle new options. (PARSE_AND_LIST_ARGS_CASES): Likewise. (PARSE_AND_LIST_OPTIONS): Likewise. Break up help output. * emultempl/ppc64elf.em (ppc_add_stub_section): Init alignment correctly for negative --plt-stub-align. * testsuite/ld-powerpc/elfv2exe.d, * testsuite/ld-powerpc/elfv2so.d, * testsuite/ld-powerpc/relbrlt.d, * testsuite/ld-powerpc/relbrlt.s, * testsuite/ld-powerpc/tlsexe.d, * testsuite/ld-powerpc/tlsexe.r, * testsuite/ld-powerpc/tlsexe32.d, * testsuite/ld-powerpc/tlsexe32.g, * testsuite/ld-powerpc/tlsexe32.r, * testsuite/ld-powerpc/tlsexetoc.d, * testsuite/ld-powerpc/tlsexetoc.r, * testsuite/ld-powerpc/tlsopt5_32.d, * testsuite/ld-powerpc/tlsso.d, * testsuite/ld-powerpc/tlstocso.d: Update for changed stub order.
229 lines
7.8 KiB
Text
229 lines
7.8 KiB
Text
2018-01-17 Alan Modra <amodra@gmail.com>
|
||
|
||
* emultempl/ppc32elf.em (params): Init new field.
|
||
(enum ppc32_opt): New enum to define OPTION_* values. Add
|
||
OPTION_PLT_ALIGN and OPTION_NO_PLT_ALIGN.
|
||
(PARSE_AND_LIST_LONGOPTS): Handle new options.
|
||
(PARSE_AND_LIST_ARGS_CASES): Likewise.
|
||
(PARSE_AND_LIST_OPTIONS): Likewise. Break up help output.
|
||
* emultempl/ppc64elf.em (ppc_add_stub_section): Init alignment
|
||
correctly for negative --plt-stub-align.
|
||
* testsuite/ld-powerpc/elfv2exe.d,
|
||
* testsuite/ld-powerpc/elfv2so.d,
|
||
* testsuite/ld-powerpc/relbrlt.d,
|
||
* testsuite/ld-powerpc/relbrlt.s,
|
||
* testsuite/ld-powerpc/tlsexe.d,
|
||
* testsuite/ld-powerpc/tlsexe.r,
|
||
* testsuite/ld-powerpc/tlsexe32.d,
|
||
* testsuite/ld-powerpc/tlsexe32.g,
|
||
* testsuite/ld-powerpc/tlsexe32.r,
|
||
* testsuite/ld-powerpc/tlsexetoc.d,
|
||
* testsuite/ld-powerpc/tlsexetoc.r,
|
||
* testsuite/ld-powerpc/tlsopt5_32.d,
|
||
* testsuite/ld-powerpc/tlsso.d,
|
||
* testsuite/ld-powerpc/tlstocso.d: Update for changed stub order.
|
||
|
||
2018-01-16 Nick Clifton <nickc@redhat.com>
|
||
|
||
* po/pt_BR.po: Updated Brazilian Portugese translation.
|
||
|
||
2018-01-15 Nick Clifton <nickc@redhat.com>
|
||
|
||
* po/uk.po: Updated Ukranian translation.
|
||
|
||
2018-01-13 Nick Clifton <nickc@redhat.com>
|
||
|
||
* po/ld.pot: Regenerated.
|
||
|
||
2018-01-13 Nick Clifton <nickc@redhat.com>
|
||
|
||
* configure: Regenerate.
|
||
|
||
2018-01-13 Nick Clifton <nickc@redhat.com>
|
||
|
||
2.30 branch created.
|
||
* NEWS: Add marker for 2.30.
|
||
|
||
2018-01-12 Alan Modra <amodra@gmail.com>
|
||
|
||
* testsuite/ld-elf/elf.exp: xfail "pr22374 function pointer
|
||
initialization" for currently failing targets.
|
||
|
||
2018-01-12 Alan Modra <amodra@gmail.com>
|
||
|
||
PR ld/22649
|
||
* testsuite/ld-elf/pr22649.msg: Allow other messages.
|
||
* testsuite/ld-elf/shared.exp: Check that --gc-sections is
|
||
supported before running ld/22649 tests.
|
||
|
||
2018-01-12 Nick Clifton <nickc@redhat.com>
|
||
|
||
* emultempl/elf32.em (_handle_option): Add support for "-z undefs"
|
||
as the opposite of "-z defs".
|
||
* ld.texinfo: Document the new option. Update the description of
|
||
the -z defs option to make it clear that it does generate an error
|
||
if an undefined symbol reference is found in an object file whilst
|
||
creating a shared library.
|
||
* NEWS: Document this new feature.
|
||
|
||
2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
|
||
|
||
* testsuite/ld-elf/pr22393-2a.rd: Replace "-z textonly" with
|
||
"-z separate-code".
|
||
* testsuite/ld-elf/pr22393-2b.rd: Likewise.
|
||
* testsuite/ld-x86-64/pr22393-3a.rd: Likewise.
|
||
* testsuite/ld-x86-64/pr22393-3b.rd: Likewise.
|
||
|
||
2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
|
||
|
||
PR ld/22393
|
||
* testsuite/ld-x86-64/pr22393-3a.c: New file.
|
||
* testsuite/ld-x86-64/pr22393-3a.rd: Likewise.
|
||
* testsuite/ld-x86-64/pr22393-3b.c: Likewise.
|
||
* testsuite/ld-x86-64/pr22393-3b.rd: Likewise.
|
||
* testsuite/ld-x86-64/x86-64.exp: Run tests for -z separate-code
|
||
-z max-page-size=0x1000.
|
||
|
||
2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
|
||
|
||
PR ld/22393
|
||
* testsuite/ld-elf/pr16322.d: Add -z noseparate-code.
|
||
* testsuite/ld-elf/pr22393-1.s: New file.
|
||
* testsuite/ld-elf/pr22393-1a.d: Likewise.
|
||
* testsuite/ld-elf/pr22393-1b.d: Likewise.
|
||
* testsuite/ld-elf/pr22393-1c.d: Likewise.
|
||
* testsuite/ld-elf/pr22393-1d.d: Likewise.
|
||
* testsuite/ld-elf/pr22393-1e.d: Likewise.
|
||
* testsuite/ld-elf/pr22393-1f.d: Likewise.
|
||
* testsuite/ld-elf/pr22393-2a.c: Likewise.
|
||
* testsuite/ld-elf/pr22393-2a.rd: Likewise.
|
||
* testsuite/ld-elf/pr22393-2b.c: Likewise.
|
||
* testsuite/ld-elf/pr22393-2b.rd: Likewise.
|
||
* testsuite/ld-elf/shared.exp: Run tests for -z separate-code.
|
||
|
||
2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
|
||
|
||
PR ld/22393
|
||
* NEWS: Mention "-z separate-code".
|
||
* emultempl/elf32.em (gld${EMULATION_NAME}_get_script): Get
|
||
builtin linker scripts and return linker scripts from disk for
|
||
"-z separate-code".
|
||
(gld${EMULATION_NAME}_handle_option): Handle "-z separate-code"
|
||
and "-z noseparate-code".
|
||
* genscripts.sh: Generate linker scripts for "-z separate-code".
|
||
(LD_FLAG): Set to *textonly for "-z separate-code".
|
||
* ld.texinfo: Document "-z separate-code".
|
||
* lexsup.c (elf_shlib_list_options): Add linker help messsages
|
||
for "-z separate-code" and "-z noseparate-code".
|
||
* scripttempl/elf.sc (SEPARATE_TEXT): New
|
||
(TEXT_SEGMENT_ALIGN): Likewise.
|
||
Use ${TEXT_SEGMENT_ALIGN} to align and pad text segment to
|
||
${MAXPAGESIZE}.
|
||
|
||
2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
|
||
|
||
PR ld/22649
|
||
* testsuite/ld-elf/pr22649-1.s: New file.
|
||
* testsuite/ld-elf/pr22649-2a.s: Likewise.
|
||
* testsuite/ld-elf/pr22649-2b.s: Likewise.
|
||
* testsuite/ld-elf/pr22649.msg: Likewise.
|
||
* testsuite/ld-elf/shared.exp: Run ld/22649 tests.
|
||
|
||
2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
|
||
|
||
PR ld/22677
|
||
* scripttempl/elf.sc (PREINIT_ARRAY): New.
|
||
Don't add .preinit_array for ld -r.
|
||
* testsuite/ld-elf/pr22677.d: New file.
|
||
* testsuite/ld-elf/pr22677.s: Likewise.
|
||
|
||
2018-01-11 Andrew Burgess <andrew.burgess@embecosm.com>
|
||
|
||
* ldexp.h (union etree_union): Remove defsym field.
|
||
* ldexp.c (exp_assop): Remove defsym parameter, and use of defsym
|
||
parameter.
|
||
(exp_assign): Remove passing of defsym parameter.
|
||
(exp_defsym): Likewise.
|
||
(exp_provide): Likewise.
|
||
|
||
2018-01-11 Andrew Burgess <andrew.burgess@embecosm.com>
|
||
|
||
* ldexp.c (exp_fold_tree_1): Rework condition underwhich provide
|
||
nodes are ignored in the tree walk, and move the location at which
|
||
we change provide nodes into provided nodes.
|
||
(exp_init_os): Add etree_provided.
|
||
* testsuite/ld-scripts/provide-6.d: New file.
|
||
* testsuite/ld-scripts/provide-6.t: New file.
|
||
* testsuite/ld-scripts/provide-7.d: New file.
|
||
* testsuite/ld-scripts/provide-7.t: New file.
|
||
* testsuite/ld-scripts/provide-8.d: New file.
|
||
* testsuite/ld-scripts/provide-8.t: New file.
|
||
|
||
2018-01-11 Andrew Burgess <andrew.burgess@embecosm.com>
|
||
|
||
* testsuite/ld-scripts/provide-3.d: Add xfail directive.
|
||
* testsuite/ld-scripts/provide-4.d: Use new map file name.
|
||
* testsuite/ld-scripts/provide-5.d: Use new map file name.
|
||
* testsuite/ld-scripts/provide-4-map.d: Renamed to...
|
||
* testsuite/ld-scripts/provide-4.map: ...this.
|
||
* testsuite/ld-scripts/provide-5-map.d: Renamed to...
|
||
* testsuite/ld-scripts/provide-5.map: ...this.
|
||
* testsuite/ld-scripts/provide.exp: Move xfail into provide-3.d
|
||
file, and run tests in a loop.
|
||
|
||
2018-01-11 Andrew Burgess <andrew.burgess@embecosm.com>
|
||
|
||
* ldexp.c (exp_print_tree): Use '=' instead of ',' when printing
|
||
PROVIDE statements.
|
||
* testsuite/ld-scripts/provide-4.map: Update expected output.
|
||
* testsuite/ld-scripts/provide-5.map: Likewise.
|
||
|
||
2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
|
||
|
||
PR ld/22696
|
||
* scripttempl/elf.sc: Fix the order of SHLIB_RODATA_ADDR.
|
||
|
||
2018-01-09 Jim Wilson <jimw@sifive.com>
|
||
|
||
* testsuite/ld-elf/eh-frame-hdr.d (#xfail): Delete
|
||
(#alltargets): Renamed from #target. Add shared.
|
||
* testsuite/lib/ld-lib.exp (run_dump_test): Document shared target.
|
||
Document alltargets option. Add support for alltargets option.
|
||
(istarget): Add support for shared target.
|
||
|
||
2018-01-08 Jim Wilson <jimw@sifive.com>
|
||
|
||
* testsuite/ld-riscv-elf/c-lui.d: Don't use -shared. Check for _start
|
||
instead of .text.
|
||
* testsuite/ld-riscv-elf/c-lui.s: Add _start label.
|
||
* testsuite/ld-riscv-elf/ld-riscv-elf.exp: Before __global_pointer$
|
||
tests, add call to check_shared_lib_support.
|
||
|
||
2018-01-05 Jim Wilson <jimw@sifive.com>
|
||
|
||
* testsuite/ld-riscv-elf/disas-jalr.d: New.
|
||
* testsuite/ld-riscv-elf/disas-jalr.s: New.
|
||
* testsuite/ld-riscv-elf/ld-riscv-elf.exp: Run new testcase.
|
||
|
||
* emulparams/elf32lriscv-defs.sh (GENERATE_SHLIB_SCRIPT): Move inside
|
||
case on $target, and don't set for riscv*-elf targets.
|
||
(GENERATE_PIE_SCRIPT): Likewise.
|
||
|
||
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:
|