mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-05-07 17:06:25 +08:00
Generate compiler compatible assembly symbols
Typically when compiling a function `foo`, GCC will add a prefix `_` to the symbol, i.e., generate `_foo`. But on some platforms, the compiler will not add prefix. option `ENABLE_ASM_UNDERSCORE_PREFIX` change the default name of global symbols in assembly code.
This commit is contained in:
20
include/gmssl/asm.h
Normal file
20
include/gmssl/asm.h
Normal file
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Copyright 2014-2024 The GmSSL Project. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||
* not use this file except in compliance with the License.
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*/
|
||||
|
||||
|
||||
#ifndef GMSSL_ASM_H
|
||||
#define GMSSL_ASM_H
|
||||
|
||||
#ifdef ENABLE_ASM_UNDERSCORE_PREFIX
|
||||
# define func(foo) _##foo
|
||||
#else
|
||||
# define func(foo) foo
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user