aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2014-05-04daily updateAlan Modra1-1/+1
2014-05-03daily updateAlan Modra1-1/+1
2014-05-02daily updateAlan Modra1-1/+1
2014-05-01daily updateAlan Modra1-1/+1
2014-04-30daily updateAlan Modra1-1/+1
2014-04-29daily updateAlan Modra1-1/+1
2014-04-28daily updateAlan Modra1-1/+1
2014-04-27daily updateAlan Modra1-1/+1
2014-04-26daily updateAlan Modra1-1/+1
2014-04-25daily updateAlan Modra1-1/+1
2014-04-24daily updateAlan Modra1-1/+1
2014-04-23Add missing break statement for case elfcpp::R_X86_64_PLTOFF64.Cary Coutant2-0/+6
gold/ PR gold/16870 * x86_64.cc (Target_x86_64::Relocate::relocate): Add missing break.
2014-04-23daily updateAlan Modra1-1/+1
2014-04-22daily updateAlan Modra1-1/+1
2014-04-21daily updateAlan Modra1-1/+1
2014-04-20daily updateAlan Modra1-1/+1
2014-04-19daily updateAlan Modra1-1/+1
2014-04-18daily updateAlan Modra1-1/+1
2014-04-17daily updateAlan Modra1-1/+1
2014-04-16fill ppc476 fixup areaAlan Modra2-2/+18
Stops false positive warnings from scanner. * elf32-ppc.c (ppc_elf_relocate_section): Fill 476 fixup area with "ba 0" rather than zeros.
2014-04-16ppc476 plt call stubsAlan Modra2-5/+56
Fuss over bctr in call stubs. * elf32-ppc.c (BA): Define (ppc_elf_link_hash_table_create): Correct default_params. (write_glink_stub): Pad small plt call stub with "ba 0" rather than "nop" for ppc476_workaround. (ppc_elf_finish_dynamic_sections): Likewise for branch table and __glink_PLTresolve. Ensure plt call stub at end of page doesn't allow fall-thru prefetch.
2014-04-16ppc476 gas warn on data in code sectionsAlan Modra4-1/+98
* config/tc-ppc.c (warn_476, last_insn, last_seg, last_subseg): New static vars. (md_longopts, md_parse_option, md_show_usage): Add --ppc476-workaround. (ppc_elf_cons_fix_check): New function. (md_assemble): Set last_insn, last_seg, last_subseg. (ppc_elf_cons, ppc_byte, md_apply_fix): Handle warn_476. * config/tc-ppc.h (TC_CONS_FIX_CHECK): Define. (ppc_elf_cons_fix_check): Declare. * read.c (cons_worker): Invoke TC_CONS_FIX_CHECK.
2014-04-16ppc476 icache workaround fix for bctrAlan Modra4-19/+98
I got the ppc476 workaround wrong. bctr (and bctrl) as the last instruction in a page can hit the icache bug if the preceding mtctr insn is close by, and the destination is in the first few instructions on the next page. This scenario can occur with code generated by gcc to implement switch statements, or in code generated to call by function pointer. To prevent the bctr problem it is also necessary to remove other instructions that otherwise would be safe. bfd/ * elf32-ppc.c (ppc_elf_relocate_section): Remove bctr from list of safe ppc476 insns at end of page. Also remove non-branch insns. Expand comments. ld/ * emultempl/ppc32elf.em (no_zero_padding, ppc_finish): New functions. (LDEMUL_FINISH): Define.
2014-04-16Fix ELF ppc32 targets that don't use ppc32elf.emAlan Modra5-5/+41
5446cbdf82892a800ed7eef563a795e75223ec52 broke powerpc-lynxos, powerpc-netware, powerpc-windiss and powerpc-vxworks. bfd/ * elf32-ppc.c (ppc_elf_link_hash_table_create): Provide default params for targets that don't use ppc32elf.em. ld/ * emulparams/elf32ppcvxworks.sh: Source plt_unwind.sh and use ppc32elf.em. * emultempl/ppc32elf.em (ppc_after_open): Don't compile for vxworks. (LDEMUL_AFTER_OPEN): Don't set for vxworks. (PARSE_AND_LIST_LONGOPTS, PARSE_AND_LIST_OPTIONS): Exclude -secure-plt, -bss-plt and -sdata-got when vxworks.
2014-04-16Add ppc476 workaround bootstrap testAlan Modra3-2/+22
I was running this by hand to test out --ppc476-workaround. Another bootstrap test doesn't take all that long, so let's add it to the testsuite. * ld-bootstrap/bootstrap.exp: Add ppc476 workaround test. * ld-bootstrap/ppc476.t: New file.
2014-04-16ppc476 workaround for ld -r fixesAlan Modra4-4/+60
This fixes the glaring error that the ppc476 workaround wasn't actually enabled for ld -r, and adjusts relocations to match moved code. bfd/ * elf32-ppc.c (ppc_elf_relocate_section): Move relocs on insns patched for ppc476 workaround. Reapply branch taken/not taken relocs. ld/ * emultempl/ppc32elf.em (ppc_after_open_output): Really enable ppc476 workaround for ld -r.
2014-04-16Enable ppc476 workaround for ld -r.Alan Modra5-12/+31
The Linux kernel builds modules using ld -r. These might need the ppc476 workaround, so enable it for ld -r if sections have sufficient alignment to tell location within a page. bfd/ * elf32-ppc.c (ppc_elf_relax_section): Enable ppc476 workaround for ld -r, when code sections are sufficiently aligned. * elf32-ppc.h (struct ppc_elf_params): Delete pagesize. Add pagesize_p2. ld/ * emultempl/ppc32elf.em (pagesize): New static var. (ppc_after_open_output): Set params.pagesize_p2 from pagesize. (PARSE_AND_LIST_ARGS_CASES): Adjust to use pagesize.
2014-04-16ppc476 icache bug workaroundAlan Modra7-348/+685
This implements a work-around for an icache bug on 476 that can cause execution of stale instructions when control falls through from one page to the next. The idea is to prevent such fall-through by replacing the last instruction on a page with a branch to a patch area containing the instruction, then branch to the next page. The patch also fixes a number of bugs in the existing support for long branch trampolines. bfd/ * elf32-ppc.c (struct ppc_elf_link_hash_table): Add params. Delete emit_stub_syms, no_tls_get_addr_opt. Update all uses. (ppc_elf_link_params): New function. (ppc_elf_create_glink): Align .glink to 64 bytes for ppc476 workaround. (ppc_elf_select_plt_layout): Remove plt_style and emit_stub_syms parameters. Use htab->params instead. (ppc_elf_tls_setup): Remove no_tls_get_addr_opt parameter. (ppc_elf_size_dynamic_sections): Align __glink_PLTresolve to 64 bytes for ppc476 workaround. (struct ppc_elf_relax_info): New. (ppc_elf_relax_section): Exclude linker created sections and those too small to hold one instruction. Don't add another branch around trampolines on later relax passes. Don't generate trampolines for undefined symbols when !relocatable, nor for plugin symbols. Allocate space for ppc476 workaround patch area. Free fixups on error return path. (ppc_elf_relocate_section): Handle ppc476 workaround patching. * elf32-ppc.h (struct ppc_elf_params): New. (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Update prototype. (ppc_elf_link_params): Declare. * section.c (SEC_INFO_TYPE_TARGET): Define. * bfd-in2.h: Regenerate. ld/ * emultempl/ppc32elf.em (no_tls_get_addr_opt, emit_stub_syms) plt_style): Delete. Adjust all refs to instead use.. (params): ..this. New variable. (ppc_after_open_output): New function. Tweak params and pass to ppc_elf_link_params. (ppc_after_open): Adjust ppc_elf_select_plt_layout call. (ppc_before_allocation): Adjust ppc_elf_tls_setup call. Enable relaxation for ppc476 workaround. (PARSE_AND_LIST_*): Add --{no-,}ppc476-workaround support. (LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS): Define.
2014-04-16daily updateAlan Modra1-1/+1
2014-04-15[AArch64] Fix off by one error in instruction relaxation mask.Marcus Shawcroft4-2/+11
The AArch64 TLSDESC to IE relaxation code uses a bit mask intended to ensure that destination register in a relaxed ldr instruction is always X0. The mask has an off by one error resulting in the most significant bit of the destination register being retained in the relaxed instruction. The issue generally appears when the compiler emits TLS accesses code under high register pressure resulting in a broken code sequence.
2014-04-15daily updateAlan Modra1-1/+1
2014-04-14daily updateAlan Modra1-1/+1
2014-04-13daily updateAlan Modra1-1/+1
2014-04-12daily updateAlan Modra1-1/+1
2014-04-11daily updateAlan Modra1-1/+1
2014-04-10daily updateAlan Modra1-1/+1
2014-04-09daily updateAlan Modra1-1/+1
2014-04-08daily updateAlan Modra1-1/+1
2014-04-07daily updateAlan Modra1-1/+1
2014-04-06daily updateAlan Modra1-1/+1
2014-04-05daily updateAlan Modra1-1/+1
2014-04-04daily updateAlan Modra1-1/+1
2014-04-03daily updateAlan Modra1-1/+1
2014-04-02daily updateAlan Modra1-1/+1
2014-04-01daily updateAlan Modra1-1/+1
2014-03-31daily updateAlan Modra1-1/+1
2014-03-30daily updateAlan Modra1-1/+1
2014-03-29daily updateAlan Modra1-1/+1
2014-03-28daily updateAlan Modra1-1/+1
2014-03-27daily updateAlan Modra1-1/+1