OSDN Git Service

Pass the elfdata pointer in a slot of the temporary TLS area.
authorDavid 'Digit' Turner <digit@google.com>
Fri, 17 Jul 2009 15:55:01 +0000 (17:55 +0200)
committerDavid 'Digit' Turner <digit@google.com>
Fri, 17 Jul 2009 15:55:01 +0000 (17:55 +0200)
commitef0bd1857041ffde069cf52138aaf22c1af7130e
treec61b6ca4b286821ff473533183eba42e7da234a3
parent348065586a2e6154d6cff36afa6e00af6bbc5918
Pass the elfdata pointer in a slot of the temporary TLS area.

This is needed to properly initialize the C runtime when libc.so
is loaded by the dynamic linker.

Move the temporary TLS setup before the first system call, just
in case something really horrible happens, we won't crash when
trying to write an error code in 'errno'

Remove the broken TLS_SLOT_THREAD_ID setup. First, this slot
should normally receive the address of a pthread_internal_t,
not a kernel thread identifier. Second, it is never used by
the linker anyway.

Also remove an obsolete comment.
libc/private/bionic_tls.h
linker/linker.c