From owner-svn-src-all@freebsd.org Thu Sep 17 17:05:22 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 22B033E6CC8; Thu, 17 Sep 2020 17:05:22 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4BsjyS66k3z4J4L; Thu, 17 Sep 2020 17:05:20 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id 08HH5CST014645; Thu, 17 Sep 2020 10:05:12 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 08HH5CtE014644; Thu, 17 Sep 2020 10:05:12 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202009171705.08HH5CtE014644@gndrsh.dnsmgr.net> Subject: Re: svn commit: r365836 - head/share/mk In-Reply-To: To: Warner Losh Date: Thu, 17 Sep 2020 10:05:12 -0700 (PDT) CC: Alex Richardson , src-committers , svn-src-all , svn-src-head Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 4BsjyS66k3z4J4L X-Spamd-Bar: + Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of freebsd@gndrsh.dnsmgr.net has no SPF policy when checking 69.59.192.140) smtp.mailfrom=freebsd@gndrsh.dnsmgr.net X-Spamd-Result: default: False [1.07 / 15.00]; HAS_REPLYTO(0.00)[rgrimes@freebsd.org]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; MIME_GOOD(-0.10)[text/plain]; REPLYTO_DOM_NEQ_FROM_DOM(0.00)[]; DMARC_NA(0.00)[dnsmgr.net]; AUTH_NA(1.00)[]; RCPT_COUNT_FIVE(0.00)[5]; NEURAL_SPAM_MEDIUM(0.13)[0.130]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; NEURAL_HAM_SHORT(-0.23)[-0.227]; NEURAL_SPAM_LONG(0.26)[0.264]; RCVD_TLS_LAST(0.00)[]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:13868, ipnet:69.59.192.0/19, country:US]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[svn-src-all,svn-src-head] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Sep 2020 17:05:22 -0000 > On Thu, Sep 17, 2020 at 9:39 AM Steffen Nurpmeso wrote: > > > Alex Richardson wrote in > > <202009171507.08HF7Qns080555@repo.freebsd.org>: > > |Author: arichardson > > |Date: Thu Sep 17 15:07:25 2020 > > |New Revision: 365836 > > |URL: https://svnweb.freebsd.org/changeset/base/365836 > > | > > |Log: > > | Stop using lorder and ranlib when building libraries > > | > > | Use of ranlib or lorder is no longer necessary with current linkers > > | (probably anything newer than ~1990) and ar's ability to create an > > object > > | index and symbol table in the archive. > > | Currently the build system uses lorder+tsort to sort the .o files in > > | dependency order so that a single-pass linker can use them. However, > > | we can use the -s flag to ar to add an index to the .a file which makes > > | lorder unnecessary. > > | Running ar -s is equivalent to running ranlib afterwards, so we can > > also > > | skip the ranlib invocation. > > > > That ranlib thing yes (for long indeed), but i have vague memories > > that the tsort/lorder ordering was also meant to keep the things > > which heavily interdepend nearby each other. (Luckily Linux > > always had at least tsort available.) > > This no longer matters for all the platforms FreeBSD supports? > > > > tsort has no notion of how dependent the modules are, just an order that > allows a single pass through the .a file (otherwise you'd need to list the > .a file multiple times on the command line absent ranlib). That's the > original purpose of tsort. tsort, lsort, and ranlib all arrived in 7th > edition unix on a PDP-11, where size was more important than proximity to > locations (modulo overlays, which this doesn't affect at all). > > There were some issues of long vs short jumps on earlier architectures that > this helped (since you could only jump 16MB, for example). However, there > were workarounds for this issue on those platforms too. And if you have a > program that this does make a difference, then you can still use > tsort/lorder. They are still in the system. > > I doubt you could measure a difference here today. I doubt, honestly, that > anybody will notice at all. The x86 archicture has relative jmps of differning lengths, even in long mode there is support for rel8 and rel32. > > Warner -- Rod Grimes rgrimes@freebsd.org