mirror of
https://github.com/tobast/libunwind-eh_elf.git
synced 2024-11-25 08:37:38 +01:00
Define and use `WEAK'
This commit is contained in:
parent
e3e49dc28a
commit
e0653f9e3a
2 changed files with 3 additions and 1 deletions
|
@ -45,6 +45,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
|||
# define HIDDEN
|
||||
# define PROTECTED
|
||||
# endif
|
||||
# define WEAK __attribute__((weak))
|
||||
# if (__GNUC__ >= 3)
|
||||
# define likely(x) __builtin_expect ((x), 1)
|
||||
# define unlikely(x) __builtin_expect ((x), 0)
|
||||
|
@ -61,6 +62,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
|||
# define ALIAS(name)
|
||||
# define HIDDEN
|
||||
# define PROTECTED
|
||||
# define WEAK
|
||||
# define likely(x) (x)
|
||||
# define unlikely(x) (x)
|
||||
#endif
|
||||
|
|
|
@ -76,6 +76,6 @@ unw_backtrace (void **buffer, int size)
|
|||
}
|
||||
|
||||
extern int backtrace (void **buffer, int size)
|
||||
__attribute__((weak, alias("unw_backtrace")));
|
||||
WEAK __attribute__((alias("unw_backtrace")));
|
||||
|
||||
#endif /* !UNW_REMOTE_ONLY */
|
||||
|
|
Loading…
Reference in a new issue