mailing list of musl libc
 help / color / mirror / code / Atom feed
a723ff23f786ff259a80fb8dfada3c4a812f01cf blob 483 bytes (raw)

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

/* Also perform sh-specific init */

__attribute__((__visibility__("hidden"))) int __sh2_abi;

int __set_thread_area(void *p)
{
	size_t *aux;
	__asm__ __volatile__ ( "ldc %0, gbr" : : "r"(p) : "memory" );
	for (aux=libc.auxv; *aux; aux+=2) {
		if (*aux != AT_PLATFORM) continue;
		const char *s = (void *)aux[1];
		if (s[0]!='s' || s[1]!='h' || s[2]!='2' || s[3]-'0'<10u) break;
		__sh2_abi = 1;
		break;
	}
	return 0;
}
debug log:

solving a723ff2 ...
found a723ff2 in https://inbox.vuxu.org/musl/20150610033050.GS17573@brightrain.aerifal.cx/
found e69de29 in https://git.vuxu.org/mirror/musl/
preparing index
index prepared:
100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391	arch/sh/src/__set_thread_area.c

applying [1/1] https://inbox.vuxu.org/musl/20150610033050.GS17573@brightrain.aerifal.cx/
diff --git a/arch/sh/src/__set_thread_area.c b/arch/sh/src/__set_thread_area.c
index e69de29..a723ff2 100644

Checking patch arch/sh/src/__set_thread_area.c...
Applied patch arch/sh/src/__set_thread_area.c cleanly.

index at:
100644 a723ff23f786ff259a80fb8dfada3c4a812f01cf	arch/sh/src/__set_thread_area.c

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).