forked from tpm2-software/tpm2-tss
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c1f4dc3
commit da610a0
Showing
13 changed files
with
67 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
Empty file.
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
lib_LTLIBRARIES = libmyfu1.la | ||
libmyfu1_la_SOURCES = myfu1.c | ||
libmyfu1_la_CFLAGS = -fPIC | ||
libmyfu1_la_LDFLAGS = -version-info 1:0:0 -rpath /usr/local/lib | ||
lib_LTLIBRARIES += libmyfu2.la | ||
libmyfu2_la_SOURCES = myfu2.c | ||
libmyfu2_la_CFLAGS = -fPIC | ||
libmyfu2_la_LDFLAGS = -version-info 1:0:0 -rpath /usr/local/lib | ||
|
||
main_LDADD = libmyfu1.la libmyfu2.la -ldl | ||
bin_PROGRAMS = main | ||
main_SOURCES = main.c | ||
main_LDADD += libmyfu1.la | ||
main_LDADD += libmyfu2.la |
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
AC_INIT([MyLib], [1.0], [[email protected]]) | ||
AM_INIT_AUTOMAKE | ||
AC_PROG_CC | ||
LT_INIT | ||
AC_CONFIG_FILES([Makefile]) | ||
AC_OUTPUT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#include <stdio.h> | ||
#include <dlfcn.h> | ||
|
||
void myfu() { | ||
printf("Hello from main myfu!\n"); | ||
} | ||
|
||
|
||
int main() { | ||
void *handle; | ||
handle = dlopen("libmyfu2.so", RTLD_NOW); | ||
myfu(); | ||
void (*myfu)() = (void (*)()) dlsym(handle, "myfu"); | ||
char *error = dlerror(); | ||
if (error) { | ||
fprintf(stderr, "Error finding symbol 'myfu': %s\n", error); | ||
dlclose(handle); | ||
return 1; | ||
} | ||
printf("Calling myfu:\n"); | ||
myfu(); | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#include <stdio.h> | ||
|
||
// Define the external function | ||
void myfu() { | ||
printf("Hello from so myfu!\n"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#include <stdio.h> | ||
|
||
// Define the external function | ||
void myfu() { | ||
printf("Hello from so1 myfu!\n"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#include <stdio.h> | ||
|
||
// Define the external function | ||
void myfu() { | ||
printf("Hello from so2 myfu!\n"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
aclocal | ||
autoconf | ||
automake --add-missing | ||
./configure --disable-dependency-tracking | ||
gmake -j | ||
./main |