Separate debug info for release builds

Henry Vermaak via fpc-pascal <[email protected]>
Newsgroups gmane.comp.compilers.free-pascal.general
Message-ID <CAOVzLrfbbnMZnDz6+VDQKNiH08YESaX+8=y=sogQKD=MEPmaSg@mail.gmail.com>
When I add -Xg, the compiler writes the debug info into a separate
.dbg file and adds a .gnu_debuglink section so the debugger can find
the info.  So far so good (and simpler than having the use objcopy).

The size of the binary is much larger than building without debug
info, though.  E.g. with -O2 it goes from 35K to 188K.

When I do exactly the same with gcc (via objcopy and strip), there's
almost no difference between the stripped binary and a binary built
without debugging info (even diffing objdump output).

Can anyone explain why this is?

Henry
_______________________________________________
fpc-pascal maillist  -  [email protected]
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.