Closed
Description
Only GNU/Linux guarantees:
- the name of the executable is
""
- the executable is the first callback
This doesn't seem to be guaranteed to be true, even on other flavors of Linux, which may have a sense of humor, e.g. musl's choices in the static linkage case:
info.dlpi_addr = base;
info.dlpi_name = "/proc/self/exe";
info.dlpi_phdr = (void *)aux[AT_PHDR];
info.dlpi_phnum = aux[AT_PHNUM];
info.dlpi_adds = 0;
info.dlpi_subs = 0;
if (tls_phdr) {
info.dlpi_tls_modid = 1;
info.dlpi_tls_data = __tls_get_addr((tls_mod_off_t[]){1,0});
} else {
info.dlpi_tls_modid = 0;
info.dlpi_tls_data = 0;
}
return (callback)(&info, sizeof (info), data);
Metadata
Metadata
Assignees
Labels
No labels