mirror of
https://github.com/tobast/libunwind-eh_elf.git
synced 2024-11-22 07: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 HIDDEN
|
||||||
# define PROTECTED
|
# define PROTECTED
|
||||||
# endif
|
# endif
|
||||||
|
# define WEAK __attribute__((weak))
|
||||||
# if (__GNUC__ >= 3)
|
# if (__GNUC__ >= 3)
|
||||||
# define likely(x) __builtin_expect ((x), 1)
|
# define likely(x) __builtin_expect ((x), 1)
|
||||||
# define unlikely(x) __builtin_expect ((x), 0)
|
# 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 ALIAS(name)
|
||||||
# define HIDDEN
|
# define HIDDEN
|
||||||
# define PROTECTED
|
# define PROTECTED
|
||||||
|
# define WEAK
|
||||||
# define likely(x) (x)
|
# define likely(x) (x)
|
||||||
# define unlikely(x) (x)
|
# define unlikely(x) (x)
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -76,6 +76,6 @@ unw_backtrace (void **buffer, int size)
|
||||||
}
|
}
|
||||||
|
|
||||||
extern int 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 */
|
#endif /* !UNW_REMOTE_ONLY */
|
||||||
|
|
Loading…
Reference in a new issue