Replace .pushsection directives (#30)

This commit is contained in:
Justine Tunney 2021-01-10 13:30:48 -08:00
parent 28316891e9
commit 04f1d89f84
16 changed files with 171 additions and 10422 deletions

View file

@ -8,9 +8,9 @@
* Teleports code fragment inside _init().
*/
#define INITIALIZER(PRI, NAME, CODE) \
asm(".pushsection .init." #PRI "." #NAME ",\"ax\",@progbits\n\t" \
asm(".section .init." #PRI "." #NAME ",\"ax\",@progbits\n\t" \
"call\t" #NAME "\n\t" \
".popsection"); \
".previous"); \
textstartup optimizesize void NAME(char *rdi, const char *rsi) { \
CODE; \
asm volatile("" : /* no outputs */ : "D"(rdi), "S"(rsi)); \