fix aliases not using underscore prefixes in assembler code

long double functions, that are identical to double functions, usually
define themselves as weak references to their double counterpart.
However, the piece of assembler written for that produces

  .equ <name>l, <name>

but on SuperH C-exported symbols have leading underscores. This commit
adds an SH3 exception to use instead

  .equ _<name>l, _<name>

which fixes a number of long double functions.
This commit is contained in:
Lephenixnoir 2021-05-20 21:27:38 +02:00
parent 07a9090c98
commit d241d4f77a
Signed by: Lephenixnoir
GPG Key ID: 1BBA026E13FC0495
1 changed files with 6 additions and 0 deletions

View File

@ -34,9 +34,15 @@
#else
#ifdef __ELF__
#ifdef __STDC__
#if defined(__sh3__)
#define openlibm_weak_reference(sym,alias) \
__asm__(".weak _" #alias); \
__asm__(".equ _" #alias ", _" #sym)
#else
#define openlibm_weak_reference(sym,alias) \
__asm__(".weak " #alias); \
__asm__(".equ " #alias ", " #sym)
#endif /* __sh3__ */
#ifdef __warn_references
#define openlibm_warn_references(sym,msg) __warn_references(sym,msg)
#else