LoongArch: Add dtpoff calculation function

When tls_sec is NULL, we should not access the virtual address
of tls_sec.
1 file changed