GCC Linker : how to generate a report of per file contribution on output sections

后端 未结 1 1862
醉梦人生
醉梦人生 2021-01-26 22:12

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

相关标签:
1条回答
  • 2021-01-26 22:30

    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.

    0 讨论(0)
提交回复
热议问题