mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-07 11:48:30 +00:00
Replace .pushsection directives (#30)
This commit is contained in:
parent
28316891e9
commit
04f1d89f84
16 changed files with 171 additions and 10422 deletions
|
@ -776,15 +776,15 @@ typedef uint64_t uintmax_t;
|
|||
do { \
|
||||
_Static_assert(!__builtin_types_compatible_p(typeof(SYMBOL), char[]), \
|
||||
"Please YOINK(symbol), not YOINK(\"symbol\")"); \
|
||||
asm(".pushsection .yoink\n\t" \
|
||||
asm(".section .yoink\n\t" \
|
||||
"nop\t%a0\n\t" \
|
||||
".popsection" \
|
||||
".previous" \
|
||||
: /* no outputs */ \
|
||||
: "X"(SYMBOL)); \
|
||||
} while (0)
|
||||
|
||||
#define STATIC_YOINK(SYMBOLSTR) \
|
||||
asm(".pushsection .yoink\n\tnopl\t\"" SYMBOLSTR "\"\n\t.popsection")
|
||||
asm(".section .yoink\n\tnopl\t\"" SYMBOLSTR "\"\n\t.previous")
|
||||
|
||||
#if !defined(IM_FEELING_NAUGHTY) && !defined(__STRICT_ANSI__)
|
||||
#define STATIC_YOINK_SOURCE(PATH) STATIC_YOINK(PATH)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue