mailing list of musl libc
 help / color / mirror / code / Atom feed
60e74a51f87a5edbfa7f6ea4967c07d4f94c8961 blob 532 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
 
#include <unistd.h>
#include "syscall.h"

off_t __lseek(int fd, off_t offset, int whence)
{
	register long long r4 __asm__("$4") = fd;
	register long long r5 __asm__("$5") = offset;
	register long long r6 __asm__("$6") = whence;
	register long long r7 __asm__("$7");
	register long long r2 __asm__("$2") = SYS_lseek;
	__asm__ __volatile__ (
		"syscall"
		: "+&r"(r2), "=r"(r7)
		: "r"(r4), "r"(r5), "r"(r6)
		: SYSCALL_CLOBBERLIST);
	return r7 ? __syscall_ret(-r2) : r2;
}

weak_alias(__lseek, lseek);
weak_alias(__lseek, lseek64);
debug log:

solving 60e74a51 ...
found 60e74a51 in https://git.vuxu.org/mirror/musl/

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).