Skip to content

Removing dead code #242

@atsju

Description

@atsju

I propose to remove dead code.

I do not want to remove debug code or things like that. Just code that is here and is really not needed.

Here are garbage collection log and map file to help find unused sources
logGC.txt
output.map.txt

Top reproduce enable garbage collection:

QMAKE_CXXFLAGS += -ffunction-sections -fdata-sections
QMAKE_LFLAGS += -Wl,--gc-sections

For map files
QMAKE_LFLAGS += -Xlinker -Map=output.map
For the log:
QMAKE_LFLAGS += -Wl,--print-gc-sections

some useful commands:

grep -o '_Z[A-Za-z0-9_]*' outputUnused.map.txt | while read sym; do echo "$(c++filt $sym) $sym"; done >demangled.txt

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions