On Tue, 29 Jan 2019 at 11:25, Rainer Orth <r...@cebitec.uni-bielefeld.de> wrote: > > I've successfully been using a late prototype of an implementation of > the dlpi_tls_modid field of struct dl_phdr_info on Solaris 11.5 Beta. > This allowed me to get pretty reasonable test results using > sections_elf_shared.d on Solaris. > > This pretty straightforward patch implements this. Only a few points > are worth mentioning: > > * libdruntime/rt/bss_sections.c refers to __bss_start, which only gld > defines. Unfortunately, it's marked weak, so the absence with Solaris > ld went unnoticed at first. Lacking an exact equivalent, I'm using > _edata instead, which is pretty close modulo section alignment. > > * As detailed in the PR, not dlclose()ing the handle in handleForName is > necessary to avoid an assertion failure. > > * I'm removing sections_solaris.d since it wouldn't even compile and > seems pretty useless. > > This patch gave me the following testsuite results on Solaris 11.5/x86 > (a few more minor testsuite fixes were included, too): > > === gdc tests === > > > Running target unix > FAIL: gdc.test/runnable/nulltype.d execution test > FAIL: gdc.test/runnable/nulltype.d -O2 execution test > FAIL: gdc.test/runnable/nulltype.d -O2 -shared-libphobos execution test > FAIL: gdc.test/runnable/nulltype.d -g execution test > FAIL: gdc.test/runnable/nulltype.d -g -O2 execution test > FAIL: gdc.test/runnable/nulltype.d -g -O2 -shared-libphobos execution test > FAIL: gdc.test/runnable/nulltype.d -g -shared-libphobos execution test > FAIL: gdc.test/runnable/nulltype.d -shared-libphobos execution test > > === gdc Summary for unix === > > # of expected passes 30785 > # of unexpected failures 8 > > Running target unix/-m64 > > === gdc Summary for unix/-m64 === > > # of expected passes 30793 > > === gdc Summary === > > # of expected passes 61578 > # of unexpected failures 8 > /var/gcc/gcc-9.0.1-20190128/11.5-gcc-gas-libphobos/gcc/gdc version 9.0.1 > 20190128 (experimental) [trunk revision 268335] (GCC) > > === libphobos tests === > > > Running target unix > FAIL: libphobos.shared/load.d -shared-libphobos -ldl execution test > FAIL: libphobos.shared/load_13414.d -shared-libphobos -ldl execution test > FAIL: libphobos.shared/finalize.d -shared-libphobos -ldl execution test > FAIL: libphobos.shared/linkD.c lib.so -ldl -pthread execution test > FAIL: libphobos.unittests/druntime/shared/core.sync.mutex > FAIL: libphobos.unittests/druntime/shared/core.time > > === libphobos Summary for unix === > > # of expected passes 119 > # of unexpected failures 6 > > Running target unix/-m64 > FAIL: libphobos.shared/load.d -shared-libphobos -ldl execution test > FAIL: libphobos.shared/load_13414.d -shared-libphobos -ldl execution test > FAIL: libphobos.shared/finalize.d -shared-libphobos -ldl execution test > FAIL: libphobos.shared/linkD.c lib.so -ldl -pthread execution test > FAIL: libphobos.unittests/druntime/shared/ld.so.1: > FAIL: libphobos.unittests/druntime/shared/unittest: > FAIL: libphobos.unittests/druntime/shared/fatal: > FAIL: libphobos.unittests/druntime/shared/libgdruntime_t.so.0: > FAIL: libphobos.unittests/druntime/shared/open > FAIL: libphobos.unittests/druntime/shared/failed: > FAIL: libphobos.unittests/druntime/shared/No > FAIL: libphobos.unittests/druntime/shared/such > FAIL: libphobos.unittests/druntime/shared/file > FAIL: libphobos.unittests/druntime/shared/or > FAIL: libphobos.unittests/druntime/shared/directory > > === libphobos Summary for unix/-m64 === > > # of expected passes 78 > # of unexpected failures 15 > > === libphobos Summary === > > # of expected passes 197 > # of unexpected failures 21 > > The 32-bit nulltype.d failures occur on Linux, too (PR d/87824), and the > 64-bit libphobos.unittests/druntime/shared failures happen because > libgdruntime_t.so.0 is only built for the default multilib. The > libphobos.shared failures clearly bear investigating. > > For the amd64 results, I needed a separate patch to workaround an ld > bug, to be submitted shortly. > > While I did run a sparc-sun-solaris2.11 bootstrap, too, results are > pretty useless due to PR d/88462 (the minfo alignment issue). >
Hi, Sorry for the belated response, this has been delayed by myself sorting out moving the sections code out of upstream tree. bss_sections.c is now gone, and the patch should be rebased to target gcc/sections/elf_shared.d. I think only core/sys/solaris/link.d is left to be upstreamed, otherwise this is OK. -- Iain