From owner-freebsd-current@FreeBSD.ORG Mon Sep 16 02:30:10 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id BE0FAC08 for ; Mon, 16 Sep 2013 02:30:10 +0000 (UTC) (envelope-from tim@kientzle.com) Received: from mail-pd0-f182.google.com (mail-pd0-f182.google.com [209.85.192.182]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 958492457 for ; Mon, 16 Sep 2013 02:30:10 +0000 (UTC) Received: by mail-pd0-f182.google.com with SMTP id r10so3512554pdi.41 for ; Sun, 15 Sep 2013 19:30:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:content-type:mime-version:subject:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=QqNwIiU5emLMS7zb1wG8thHxbOREbpfEocWS7gpMimU=; b=KAw0qOBKQ6hBEyIyVHXru8EJUMJsENDrUuu4efs2wwxewabQ+Fz66HLFdSbB8VpIp/ ThrJwQ1TAdvUaOldFpsnUwEm3NEizZaT3lIgP3l4IfjYOs3MuW1/fa9oP4/og1mx008e bOxG9Jgdhxv3cr1bicuwNfgr30b2wrARqTSGzFjYyzC/i51itkeSinwQkixfomOfCOo+ YXeHk69QP+p4vZOGOvHAzskUZimVlK4w8HDmeKYx2lxMoiEP4yMIrO/IbxO3TSIYRCbE g6ahvLUrz4GbB1VoAhArT9/ZKddNNCuuMoWoFFpOvHcmsl3H/p48SNCtSUlgcrJiFpBa A5Xw== X-Gm-Message-State: ALoCoQmpPbAWbqI1VqQ1EiQrQDA3WKHcaCVERO6mV+dPqCi6jlws3OHBzwY3gHSkXwnnp2r+OjsP X-Received: by 10.68.197.129 with SMTP id iu1mr504454pbc.139.1379298604848; Sun, 15 Sep 2013 19:30:04 -0700 (PDT) Received: from [192.168.1.74] (99-74-169-43.lightspeed.sntcca.sbcglobal.net. [99.74.169.43]) by mx.google.com with ESMTPSA id nv6sm27536593pbc.6.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 15 Sep 2013 19:30:04 -0700 (PDT) Sender: Tim Kientzle Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Subject: Re: -ffunction-sections, -fdata-sections and -Wl,--gc-sections From: Tim Kientzle In-Reply-To: Date: Sun, 15 Sep 2013 19:30:01 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: To: Ed Schouten X-Mailer: Apple Mail (2.1508) Cc: FreeBSD Current X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Sep 2013 02:30:10 -0000 On Sep 15, 2013, at 2:24 PM, Ed Schouten wrote: > GCC and Clang support the -ffunction-sections and -fdata-sections > flags. Essentially, these flags force the compiler to put every > function and variable in its own section. Though this will blow up the =85. > - devd suddenly becomes 500 KB in size, instead of a megabyte, > - init's size drops from 900 KB to 600 KB, Can you figure out what functions are getting omitted when you make this change? Can you extract a linkage map from a build done this way and compare it to one done the regular way? That big of a difference suggests we have some badly-factored code in our libraries. That is, some library is putting functions into a single source file that shouldn't be combined. Tim