Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755141AbZDUD2R (ORCPT ); Mon, 20 Apr 2009 23:28:17 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752661AbZDUD2B (ORCPT ); Mon, 20 Apr 2009 23:28:01 -0400 Received: from BISCAYNE-ONE-STATION.MIT.EDU ([18.7.7.80]:54590 "EHLO biscayne-one-station.mit.edu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752645AbZDUD2A convert rfc822-to-8bit (ORCPT ); Mon, 20 Apr 2009 23:28:00 -0400 Date: Mon, 20 Apr 2009 23:26:38 -0400 (EDT) From: Anders Kaseorg To: Arjan van de Ven cc: Linus Torvalds , Tim Abbott , Linux kernel mailing list , Waseem Daher , Denys Vlasenko , Rusty Russell , Andi Kleen , "H. Peter Anvin" , Stephen Rothwell , Jeff Arnold , Andrew Morton , Jon Masters Subject: Re: [PATCH v2 0/4] Add support for compiling with -ffunction-sections -fdata-sections In-Reply-To: <20090420201826.7c1f7f06@infradead.org> Message-ID: References: <1238973278-31735-1-git-send-email-tabbott@mit.edu> <20090420201826.7c1f7f06@infradead.org> User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=UTF-8 Content-Transfer-Encoding: 8BIT X-Spam-Flag: NO X-Spam-Score: 0.00 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 814 Lines: 17 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/