On 11/11/2016 10:17 PM, Florian Weimer wrote:
And so on. My question is this: Can we actually enter the final part,
under “We can do the TLS right now!” in a shared build?
I doubt that because during the initial link, we will hit the second
break statement for libraries, and the third break statement for the
main program. Before user code runs, rtld.c sets up the TLS data
structures, so any future dlopen calls hit the second break again
because GL(dl_tls_dtv_slotinfo_list) != NULL at this point.
Is this reasoning correct? I put in a debug printf and ran the elf
tests, and there was nothing printed.
I've simplified the code accordingly and added asserts.
I have verified that the elf/* test suite still passes on s390, s390x,
ppc64, ppc, x86_64, i386. On x86_64, I also performed an installed-tree
test (and the assert did not fire).