diff options
Diffstat (limited to 'test/elf_parser')
-rw-r--r-- | test/elf_parser/Makefile | 12 | ||||
-rw-r--r-- | test/elf_parser/test.cc | 7 |
2 files changed, 19 insertions, 0 deletions
diff --git a/test/elf_parser/Makefile b/test/elf_parser/Makefile new file mode 100644 index 0000000..ea726bd --- /dev/null +++ b/test/elf_parser/Makefile @@ -0,0 +1,12 @@ +all: libtest-32.h libtest-64.h + +libtest-%.h: libtest-%.so + xxd -i $^ > $@ + sed -i 's#^unsigned#// NOLINTNEXTLINE\nunsigned#' $@ + clang-format -i $@ + +libtest-%.so: test.cc + $(CC) -m$* -shared -fPIC -o $@ $^ + +clean: + $(RM) libtest-*.so libtest-*.h diff --git a/test/elf_parser/test.cc b/test/elf_parser/test.cc new file mode 100644 index 0000000..7cc71dd --- /dev/null +++ b/test/elf_parser/test.cc @@ -0,0 +1,7 @@ +extern "C" int exported_func_c(int x) { + return x + 1; +} + +int exported_func_cpp(int x) { + return x + 1; +} |