diff --git a/testdupsym/compile.sh b/testdupsym/compile.sh index bed96149bc81f98e0e44307f0c737162f69c854c..4e4b42e122c1121167db5a59c22b94e5faeca296 100644 --- a/testdupsym/compile.sh +++ b/testdupsym/compile.sh @@ -1,4 +1,4 @@ gcc -shared -o libl1.so lib1.c gcc -shared -o libl2.so lib2.c -gcc -o main main.c -L. -ll1 -ll2 +gcc -o main main.c -L. -ll2 -ll1 diff --git a/testdupsym/lib1.c b/testdupsym/lib1.c index b70867fb2b6f6d154c632086f195572deb071740..2211720ba5561ef3fa1fa45cdb63d3303f44f088 100644 --- a/testdupsym/lib1.c +++ b/testdupsym/lib1.c @@ -3,3 +3,7 @@ int testfun(int x) return x+1; } +int abc(int x) +{ + return x+11; +} diff --git a/testdupsym/lib2.c b/testdupsym/lib2.c index 00ca0e66a290defa1c204d7f1fb00218745a57ab..3ef77f71910f26c4f1deda56e1726144cc3cfe60 100644 --- a/testdupsym/lib2.c +++ b/testdupsym/lib2.c @@ -3,3 +3,7 @@ int testfun(int x) return x+2; } +int def(int x) +{ + return x+22; +} diff --git a/testdupsym/main.c b/testdupsym/main.c index 1757ac7901e86a6da800ccef285ae43c125e5275..4b9c1db401173685c6b39aae31306403e65edade 100644 --- a/testdupsym/main.c +++ b/testdupsym/main.c @@ -1,10 +1,14 @@ #include <stdio.h> int testfun(int); +int abc(int); +int def(int); int main(void) { printf("%d\n", testfun(42)); + printf("%d\n", abc(42)); + printf("%d\n", def(42)); return 0; }