[LLVMdev] shadow-stack broken?

Nicolas Ojeda Bar nojb at math.harvard.edu
Sun Jul 31 10:50:53 PDT 2011


I have been trying all day long to get the following
5 line file to compile:


declare void @llvm.gcroot (i8**, i8*)

define i32 @main() gc "shadow-stack" {
   %0 = alloca i8*
   %1 = call i8* @malloc(i64 10)
   store i8* %1, i8** %0
   call void @llvm.gcroot(i8** %0, i8* null)
   ret i32 0

declare i8* @malloc (i64)

If I do

> llc test.ll

I get

ld: in /var/folders/89/p11x49r14dgd12j0sj1l6jkw0000gn/T//cc2yjCje.o, 
sectionForAddress(0x5200E00000004CD) address not in any section for 
architecture x86_64

If anyone knows how to get _any_ function that uses @gcroot and
shadow-stack to compile, that would be great...


More information about the llvm-dev mailing list