> How about extending struct dl_phdr_info and passing an counter in it > to dl_iterate_phdr's callback? That is easy enough. OTOH, it's arguably not much harder for the callback to just compare the results with saved results from the last run and decide that way no new work has to be done. That works with existing glibc's too.