summaryrefslogtreecommitdiff
path: root/src/ldso
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2015-04-13 19:24:51 -0400
committerRich Felker <dalias@aerifal.cx>2015-04-13 19:24:51 -0400
commit19a1fe670acb3ab9ead0fe31859ca7d4fe40dd54 (patch)
treec2a2b1e2e4ddb58416a925b1e64485ac4972f4e4 /src/ldso
parent71f099cb7db821c51d8f39dfac622c61e54d794c (diff)
downloadmusl-19a1fe670acb3ab9ead0fe31859ca7d4fe40dd54.tar.gz
musl-19a1fe670acb3ab9ead0fe31859ca7d4fe40dd54.tar.bz2
musl-19a1fe670acb3ab9ead0fe31859ca7d4fe40dd54.tar.xz
musl-19a1fe670acb3ab9ead0fe31859ca7d4fe40dd54.zip
remove remnants of support for running in no-thread-pointer mode
since 1.1.0, musl has nominally required a thread pointer to be setup. most of the remaining code that was checking for its availability was doing so for the sake of being usable by the dynamic linker. as of commit 71f099cb7db821c51d8f39dfac622c61e54d794c, this is no longer necessary; the thread pointer is now valid before any libc code (outside of dynamic linker bootstrap functions) runs. this commit essentially concludes "phase 3" of the "transition path for removing lazy init of thread pointer" project that began during the 1.1.0 release cycle.
Diffstat (limited to 'src/ldso')
-rw-r--r--src/ldso/dynlink.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/ldso/dynlink.c b/src/ldso/dynlink.c
index 31f59392..8b15daa2 100644
--- a/src/ldso/dynlink.c
+++ b/src/ldso/dynlink.c
@@ -810,12 +810,6 @@ static struct dso *load_library(const char *name, struct dso *needed_by)
/* Add a shortname only if name arg was not an explicit pathname. */
if (pathname != name) p->shortname = strrchr(p->name, '/')+1;
if (p->tls_image) {
- if (runtime && !libc.has_thread_pointer) {
- munmap(map, p->map_len);
- free(p);
- errno = ENOSYS;
- return 0;
- }
p->tls_id = ++tls_cnt;
tls_align = MAXP2(tls_align, p->tls_align);
#ifdef TLS_ABOVE_TP
@@ -1165,8 +1159,7 @@ _Noreturn void __dls3(size_t *sp)
* thread pointer at runtime. */
libc.tls_size = sizeof builtin_tls;
if (__init_tp(__copy_tls((void *)builtin_tls)) < 0) {
- dprintf(2, "%s: Thread-local storage not supported by kernel.\n", argv[0]);
- _exit(127);
+ a_crash();
}
/* Find aux vector just past environ[] */
@@ -1352,8 +1345,7 @@ _Noreturn void __dls3(size_t *sp)
_exit(127);
}
if (__init_tp(__copy_tls(initial_tls)) < 0) {
- dprintf(2, "%s: Failed to switch to new thread pointer.\n", argv[0]);
- _exit(127);
+ a_crash();
}
} else {
size_t tmp_tls_size = libc.tls_size;