configs: Resync with savedefconfig
[oweals/u-boot.git] / include / binman_sym.h
index 3999b26d8d4fa7cbd543c93e7d9d27307b682172..ffb7c15798a7522a2fbb171fcfc9d9075035ee35 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
 /*
  * Symbol access for symbols set up by binman as part of the build.
  *
@@ -5,8 +6,6 @@
  * assembled by binman.
  *
  * Copyright (c) 2017 Google, Inc
- *
- * SPDX-License-Identifier:     GPL-2.0+
  */
 
 #ifndef __BINMAN_SYM_H
        _type binman_symname(_entry_name, _prop_name) \
                __attribute__((aligned(4), unused, section(".binman_sym")))
 
+/**
+ * binman_sym_extern() - Declare a extern symbol that will be used at run-time
+ *
+ * @_type: Type f the symbol (e.g. unsigned long)
+ * @entry_name: Name of the entry to look for (e.g. 'u_boot_spl')
+ * @_prop_name: Property value to get from that entry (e.g. 'pos')
+ */
+#define binman_sym_extern(_type, _entry_name, _prop_name) \
+       extern _type binman_symname(_entry_name, _prop_name) \
+               __attribute__((aligned(4), unused, section(".binman_sym")))
+
 /**
  * binman_sym_declare_optional() - Declare an optional symbol
  *
@@ -73,6 +83,8 @@
 
 #define binman_sym_declare_optional(_type, _entry_name, _prop_name)
 
+#define binman_sym_extern(_type, _entry_name, _prop_name)
+
 #define binman_sym(_type, _entry_name, _prop_name) BINMAN_SYM_MISSING
 
 #endif /* BINMAN */