Constraints in libmap(32).conf do not work as expected, possible bug in rtld-elf
Andreas Longwitz
longwitz at incore.de
Wed Sep 26 15:05:07 UTC 2018
>> I like to mention one thing concerning the source libmap.c. With the
>> patch (yours or mine) and the libmap32.conf given above I see the
>> following lmp_list when lm_fini() is called:
>>
>> lm_fini("1, $DEFAULT$" lml-Adresse 0x2826c208)
>> lm_fini("f=/usr/local/lib, t=/usr/local/lib32")
>> lm_fini("f=/usr/local/lib, t=/usr/local/lib32")
>> lm_fini("f=/usr/local/lib, t=/usr/local/lib32")
>> lm_fini("f=/usr/local/lib, t=/usr/local/lib32")
>> lm_fini("f=/usr/local/lib, t=/usr/local/lib32")
>> lm_fini("f=/usr/local/lib, t=/usr/local/lib32")
>> lm_fini("f=/usr/local/lib/mysql, t=/usr/local/lib32/mysql")
>> lm_fini("f=/usr/local/lib, t=/usr/local/lib32")
>> lm_fini("f=libcrypto.so.8, t=libcrypto.so.6")
>> lm_fini("f=libssl.so.8, t=libssl.so.6")
>> lm_fini("f=/usr/local/lib, t=/usr/local/lib32")
>> lm_fini("f=/usr/local/lib, t=/usr/local/lib32")
>> lm_fini("f=/usr/local/lib, t=/usr/local/lib32")
>> lm_fini("f=/usr/local/lib, t=/usr/local/lib32")
>> lm_fini("f=/usr/local/lib, t=/usr/local/lib32")
>> lm_fini("f=/usr/local/lib, t=/usr/local/lib32")
>> lm_fini("f=/usr/local/lib, t=/usr/local/lib32")
>> lm_fini("f=/usr/local/lib, t=/usr/local/lib32")
>> lm_fini("f=/usr/local/lib, t=/usr/local/lib32")
>> lm_fini("f=/usr/local/lib, t=/usr/local/lib32")
>> lm_fini("f=/usr/local/lib, t=/usr/local/lib32")
>> lm_fini("f=/usr/local/lib, t=/usr/local/lib32")
>> lm_fini("f=/usr/local/lib, t=/usr/local/lib32")
>> lm_fini("f=/usr/local/lib, t=/usr/local/lib32")
>> lm_fini("f=/usr/local/lib, t=/usr/local/lib32")
>> lm_fini("f=/usr/local/lib, t=/usr/local/lib32")
>> lm_fini("1, libc-client4.so.9" lml-Adresse 0x2826c168)
>> lm_fini("f=libcrypto.so.8, t=libcrypto.so.6")
>> lm_fini("f=libssl.so.8, t=libssl.so.6")
>> lm_fini("2, /usr/local/php52/" lml-Adresse 0x2826c068)
>> lm_fini("f=/usr/local/lib/mysql, t=/usr/local/lib32/mysql")
>> lm_fini("f=/usr/local/lib, t=/usr/local/lib32")
>>
>> So for $DEFAULTS we have a lot of identical entries. This comes from the
>> TAILQ_INSERT_HEAD statement in lm_add(). I am not sure if this can be
>> accepted or a check to avoid double entries in the list is better.
> Yes, this is mostly cosmetics. It is not clear is it better to avoid
> duplicates and pay the cost at insertion, or leave them and pay at the
> list traversal. I think there is slight preference to avoid dups, but
> this should be not measureable.
With your patch for libmap.c the output in lm_fini() now looks fine:
lm_fini("1, $DEFAULT$" lml-Adresse 0x2826c208)
lm_fini("f=/usr/local/lib/mysql, t=/usr/local/lib32/mysql")
lm_fini("f=libcrypto.so.8, t=libcrypto.so.6")
lm_fini("f=libssl.so.8, t=libssl.so.6")
lm_fini("f=/usr/local/lib, t=/usr/local/lib32")
lm_fini("1, libc-client4.so.9" lml-Adresse 0x2826c168)
lm_fini("f=libcrypto.so.8, t=libcrypto.so.6")
lm_fini("f=libssl.so.8, t=libssl.so.6")
lm_fini("2, /usr/local/php52/" lml-Adresse 0x2826c068)
lm_fini("f=/usr/local/lib/mysql, t=/usr/local/lib32/mysql")
lm_fini("f=/usr/local/lib, t=/usr/local/lib32")
>> One annotation to the script /etc/rc.d/ldconfig: I had expected that
>> this script during boot creates clean files ld-elf(32).so.hints in
>> /var/run. For 64 bit this is true, but for 32 bit not because ldconfig
>> with flag -32 also has flag -m. Is this intended behaviour ?
>
> This seems to be from the beginning when ldconfig_local32 was
> introduced in r154114.
Ok
Andreas Longwitz
More information about the freebsd-stable
mailing list