summaryrefslogtreecommitdiff
path: root/test/lld/shared.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/lld/shared.cpp')
-rw-r--r--test/lld/shared.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/lld/shared.cpp b/test/lld/shared.cpp
new file mode 100644
index 000000000..51bdee833
--- /dev/null
+++ b/test/lld/shared.cpp
@@ -0,0 +1,10 @@
+extern "C" int puts(const char* str);
+extern "C" int external_var;
+
+int print_message() {
+ puts("Hello, world");
+ return external_var;
+}
+
+void* ptr_puts = (void*)&puts;
+void* ptr_local_func = (void*)&print_message;