summaryrefslogtreecommitdiff
path: root/test/lld/shared.c
diff options
context:
space:
mode:
authorSam Clegg <sbc@chromium.org>2019-04-10 11:24:00 -0700
committerGitHub <noreply@github.com>2019-04-10 11:24:00 -0700
commit39eae1d5772099282af656ee2bb0ce388e2e7268 (patch)
treed72e4be3604c5922fb5bec9fed7cecdc7af279ab /test/lld/shared.c
parent85c303de41b1e0d46cb3d389512b9ab10472391e (diff)
downloadbinaryen-39eae1d5772099282af656ee2bb0ce388e2e7268.tar.gz
binaryen-39eae1d5772099282af656ee2bb0ce388e2e7268.tar.bz2
binaryen-39eae1d5772099282af656ee2bb0ce388e2e7268.zip
Handle relocatable code in AsmConstWalker (#1992)
In relocatable code the constant offset might be relative to __memory_base.
Diffstat (limited to 'test/lld/shared.c')
-rw-r--r--test/lld/shared.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/lld/shared.c b/test/lld/shared.c
index 1d98b068b..fb5b93756 100644
--- a/test/lld/shared.c
+++ b/test/lld/shared.c
@@ -1,6 +1,8 @@
int puts(const char* str);
extern int external_var;
+void* ptr = &puts;
+
int print_message() {
puts("Hello, world");
return external_var;