Skip to content

Implement control over symbol stripping #140

@ghost

Description

I'm developing an fbc package for Gentoo, but there's a behavior in fbc that causes problems for the Gentoo build system. Gentoo packages are required to build executable with the symbol table intact (i.e. "not stripped" executables).

However, fbc automatically passes the -s option down to the linker if debugging/profiling is not enabled; this strips all symbol information from the executable. Since the addition of the -s option cannot be controlled, fbc executables cause the Gentoo build system to fail.

It is true that symbols will not be stripped if debugging is enabled, but this bloats the executables with additional information that is not used (e.g. debug_info). There are situations where symbols are useful outside of source code debugging, where debug_info and such are not neeeded.; for example, a live memory analyzer can keep track of symbol values if they are simply present in the symbol table without the need of additional debugging info.

I propose the following new compiler option:

  -strip           Omit all symbol information from the output file

It will be useful to have a way to manually control whether symbols are stripped or not. That should give user much finer control and freedom over the resulting executables.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions