OSDN Git Service

Load multiple object files and link them via RuntimeDyld in llvm-rtdyld.
authorJim Grosbach <grosbach@apple.com>
Wed, 13 Apr 2011 15:49:40 +0000 (15:49 +0000)
committerJim Grosbach <grosbach@apple.com>
Wed, 13 Apr 2011 15:49:40 +0000 (15:49 +0000)
commit4f9f41f2f9772ecd6a57800fcc8de8ec2734f33c
treeb289e5b4f94ceee90625b6754b54d1bc4378a0a5
parent0d9874b48d747298dcea7e4e6385b511c04a7842
Load multiple object files and link them via RuntimeDyld in llvm-rtdyld.

Relocations between the object modules are properly resolved, as in the
following trivial example:

$ cat t.c
int foo();
int main() {
    return foo();
}
$ cat foo.c
int foo() {
    return 65;
}
$ clang -c t.c -fno-asynchronous-unwind-tables
$ clang -c foo.c -fno-asynchronous-unwind-tables
$ llvm-rtdyld t.o foo.o ; echo $?
loaded '_main' at: 0x10015c000
65

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129448 91177308-0d34-0410-b5e6-96231b3b80d8
tools/llvm-rtdyld/llvm-rtdyld.cpp