-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ebc5e85
commit 5f4a641
Showing
4 changed files
with
22 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#ifndef GOTCHA_SYM_MACRO_H | ||
#define GOTCHA_SYM_MACRO_H | ||
#ifdef __has_attribute | ||
#if __has_attribute(__symver__) | ||
#define SYMVER_ATTRIBUTE(sym, symver) __attribute__((__symver__(#symver))) | ||
#endif | ||
#endif | ||
#ifndef SYMVER_ATTRIBUTE | ||
#define SYMVER_ATTRIBUTE(sym, symver) \ | ||
__asm__("\t.globl __" #sym \ | ||
"\n" \ | ||
"\t.equiv __" #sym "," #sym \ | ||
"\n" \ | ||
"\t.symver __" #sym "," #symver); | ||
#endif | ||
#endif // GOTCHA_SYM_MACRO_H |