summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/sbi/sbi_visibility.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/sbi/sbi_visibility.h b/include/sbi/sbi_visibility.h
new file mode 100644
index 00000000..e9c401c5
--- /dev/null
+++ b/include/sbi/sbi_visibility.h
@@ -0,0 +1,16 @@
+/*
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (c) 2025 SiFive
+ */
+
+#ifndef __SBI_VISIBILITY_H__
+#define __SBI_VISIBILITY_H__
+
+/*
+ * Declare all global objects with hidden visibility so access is PC-relative
+ * instead of going through the GOT.
+ */
+#pragma GCC visibility push(hidden)
+
+#endif