From bd4243c5195fa735a53e7a84f9553ef3ec0cadd3 Mon Sep 17 00:00:00 2001 From: Davide Italiano Date: Thu, 9 Jun 2016 14:23:38 +0000 Subject: [CodeGen] Change getSDagStackGuard to get an internal sym. Fixes a crash in the backend during an LTO build of rtld(1) in FreeBSD. llvm-svn: 272262 --- llvm/lib/CodeGen/TargetLoweringBase.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/CodeGen') diff --git a/llvm/lib/CodeGen/TargetLoweringBase.cpp b/llvm/lib/CodeGen/TargetLoweringBase.cpp index 67b2ee96283..52ab7cf3763 100644 --- a/llvm/lib/CodeGen/TargetLoweringBase.cpp +++ b/llvm/lib/CodeGen/TargetLoweringBase.cpp @@ -1831,7 +1831,7 @@ void TargetLoweringBase::insertSSPDeclarations(Module &M) const { // Currently only support "standard" __stack_chk_guard. // TODO: add LOAD_STACK_GUARD support. Value *TargetLoweringBase::getSDagStackGuard(const Module &M) const { - return M.getGlobalVariable("__stack_chk_guard"); + return M.getGlobalVariable("__stack_chk_guard", true); } Value *TargetLoweringBase::getSSPStackGuardCheck(const Module &M) const { -- cgit v1.2.3