diff options
author | Michael Brown <mcb30@ipxe.org> | 2015-03-03 15:51:33 +0000 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2015-03-03 15:51:33 +0000 |
commit | 30d356b4555dd6a658bd4d8ecd08a9b5867072ea (patch) | |
tree | 9d67248a1449cb75344e587ab3793ce59f1b7b1f /src | |
parent | b2f38da88811ebb491b3667c412ca703063e5fce (diff) | |
download | ipxe-30d356b4555dd6a658bd4d8ecd08a9b5867072ea.tar.gz |
[build] Remove unused IMPORT_SYMBOL() and EXPORT_SYMBOL() macros
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/include/compiler.h | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/src/include/compiler.h b/src/include/compiler.h index 611c5a23f..a780d3efe 100644 --- a/src/include/compiler.h +++ b/src/include/compiler.h @@ -97,9 +97,6 @@ * necessary to satisfy the reference. However, the undefined symbol * is not referenced in any relocations, so the link can still succeed * if no file contains it. - * - * A symbol passed to this macro may not be referenced anywhere - * else in the file. If you want to do that, see IMPORT_SYMBOL(). */ #ifdef ASSEMBLY #define REQUEST_SYMBOL( _sym ) \ @@ -109,51 +106,6 @@ __asm__ ( ".equ\t__need_" #_sym ", " #_sym ) #endif /* ASSEMBLY */ -/** Set up a symbol to be usable in another file by IMPORT_SYMBOL() - * - * The symbol must already be marked as global. - */ -#define EXPORT_SYMBOL( _sym ) PROVIDE_SYMBOL ( __export_ ## _sym ) - -/** Make a symbol usable to this file if available at link time - * - * If no file passed to the linker contains the symbol, it will have - * @c NULL value to future uses. Keep in mind that the symbol value is - * really the @e address of a variable or function; see the code - * snippet below. - * - * In C using IMPORT_SYMBOL, you must specify the declaration as the - * second argument, for instance - * - * @code - * IMPORT_SYMBOL ( my_func, int my_func ( int arg ) ); - * IMPORT_SYMBOL ( my_var, int my_var ); - * - * void use_imports ( void ) { - * if ( my_func && &my_var ) - * my_var = my_func ( my_var ); - * } - * @endcode - * - * GCC considers a weak declaration to override a strong one no matter - * which comes first, so it is safe to include a header file declaring - * the imported symbol normally, but providing the declaration to - * IMPORT_SYMBOL is still required. - * - * If no EXPORT_SYMBOL declaration exists for the imported symbol in - * another file, the behavior will be most likely be identical to that - * for an unavailable symbol. - */ -#ifdef ASSEMBLY -#define IMPORT_SYMBOL( _sym ) \ - REQUEST_SYMBOL ( __export_ ## _sym ) ; \ - .weak _sym -#else /* ASSEMBLY */ -#define IMPORT_SYMBOL( _sym, _decl ) \ - REQUEST_SYMBOL ( __export_ ## _sym ) ; \ - extern _decl __attribute__ (( weak )) -#endif - /** @} */ /** |