diff options
author | mortimer <mortimer@cvs.openbsd.org> | 2019-10-25 00:40:57 +0000 |
---|---|---|
committer | mortimer <mortimer@cvs.openbsd.org> | 2019-10-25 00:40:57 +0000 |
commit | cf9ee5b111370eab06b628fd3b3de1f4269c890c (patch) | |
tree | 16971e12c24ae3c67535f404c0f3cd52e86b3181 /gnu/usr.bin | |
parent | 3eb9ecd525f93e5f4e45b006bbf90e0accd86cea (diff) |
Add retguard for octeon/mips64.
For this architecture we use separate retguard prologue and epilogue code
for static or PIC code. In the PIC case we use some additional code before
the retguard epilogue to recover the function start address and the GOT
pointer in order to get the per-function random cookie. Much thanks to
visa@ for suggestions and advice making it all work.
ok deraadt@ visa@
Diffstat (limited to 'gnu/usr.bin')
-rw-r--r-- | gnu/usr.bin/clang/Makefile.inc | 5 | ||||
-rw-r--r-- | gnu/usr.bin/clang/libLLVMMipsCodeGen/Makefile | 3 |
2 files changed, 5 insertions, 3 deletions
diff --git a/gnu/usr.bin/clang/Makefile.inc b/gnu/usr.bin/clang/Makefile.inc index f89abdd6330..d5839ada0e2 100644 --- a/gnu/usr.bin/clang/Makefile.inc +++ b/gnu/usr.bin/clang/Makefile.inc @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.inc,v 1.15 2019/07/11 11:31:09 visa Exp $ +# $OpenBSD: Makefile.inc,v 1.16 2019/10/25 00:40:56 mortimer Exp $ LLVM_SRCS?= ${.CURDIR}/../../../llvm @@ -25,7 +25,8 @@ CPPFLAGS+= -DNDEBUG # Disable some protections in the compiler to regain performance. .if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" || \ - ${MACHINE_ARCH} == "aarch64" + ${MACHINE_ARCH} == "mips64" || ${MACHINE_ARCH} == "mips64el" || \ + ${MACHINE_ARCH} == "aarch64" CXXFLAGS+= -fno-ret-protector .endif .if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" diff --git a/gnu/usr.bin/clang/libLLVMMipsCodeGen/Makefile b/gnu/usr.bin/clang/libLLVMMipsCodeGen/Makefile index f9a12e14d55..a6bcdc73498 100644 --- a/gnu/usr.bin/clang/libLLVMMipsCodeGen/Makefile +++ b/gnu/usr.bin/clang/libLLVMMipsCodeGen/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.6 2019/06/23 22:07:41 patrick Exp $ +# $OpenBSD: Makefile,v 1.7 2019/10/25 00:40:56 mortimer Exp $ LIB= LLVMMipsCodeGen NOPROFILE= @@ -36,6 +36,7 @@ SRCS+= MicroMipsSizeReduction.cpp \ MipsPreLegalizerCombiner.cpp \ MipsRegisterBankInfo.cpp \ MipsRegisterInfo.cpp \ + MipsReturnProtectorLowering.cpp \ MipsSEFrameLowering.cpp \ MipsSEInstrInfo.cpp \ MipsSEISelDAGToDAG.cpp \ |