OSDN Git Service

Initial checkin for stack protectors. Here's what it does:
authorBill Wendling <isanbard@gmail.com>
Tue, 4 Nov 2008 02:10:20 +0000 (02:10 +0000)
committerBill Wendling <isanbard@gmail.com>
Tue, 4 Nov 2008 02:10:20 +0000 (02:10 +0000)
commit2b58ce5ab4e22e796303d68fb246d4031cb5d4ca
tree5fad4d9047676afc1859ea48101fa0b81cbc5536
parent25e04788bfddc54dde7bed65302146b46089a166
Initial checkin for stack protectors. Here's what it does:

* The prologue is modified to read the __stack_chk_guard global and insert it
  onto the stack.

* The epilogue is modified to read the stored guard from the stack and compare
  it to the original __stack_chk_guard value. If they differ, then the
  __stack_chk_fail() function is called.

* The stack protector needs to be first on the stack (after the parameters) to
  catch any stack-smashing activities.

Front-end support will follow after a round of beta testing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58673 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/Passes.h
lib/CodeGen/LLVMTargetMachine.cpp
lib/CodeGen/StackProtector.cpp [new file with mode: 0644]