Some versions of Linux allow you to place debugging information in a separate file. These files, which can have any name, are called gnu_debuglink files. Because this information is stripped from the program's file, it almost always greatly reduces the size of your program. In most cases, you would create gnu_debuglink files for system libraries or other programs for which it is inappropriate to ship versions have debugging information.
After you create an unstripped executable or shared library, you can prepare the gnu_debuglink file. Here's an overview:
Create this file on Linux systems that support the - -add-gnu-debuglink and - -only-keep-debug command-line options. If objcopy -- -help mentions - -add-gnu-debuglink, you should be able to create this file. See man objcopy for more details.
The following example creates the gnu_debuglink file for a program named hello. It also strips the debugging information from hello:
objcopy --only-keep-debug hello hello.gnu_debuglink.debug
objcopy --strip-all hello hello.gnu_debuglink
objcopy --add-gnu-debuglink=hello.gnu_debuglink.debug \
hello.gnu_debuglink
For more information, see the TotalView Reference Guide.