NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

port-mips/59296: t_rtld_r_debug test is failing



>Number:         59296
>Category:       port-mips
>Synopsis:       t_rtld_r_debug test is failing
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-mips-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Apr 14 01:50:00 +0000 2025
>Originator:     Taylor R Campbell
>Release:        current, 10, 9, ...
>Organization:
The MipsBSDynamic Rtldebugation
>Environment:
>Description:
tc-end: 1744594643.532930, dlopen, failed, /usr/src/current/tests/libexec/ld.elf_so/t_rtld_r_debug.c:104: debug != NULL not met

This presumably happens because:

    335 		/*
    336 		 * Don't process DT_DEBUG on MIPS as the dynamic section
    337 		 * is mapped read-only. DT_MIPS_RLD_MAP is used instead.
    338 		 * XXX: n32/n64 may use DT_DEBUG, not sure yet.
    339 		 */
    340 #ifndef __mips__
    341 		case DT_DEBUG:
    342 #ifdef RTLD_LOADER
    343 			dynp->d_un.d_ptr = (Elf_Addr)&_rtld_debug;
    344 #endif
    345 			break;
    346 #endif

https://nxr.netbsd.org/xref/src/libexec/ld.elf_so/headers.c?r=1.72#335

So either ld.elf_so needs to be fixed to make this happen (for n32 and/or n64?), or t_rtld_r_debug needs to be adapted to use DT_MIPS_RLD_MAP, and either way, both places should have a comment citing the relevant ABI reference.
>How-To-Repeat:
cd /usr/tests/libexec/ld.elf_so
atf-run t_rtld_r_debug | atf-report
>Fix:
Yes, please!



Home | Main Index | Thread Index | Old Index