authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2024-11-23 02:45:57+01:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2024-11-23 03:10:58+01:00
log67e524da54a934d6e14b1f02f954b16b7c2c5078
treec0545014f98c8229714067219e05f4cf29baab0f
parent57e4fa14bb20a1f0006b14f3407ecdb20ab78120
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

musl: Update libc.S against musl 1.2.5.

All supported architectures included except for x32 (currently broken).

1 files changed, 109 insertions(+), 51 deletions(-)

lib/libc/musl/libc.S+109-51
......@@ -7,6 +7,13 @@
77#define PTR_SIZE_BYTES 4
88#define PTR2_SIZE_BYTES 8
99#endif
10
11#ifdef TIME32
12#define WEAKTIME64 .globl
13#else
14#define WEAKTIME64 .weak
15#endif
16
1017.bss
1118.weak ___environ
1219.type ___environ, %object;
......@@ -168,18 +175,64 @@ _IO_putc:
168175.weak _IO_putc_unlocked
169176.type _IO_putc_unlocked, %function;
170177_IO_putc_unlocked:
171#if !defined(ARCH_riscv64) && !defined(ARCH_mips) && !defined(ARCH_mips64) && !defined(ARCH_x86_64) && !defined(ARCH_powerpc) && !defined(ARCH_powerpc64) && !defined(ARCH_aarch64) && !defined(ARCH_riscv32) && !defined(ARCH_loongarch64)
178#ifdef ARCH_i386
172179.globl ___tls_get_addr
173180.type ___tls_get_addr, %function;
174181___tls_get_addr:
175182#endif
176#ifdef PTR32
183#ifdef TIME32
177184.globl __adjtime64
178185.type __adjtime64, %function;
179186__adjtime64:
180187.globl __adjtimex_time64
181188.type __adjtimex_time64, %function;
182189__adjtimex_time64:
190#endif
191#ifdef ARCH_arm
192.globl __aeabi_atexit
193.type __aeabi_atexit, %function;
194__aeabi_atexit:
195.globl __aeabi_memclr
196.type __aeabi_memclr, %function;
197__aeabi_memclr:
198.globl __aeabi_memclr4
199.type __aeabi_memclr4, %function;
200__aeabi_memclr4:
201.globl __aeabi_memclr8
202.type __aeabi_memclr8, %function;
203__aeabi_memclr8:
204.globl __aeabi_memcpy
205.type __aeabi_memcpy, %function;
206__aeabi_memcpy:
207.globl __aeabi_memcpy4
208.type __aeabi_memcpy4, %function;
209__aeabi_memcpy4:
210.globl __aeabi_memcpy8
211.type __aeabi_memcpy8, %function;
212__aeabi_memcpy8:
213.globl __aeabi_memmove
214.type __aeabi_memmove, %function;
215__aeabi_memmove:
216.globl __aeabi_memmove4
217.type __aeabi_memmove4, %function;
218__aeabi_memmove4:
219.globl __aeabi_memmove8
220.type __aeabi_memmove8, %function;
221__aeabi_memmove8:
222.globl __aeabi_memset
223.type __aeabi_memset, %function;
224__aeabi_memset:
225.globl __aeabi_memset4
226.type __aeabi_memset4, %function;
227__aeabi_memset4:
228.globl __aeabi_memset8
229.type __aeabi_memset8, %function;
230__aeabi_memset8:
231.globl __aeabi_read_tp
232.type __aeabi_read_tp, %function;
233__aeabi_read_tp:
234#endif
235#ifdef TIME32
183236.globl __aio_suspend_time64
184237.type __aio_suspend_time64, %function;
185238__aio_suspend_time64:
......@@ -187,12 +240,12 @@ __aio_suspend_time64:
187240.globl __assert_fail
188241.type __assert_fail, %function;
189242__assert_fail:
190#if !defined(ARCH_riscv64) && !defined(ARCH_x86) && !defined(ARCH_x86_64) && !defined(ARCH_powerpc) && !defined(ARCH_powerpc64) && !defined(ARCH_aarch64) && !defined(ARCH_riscv32) && !defined(ARCH_loongarch64)
243#ifdef FAMILY_mips
191244.globl __cachectl
192245.type __cachectl, %function;
193246__cachectl:
194247#endif
195#ifdef PTR32
248#ifdef TIME32
196249.globl __clock_adjtime64
197250.type __clock_adjtime64, %function;
198251__clock_adjtime64:
......@@ -236,7 +289,7 @@ __cxa_atexit:
236289.globl __cxa_finalize
237290.type __cxa_finalize, %function;
238291__cxa_finalize:
239#ifdef PTR32
292#ifdef TIME32
240293.globl __difftime64
241294.type __difftime64, %function;
242295__difftime64:
......@@ -247,7 +300,12 @@ __dls2b:
247300.globl __dls3
248301.type __dls3, %function;
249302__dls3:
250#ifdef PTR32
303#ifdef FAMILY_mips
304.globl __dlstart
305.type __dlstart, %function;
306__dlstart:
307#endif
308#ifdef TIME32
251309.globl __dlsym_time64
252310.type __dlsym_time64, %function;
253311__dlsym_time64:
......@@ -312,7 +370,7 @@ __fseterr:
312370.globl __fsetlocking
313371.type __fsetlocking, %function;
314372__fsetlocking:
315#ifdef PTR32
373#ifdef TIME32
316374.weak __fstat_time64
317375.type __fstat_time64, %function;
318376__fstat_time64:
......@@ -347,7 +405,7 @@ __fxstatat:
347405.weak __getdelim
348406.type __getdelim, %function;
349407__getdelim:
350#ifdef PTR32
408#ifdef TIME32
351409.globl __getitimer_time64
352410.type __getitimer_time64, %function;
353411__getitimer_time64:
......@@ -364,6 +422,11 @@ __gmtime64:
364422.type __gmtime64_r, %function;
365423__gmtime64_r:
366424#endif
425#ifdef ARCH_arm
426.globl __gnu_Unwind_Find_exidx
427.type __gnu_Unwind_Find_exidx, %function;
428__gnu_Unwind_Find_exidx:
429#endif
367430.globl __h_errno_location
368431.type __h_errno_location, %function;
369432__h_errno_location:
......@@ -490,7 +553,7 @@ __libc_current_sigrtmin:
490553.globl __libc_start_main
491554.type __libc_start_main, %function;
492555__libc_start_main:
493#ifdef PTR32
556#ifdef TIME32
494557.globl __localtime64
495558.type __localtime64, %function;
496559__localtime64:
......@@ -498,12 +561,12 @@ __localtime64:
498561.type __localtime64_r, %function;
499562__localtime64_r:
500563#endif
501#if !defined(ARCH_mips) && !defined(ARCH_mips64) && !defined(ARCH_x86) && !defined(ARCH_x86_64) && !defined(ARCH_powerpc) && !defined(ARCH_powerpc64) && !defined(ARCH_aarch64) && !defined(ARCH_loongarch64)
564#ifdef FAMILY_riscv
502565.globl __longjmp
503566.type __longjmp, %function;
504567__longjmp:
505568#endif
506#ifdef PTR32
569#ifdef TIME32
507570.globl __lstat_time64
508571.type __lstat_time64, %function;
509572__lstat_time64:
......@@ -514,7 +577,7 @@ __lutimes_time64:
514577.globl __lxstat
515578.type __lxstat, %function;
516579__lxstat:
517#ifdef PTR32
580#ifdef TIME32
518581.globl __mktime64
519582.type __mktime64, %function;
520583__mktime64:
......@@ -547,7 +610,7 @@ __overflow:
547610.weak __posix_getopt
548611.type __posix_getopt, %function;
549612__posix_getopt:
550#ifdef PTR32
613#ifdef TIME32
551614.globl __ppoll_time64
552615.type __ppoll_time64, %function;
553616__ppoll_time64:
......@@ -576,17 +639,7 @@ __recvmmsg_time64:
576639.globl __res_state
577640.type __res_state, %function;
578641__res_state:
579#if !defined(ARCH_mips) && !defined(ARCH_mips64) && !defined(ARCH_x86) && !defined(ARCH_x86_64) && !defined(ARCH_powerpc) && !defined(ARCH_powerpc64) && !defined(ARCH_aarch64) && !defined(ARCH_riscv32) && !defined(ARCH_loongarch64)
580.globl __restore
581.type __restore, %function;
582__restore:
583#endif
584#if !defined(ARCH_mips) && !defined(ARCH_mips64) && !defined(ARCH_x86) && !defined(ARCH_x86_64) && !defined(ARCH_powerpc) && !defined(ARCH_powerpc64) && !defined(ARCH_aarch64) && !defined(ARCH_riscv32) && !defined(ARCH_loongarch64)
585.globl __restore_rt
586.type __restore_rt, %function;
587__restore_rt:
588#endif
589#if !defined(ARCH_mips) && !defined(ARCH_mips64) && !defined(ARCH_x86) && !defined(ARCH_x86_64) && !defined(ARCH_powerpc) && !defined(ARCH_powerpc64) && !defined(ARCH_aarch64) && !defined(ARCH_loongarch64)
642#ifdef FAMILY_riscv
590643.globl __riscv_flush_icache
591644.type __riscv_flush_icache, %function;
592645__riscv_flush_icache:
......@@ -594,7 +647,7 @@ __riscv_flush_icache:
594647.globl __sched_cpucount
595648.type __sched_cpucount, %function;
596649__sched_cpucount:
597#ifdef PTR32
650#ifdef TIME32
598651.globl __sched_rr_get_interval_time64
599652.type __sched_rr_get_interval_time64, %function;
600653__sched_rr_get_interval_time64:
......@@ -614,7 +667,7 @@ __setitimer_time64:
614667.globl __setjmp
615668.type __setjmp, %function;
616669__setjmp:
617#ifdef PTR32
670#ifdef TIME32
618671.globl __settimeofday_time64
619672.type __settimeofday_time64, %function;
620673__settimeofday_time64:
......@@ -631,7 +684,7 @@ __signbitl:
631684.globl __sigsetjmp
632685.type __sigsetjmp, %function;
633686__sigsetjmp:
634#ifdef PTR32
687#ifdef TIME32
635688.globl __sigtimedwait_time64
636689.type __sigtimedwait_time64, %function;
637690__sigtimedwait_time64:
......@@ -639,7 +692,7 @@ __sigtimedwait_time64:
639692.globl __stack_chk_fail
640693.type __stack_chk_fail, %function;
641694__stack_chk_fail:
642#ifdef PTR32
695#ifdef TIME32
643696.globl __stat_time64
644697.type __stat_time64, %function;
645698__stat_time64:
......@@ -692,7 +745,7 @@ __strxfrm_l:
692745.weak __sysv_signal
693746.type __sysv_signal, %function;
694747__sysv_signal:
695#ifdef PTR32
748#ifdef TIME32
696749.globl __thrd_sleep_time64
697750.type __thrd_sleep_time64, %function;
698751__thrd_sleep_time64:
......@@ -718,9 +771,16 @@ __timerfd_settime64:
718771.type __timespec_get_time64, %function;
719772__timespec_get_time64:
720773#endif
774#if !defined(ARCH_s390x)
721775.globl __tls_get_addr
722776.type __tls_get_addr, %function;
723777__tls_get_addr:
778#endif
779#ifdef ARCH_s390x
780.globl __tls_get_offset
781.type __tls_get_offset, %function;
782__tls_get_offset:
783#endif
724784.globl __tolower_l
725785.type __tolower_l, %function;
726786__tolower_l:
......@@ -743,7 +803,7 @@ __uflow:
743803.globl __uselocale
744804.type __uselocale, %function;
745805__uselocale:
746#ifdef PTR32
806#ifdef TIME32
747807.globl __utime64
748808.type __utime64, %function;
749809__utime64:
......@@ -796,7 +856,7 @@ _dl_debug_state:
796856.globl _dlstart
797857.type _dlstart, %function;
798858_dlstart:
799#if !defined(ARCH_riscv64) && !defined(ARCH_mips) && !defined(ARCH_x86) && !defined(ARCH_x86_64) && !defined(ARCH_powerpc) && !defined(ARCH_powerpc64) && !defined(ARCH_aarch64) && !defined(ARCH_riscv32) && !defined(ARCH_loongarch64)
859#ifdef FAMILY_mips
800860.globl _dlstart_data
801861.type _dlstart_data, %function;
802862_dlstart_data:
......@@ -807,7 +867,7 @@ _exit:
807867.weak _fini
808868.type _fini, %function;
809869_fini:
810#if !defined(ARCH_riscv64) && !defined(ARCH_x86) && !defined(ARCH_x86_64) && !defined(ARCH_powerpc) && !defined(ARCH_powerpc64) && !defined(ARCH_aarch64) && !defined(ARCH_riscv32) && !defined(ARCH_loongarch64)
870#ifdef FAMILY_mips
811871.globl _flush_cache
812872.type _flush_cache, %function;
813873_flush_cache:
......@@ -908,7 +968,7 @@ aligned_alloc:
908968.globl alphasort
909969.type alphasort, %function;
910970alphasort:
911#if !defined(ARCH_riscv64) && !defined(ARCH_mips) && !defined(ARCH_mips64) && !defined(ARCH_powerpc) && !defined(ARCH_powerpc64) && !defined(ARCH_aarch64) && !defined(ARCH_riscv32) && !defined(ARCH_loongarch64)
971#ifdef FAMILY_x86
912972.globl arch_prctl
913973.type arch_prctl, %function;
914974arch_prctl:
......@@ -1033,12 +1093,10 @@ cabsf:
10331093.globl cabsl
10341094.type cabsl, %function;
10351095cabsl:
1036#if !defined(ARCH_riscv64) && !defined(ARCH_x86) && !defined(ARCH_x86_64) && !defined(ARCH_powerpc) && !defined(ARCH_powerpc64) && !defined(ARCH_aarch64) && !defined(ARCH_riscv32) && !defined(ARCH_loongarch64)
1096#ifdef FAMILY_mips
10371097.weak cachectl
10381098.type cachectl, %function;
10391099cachectl:
1040#endif
1041#if !defined(ARCH_riscv64) && !defined(ARCH_x86) && !defined(ARCH_x86_64) && !defined(ARCH_powerpc) && !defined(ARCH_powerpc64) && !defined(ARCH_aarch64) && !defined(ARCH_riscv32) && !defined(ARCH_loongarch64)
10421100.weak cacheflush
10431101.type cacheflush, %function;
10441102cacheflush:
......@@ -1232,10 +1290,10 @@ clock_getcpuclockid:
12321290.globl clock_getres
12331291.type clock_getres, %function;
12341292clock_getres:
1235WEAK64 clock_gettime
1293WEAKTIME64 clock_gettime
12361294.type clock_gettime, %function;
12371295clock_gettime:
1238WEAK64 clock_nanosleep
1296WEAKTIME64 clock_nanosleep
12391297.type clock_nanosleep, %function;
12401298clock_nanosleep:
12411299.globl clock_settime
......@@ -2018,10 +2076,10 @@ fsetpos:
20182076.globl fsetxattr
20192077.type fsetxattr, %function;
20202078fsetxattr:
2021WEAK64 fstat
2079WEAKTIME64 fstat
20222080.type fstat, %function;
20232081fstat:
2024WEAK64 fstatat
2082WEAKTIME64 fstatat
20252083.type fstatat, %function;
20262084fstatat:
20272085.weak fstatfs
......@@ -2063,7 +2121,7 @@ futimens:
20632121.globl futimes
20642122.type futimes, %function;
20652123futimes:
2066WEAK64 futimesat
2124WEAKTIME64 futimesat
20672125.type futimesat, %function;
20682126futimesat:
20692127.globl fwide
......@@ -2408,7 +2466,7 @@ globfree:
24082466.globl gmtime
24092467.type gmtime, %function;
24102468gmtime:
2411WEAK64 gmtime_r
2469WEAKTIME64 gmtime_r
24122470.type gmtime_r, %function;
24132471gmtime_r:
24142472.globl grantpt
......@@ -2549,12 +2607,12 @@ insque:
25492607.globl ioctl
25502608.type ioctl, %function;
25512609ioctl:
2552#if !defined(ARCH_riscv64) && !defined(ARCH_mips64) && !defined(ARCH_aarch64) && !defined(ARCH_riscv32) && !defined(ARCH_loongarch64)
2610#if !defined(ARCH_aarch64) && !defined(ARCH_arm) && !defined(ARCH_loongarch64) && !defined(ARCH_mips64) && !defined(ARCH_mipsn32) && !defined(ARCH_riscv32) && !defined(ARCH_riscv64) && !defined(ARCH_s390x)
25532611.globl ioperm
25542612.type ioperm, %function;
25552613ioperm:
25562614#endif
2557#if !defined(ARCH_riscv64) && !defined(ARCH_mips64) && !defined(ARCH_aarch64) && !defined(ARCH_riscv32) && !defined(ARCH_loongarch64)
2615#if !defined(ARCH_aarch64) && !defined(ARCH_arm) && !defined(ARCH_loongarch64) && !defined(ARCH_mips64) && !defined(ARCH_mipsn32) && !defined(ARCH_riscv32) && !defined(ARCH_riscv64) && !defined(ARCH_s390x)
25582616.globl iopl
25592617.type iopl, %function;
25602618iopl:
......@@ -2853,7 +2911,7 @@ localeconv:
28532911.globl localtime
28542912.type localtime, %function;
28552913localtime:
2856WEAK64 localtime_r
2914WEAKTIME64 localtime_r
28572915.type localtime_r, %function;
28582916localtime_r:
28592917.globl lockf
......@@ -3552,7 +3610,7 @@ pthread_cond_init:
35523610.globl pthread_cond_signal
35533611.type pthread_cond_signal, %function;
35543612pthread_cond_signal:
3555WEAK64 pthread_cond_timedwait
3613WEAKTIME64 pthread_cond_timedwait
35563614.type pthread_cond_timedwait, %function;
35573615pthread_cond_timedwait:
35583616.globl pthread_cond_wait
......@@ -3642,7 +3700,7 @@ pthread_mutex_lock:
36423700.globl pthread_mutex_setprioceiling
36433701.type pthread_mutex_setprioceiling, %function;
36443702pthread_mutex_setprioceiling:
3645WEAK64 pthread_mutex_timedlock
3703WEAKTIME64 pthread_mutex_timedlock
36463704.type pthread_mutex_timedlock, %function;
36473705pthread_mutex_timedlock:
36483706.weak pthread_mutex_trylock
......@@ -3693,10 +3751,10 @@ pthread_rwlock_init:
36933751.weak pthread_rwlock_rdlock
36943752.type pthread_rwlock_rdlock, %function;
36953753pthread_rwlock_rdlock:
3696WEAK64 pthread_rwlock_timedrdlock
3754WEAKTIME64 pthread_rwlock_timedrdlock
36973755.type pthread_rwlock_timedrdlock, %function;
36983756pthread_rwlock_timedrdlock:
3699WEAK64 pthread_rwlock_timedwrlock
3757WEAKTIME64 pthread_rwlock_timedwrlock
37003758.type pthread_rwlock_timedwrlock, %function;
37013759pthread_rwlock_timedwrlock:
37023760.weak pthread_rwlock_tryrdlock
......@@ -3774,7 +3832,7 @@ pthread_spin_unlock:
37743832.weak pthread_testcancel
37753833.type pthread_testcancel, %function;
37763834pthread_testcancel:
3777WEAK64 pthread_timedjoin_np
3835WEAKTIME64 pthread_timedjoin_np
37783836.type pthread_timedjoin_np, %function;
37793837pthread_timedjoin_np:
37803838.weak pthread_tryjoin_np
......@@ -3999,7 +4057,7 @@ rintf:
39994057.globl rintl
40004058.type rintl, %function;
40014059rintl:
4002#if !defined(ARCH_mips) && !defined(ARCH_mips64) && !defined(ARCH_x86) && !defined(ARCH_x86_64) && !defined(ARCH_powerpc) && !defined(ARCH_powerpc64) && !defined(ARCH_aarch64) && !defined(ARCH_loongarch64)
4060#ifdef FAMILY_riscv
40034061.weak riscv_flush_icache
40044062.type riscv_flush_icache, %function;
40054063riscv_flush_icache: