Logo
Explore Help
Sign In
fluencelabs/musl
1
0
Fork 0
You've already forked musl
mirror of https://github.com/fluencelabs/musl synced 2025-05-12 23:37:28 +00:00
Code Issues Projects Releases Wiki Activity
musl/arch/sh/crt_arch.h

13 lines
258 B
C
Raw Normal View History

superh port
2013-10-05 05:13:18 -05:00
__asm__("\
.global _start \n\
_start: \n\
mov r15, r4 \n\
mov #-16, r0 \n\
and r0, r15 \n\
bsr __cstart \n\
nop \n\
");
superh: fix dynamic linking of __fpscr_values Applications ended up with copy relocations for this array, which resulted in libc's references to this array pointing to the application's copy. The dynamic linker, however, can require this array before the application is relocated, and therefore before the application's copy of this array is initialized. This resulted in garbage being loaded into FPSCR before executing main, which violated the ABI. We fix this by putting the array in crt1 and making the libc copy private. This prevents libc's reference to the array from pointing to an uninitialized copy in the application.
2014-03-16 16:17:28 -05:00
/* used by gcc for switching the FPU between single and double precision */
const unsigned long __fpscr_values[2] = { 0, 0x80000 };
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.7 Page: 90ms Template: 3ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API