[klee-dev] .equ directive handling & KLEE linking process

Nowack, Martin m.nowack at imperial.ac.uk
Mon Dec 9 17:01:48 GMT 2019


Hi,


Please have a look at the following discussion:

https://github.com/klee/klee/pull/70

Thinks have changed upstream. It could be worth to reconsider it.

Best,

Martin

On 22.11.19 07:23, Gleb Popov wrote:

Hello.

I'm working on adding support for following module-level inline asm in KLEE:

module asm ".weak foo"
module asm ".equ foo, foo_stub"

@foo = external global i32
@foo_stub = global i32 0

I've added code to KModule to parse such asm statements and do
@foo->replaceAllUsesWith(@foo_stub). However, it turned out that KLEE
doesn't link a bitcode module containing definition of @foo_stub, because
it uses "smart" linking procedure that decides that the module is "unused"
and there is no point linking it.

Before hacking on GetAllUndefinedSymbols() from ModuleUtil.cpp I checked
what's current state of Linker in LLVM itself, since GetAllUndefinedSymbols
was borrowed from there. It turned out, that there is no such function
anymore.

Why can't we just use plain LLVM Linker class to linker .bca contents?





_______________________________________________
klee-dev mailing list
klee-dev at imperial.ac.uk<mailto:klee-dev at imperial.ac.uk>
https://mailman.ic.ac.uk/mailman/listinfo/klee-dev

-------------- next part --------------
HTML attachment scrubbed and removed


More information about the klee-dev mailing list