summaryrefslogtreecommitdiff
path: root/libunwind
diff options
context:
space:
mode:
authorMartin Storsjo <martin@martin.st>2018-12-11 07:34:14 +0000
committerMartin Storsjo <martin@martin.st>2018-12-11 07:34:14 +0000
commit09350339aa7f2d9046aec6881d47d438fe057edd (patch)
tree1ade50fd7ddc10a8e9ae276abe980e8e2b0e964c /libunwind
parente0d6168d2ab44261630d1b29036c9cc6468a8c18 (diff)
Don't export assembly functions when function visibility annotations are disabled
Patch by Peiyuan Song! Differential Revision: https://reviews.llvm.org/D55537
Diffstat (limited to 'libunwind')
-rw-r--r--libunwind/src/assembly.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/libunwind/src/assembly.h b/libunwind/src/assembly.h
index e98ad40f14f..cc22c79d0f9 100644
--- a/libunwind/src/assembly.h
+++ b/libunwind/src/assembly.h
@@ -76,7 +76,11 @@
.section .drectve,"yn" SEPARATOR \
.ascii "-export:", #name, "\0" SEPARATOR \
.text
+#if defined(_LIBUNWIND_DISABLE_VISIBILITY_ANNOTATIONS)
+#define EXPORT_SYMBOL(name)
+#else
#define EXPORT_SYMBOL(name) EXPORT_SYMBOL2(name)
+#endif
#define HIDDEN_SYMBOL(name)
#define NO_EXEC_STACK_DIRECTIVE