sim: Check __ELF__ for .type/.size directives

Mach-O assembler doesn't have them either.
This commit is contained in:
YAMAMOTO Takashi 2020-01-27 23:59:20 +09:00 committed by Alin Jerpelea
parent aa8aadf18e
commit 69a8b9721c
2 changed files with 8 additions and 8 deletions

View File

@ -55,7 +55,7 @@
.text
.globl SYMBOL(up_setjmp)
#ifndef __CYGWIN__
#ifdef __ELF__
.type SYMBOL(up_setjmp), @function
#endif
SYMBOL(up_setjmp):
@ -86,11 +86,11 @@ SYMBOL(up_setjmp):
xorl %eax, %eax
ret
#ifndef __CYGWIN__
#ifdef __ELF__
.size SYMBOL(up_setjmp), . - SYMBOL(up_setjmp)
#endif
.globl SYMBOL(up_longjmp)
#ifndef __CYGWIN__
#ifdef __ELF__
.type SYMBOL(up_longjmp), @function
#endif
SYMBOL(up_longjmp):
@ -112,7 +112,7 @@ SYMBOL(up_longjmp):
/* Jump to saved PC. */
jmp *%edx
#ifndef __CYGWIN__
#ifdef __ELF__
.size SYMBOL(up_longjmp), . - SYMBOL(up_longjmp)
#endif

View File

@ -91,7 +91,7 @@
.text
.align 4
.globl SYMBOL(up_setjmp)
#ifndef __CYGWIN__
#ifdef __ELF__
.type SYMBOL(up_setjmp), @function
#endif
SYMBOL(up_setjmp):
@ -128,13 +128,13 @@ SYMBOL(up_setjmp):
ret
#ifndef __CYGWIN__
#ifdef __ELF__
.size SYMBOL(up_setjmp), . - SYMBOL(up_setjmp)
#endif
.align 4
.globl SYMBOL(up_longjmp)
#ifndef __CYGWIN__
#ifdef __ELF__
.type SYMBOL(up_longjmp), @function
#endif
SYMBOL(up_longjmp):
@ -157,7 +157,7 @@ SYMBOL(up_longjmp):
jmp *JB_RSI(REGS) /* Save 8: rsi */
#ifndef __CYGWIN__
#ifdef __ELF__
.size SYMBOL(up_longjmp), . - SYMBOL(up_longjmp)
#endif