[fpc-pascal] Separate debug info for release builds

Henry Vermaak henry.vermaak at gmail.com
Fri Nov 1 18:14:36 CET 2024


On Fri, 1 Nov 2024 at 16:12, Henry Vermaak <henry.vermaak at gmail.com> wrote:
> On Fri, 1 Nov 2024 at 15:49, Martin Frb via fpc-pascal
> <fpc-pascal at lists.freepascal.org> wrote:
> > Another factor could be that debug info affects smartlinking. Or leaves symbols for the linker in sections that are shared with non-debug info.
>
> This seems to be the problem. I think adding -g turns off
> smartlinking, which then blows up the binary size, I've just tested
> with and without (-CX -XX).

Looks like I can "fix" this by passing --gc-sections to ld.

Are there any fpc devs that can comment on why smart linking gets
switched off when -g is passed?

Henry


More information about the fpc-pascal mailing list