[all-commits] [llvm/llvm-project] 056733: [SafeStack] Use proper API to get stack guard

pzhengqc via All-commits all-commits at lists.llvm.org
Sun May 30 00:54:02 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 056733d0195b28fb1c5a7952b2adc10013edf19c
      https://github.com/llvm/llvm-project/commit/056733d0195b28fb1c5a7952b2adc10013edf19c
  Author: Pengxuan Zheng <pzheng at quicinc.com>
  Date:   2021-05-30 (Sun, 30 May 2021)

  Changed paths:
    M llvm/lib/CodeGen/SafeStack.cpp
    M llvm/test/Transforms/SafeStack/X86/abi_ssp.ll
    M llvm/test/Transforms/SafeStack/X86/ssp.ll

  Log Message:
  -----------
  [SafeStack] Use proper API to get stack guard

Using the proper API automatically sets `__stack_chk_guard` to `dso_local` if
`Reloc::Static`. This wasn't strictly necessary until recently when dso_local was
no longer implied by `TargetMachine::shouldAssumeDSOLocal` for
`__stack_chk_guard`. By using the proper API, we can avoid generating unnecessary
GOT relocations.

Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D102646




More information about the All-commits mailing list