I am looking for a command which would create complementary file to stripped binary, which was created using command: strip --strip-all foo In fact I would be happy having procedure for creating two part executable: one part being entirely stripped executable and the second part containing all symbols. Stripped executable should have also link to symbol file. The procedure would be analogous to to the one for debug symbols described in objcopy man page:
1.Link the executable as normal. Assuming that is is called "foo" then...
2.Run "objcopy --only-keep-debug foo foo.dbg" to create a file containing the debugging info.
3.Run "objcopy --strip-debug foo" to create a stripped executable.
4.Run "objcopy --add-gnu-debuglink=foo.dbg foo"
to add a link to the debugging info into the
stripped executable.
Greetings