Re: [PATCH v2 0/4] Add support for compiling with -ffunction-sections-fdata-sections

From: Anders Kaseorg
Date: Mon Apr 20 2009 - 23:28:19 EST


On Mon, 20 Apr 2009, Arjan van de Ven wrote:
> an alternative approach would be to have a special build target that
> uses this, but makes a 2nd vmlinux, and then runs a diff on the symbols
> against the regular one... and finds which functions got dropped.
> Some patient soul can then go about and stick in ifdefs and stuff...

We wouldnât even need a 2nd vmlinux for that. Once we can compile with
-ffunction-sections -fdata-sections, we can just ask the linker to print
the list of unused sections that it removed (--gc-sections
--print-gc-sections).

Anders
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/