Separate Debug Files - Debugging with GDB
gdb allows you to put a program's debugging information in a file separate from ... present in the original built binary with symbols, in its stripped variant, and in the ... main executable using ld --build-id or the gcc counterpart gcc -Wl,--build-id ....