Jacek Caban (@jacek) commented about loader/preloader.c:
for (i = 1; i < argc; i++) argv[i] -= off;
}
+/* GDB integration, _dl_debug_state is *required* for GDB to hook the preloader */ +__attribute((visibility("default"))) void _dl_debug_state(void) {}
You never call `_dl_debug_state` in this commit. Does it work without it or are you relying on debugger figuring things out when it's called from ntdll? An explicit `_dl_debug_state` call in `wld_start` would seem right to me.