1. You MUST compile your program with the -gw key.
2. I strongly recommend to use the extractdwrflnfo
  utility (source included), which extracts the dwarf 
  line info into an external file, then clean your exe
  with the strip utility.
The dwarf line info is but a part of the dwarf
  debugging info generated with -gw, which you
  don't need. So you can save up to several hundreds
  Kbytes on the exe size.

The "brutalstrip" utility is unfinished and barely tested,
   it could corrupt your executable file beyond any
   repair. But as far as I can see it works (win32 PEs
   only) and removes the extra stuff missed by the
   standard "strip" utility.
 *USE UPX AFTERWARDS!* It repairs your EXE after
   what brutalstrip has done with it.
   

WARNING: for now,  brutalstrip
  can work only with PEs and extractdwrflnfo
  is useles, because there is no way to remove 
  the line info from your executable.

Linux: This library *wont* work 
  if you compress your executable with UPX.
  No workaround possible.

Windows: It'll only work with UPXed program
  if you extract line info into a separate .zdli file
  (use brutalstrip+upx or extractdwrflnfo)  