[LLVMdev] gcroot + `section not found for addresss ...' ???

Nicolas Ojeda Bar nojb at math.harvard.edu
Sun Apr 10 06:06:08 PDT 2011


Hi,

If I type

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

declare i8* @malloc(i64)

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

in test.ll

and then do

> llc test.ll
> gcc test.s

I get the error

ld: in /var/folders/Ea/EakEx6b+GBSo6cUn2AnFZk+++TI/-Tmp-//cc5d3RCx.o, section not found for address 0x64200E00000004CD

If I remove line containing malloc and the line after that, no such error happens. If I remove
the gcroot line then no such error happens.

Any hints as to what this error means would be great!

Cheers,
N



More information about the llvm-dev mailing list