Recently I meet a problem when trying to link my program. It report .text can\'t fit in specified memory region. Obviously the source code grows too large to be lin
Perhaps --gc-sections together with --print-gc-sections and/or --print-map-discarded?
If everything is in separate sections, then you have all your sections as input, and list of discarded sections. Then simple script shall produce list of used sections, their size and file mapping.