Re: [off topic] fallow code removal

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Any suggestions, pointers or recommendations for tools, tips and/or
techniques would be appreciated.

A couple of different ways come to mind:

a) there's the binutils -ffunction-sections -Wl,-gc-sections approach where every function is put into it's own section and the total is then garbage collected by the linker with extra sections that aren't referenced are then deleted.

b) the mechanism the mach-o linker uses which is similar, but since - ffunction-sections may overrun the maximum allowed number of sections, everything is divided on label boundaries and split into "atoms". Any atom not in the direct call graph or without a relocation is then deleted in the final linked image.

-eric

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux