From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18725 invoked by alias); 27 Aug 2014 21:22:06 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 18716 invoked by uid 89); 27 Aug 2014 21:22:06 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-oa0-f45.google.com Received: from mail-oa0-f45.google.com (HELO mail-oa0-f45.google.com) (209.85.219.45) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Wed, 27 Aug 2014 21:22:05 +0000 Received: by mail-oa0-f45.google.com with SMTP id i7so691452oag.4 for ; Wed, 27 Aug 2014 14:22:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=OrpQdb7+czQJI03FhJgMGsowseutlxqIK8AqtREU6Zc=; b=ERKorHkGdVDZ1w8DZAR/XM7zmon0zN0K7rTDmITHlOFcX2hnOZunwynb0N7dBpd45B ciRLdqgi06iyN0fcgn2cRK1nG3vL0EcP+2x+yu4wdUPv5vDh7ZzG/AmXMrJQ5/3bA/RP mW9eW5YVrMBKtP05LvsxU0H8IWbLH82SuIxgjywbO+3ITk1+ckgYQZfd89NaHyPtcyNg 0fbGQWonh0HrHhkc9uR9ULD/i+eMueuPsfyptj8sS/NQCovT1jxqkqZfZV0no08Fuo8T Zb0IImP5GVSma4m93LT8xIH5rK/6FLAHocw4KUzEnLf06BQ8nc2THoPnHfa27c8Qgnjh 5uQQ== X-Gm-Message-State: ALoCoQkbHFSmq4BMwdpltSUcsJ+gkPceGPMpb94G/+eSimtAJ1deIkBpIZ1VWpox+Be6ri743tfM MIME-Version: 1.0 X-Received: by 10.60.44.65 with SMTP id c1mr5059540oem.83.1409174523208; Wed, 27 Aug 2014 14:22:03 -0700 (PDT) Received: by 10.60.246.37 with HTTP; Wed, 27 Aug 2014 14:22:03 -0700 (PDT) In-Reply-To: References: Date: Wed, 27 Aug 2014 21:22:00 -0000 Message-ID: Subject: Re: removing unused functions during final link From: Ian Lance Taylor To: Melvin Blades Cc: "gcc-help@gcc.gnu.org" Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2014-08/txt/msg00130.txt.bz2 On Wed, Aug 27, 2014 at 2:02 PM, Melvin Blades wrote: > > What command line options can I use to get the linker to strip unused > functions from the final executable? Compile with -ffunction-sections -fdata-sections. Link with -Wl,--gc-sections. Ian