When building a chroot based on uclibc-0.9.31 on a gentoo system, I found that ldconfig dies with a call to null when UCLIBC_STATIC_LDCONFIG=y is set. An objdump -S /sbin/ldconfig gives 0804e965 <__uClibc_main>: 804e965: 55 push %ebp 804e966: 57 push %edi 804e967: 56 push %esi 804e968: 53 push %ebx ... 804eb22: e8 e5 bd ff ff call 804a90c <__GI___errno_location> 804eb27: c7 00 00 00 00 00 movl $0x0,(%eax) 804eb2d: e8 ce 14 fb f7 call 0 <_init-0x80480b4> 804eb32: c7 00 00 00 00 00 movl $0x0,(%eax) 804eb38: 55 push %ebp 804eb39: 8b 83 b0 ff ff ff mov -0x50(%ebx),%eax 804eb3f: ff 30 pushl (%eax) ... I was using binutils-2.18 and i386-gentoo-linux-uclibc-4.4.3. Vanilla gentoo.
That seems to be GCC PR32219 hitting with __h_errno_location. Could you try applying aa67771881d65373da448ad5f7a8393f3a1d9469 and see if it still happens?
This was obfuscated in uClibc in aa67771881d65373da448ad5f7a8393f3a1d9469 and works properly now with 4.7.x