Skip to content

Commit

Permalink
Added a basic test for now.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Sep 17, 2009
1 parent e99046a commit d0c37ed
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/hello-lib.c
@@ -0,0 +1,3 @@
#include <stdio.h>
int hello(void) { printf("hello from a shared library!\n"); return 0; }

2 changes: 2 additions & 0 deletions test/hello.c
@@ -0,0 +1,2 @@
int hello(void);
int main(void) { return hello(); }
36 changes: 36 additions & 0 deletions test/test.sh
@@ -0,0 +1,36 @@
#!/bin/sh

set -e
set -x

rm -rf cmake-build
mkdir cmake-build
cd cmake-build
cmake ../..
make -j2

gcc -o hello.so ../hello-lib.c -shared -fPIC -m32
gcc -o hello-x86 ../hello.c hello.so -m32 -Wl,-rpath,.
mv hello.so hello-x86.so

gcc -o hello.so ../hello-lib.c -shared -fPIC -m64
gcc -o hello-amd64 ../hello.c hello.so -m64 -Wl,-rpath,.
mv hello.so hello-amd64.so

./fatelf-glue hello hello-x86 hello-amd64
./fatelf-glue hello.so hello-amd64.so hello-x86.so

file ./hello
./fatelf-info ./hello

file ./hello.so
./fatelf-info ./hello.so

ldd ./hello
ldd ./hello.so

./hello

# end of test.sh ...


0 comments on commit d0c37ed

Please sign in to comment.