From owner-svn-src-all@freebsd.org Thu Sep 17 17:22:53 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 CC6D53E7CA8; Thu, 17 Sep 2020 17:22:53 +0000 (UTC) (envelope-from arichardson.kde@gmail.com) Received: from mail-ed1-f67.google.com (mail-ed1-f67.google.com [209.85.208.67]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BskLh6ZQRz4KJX; Thu, 17 Sep 2020 17:22:52 +0000 (UTC) (envelope-from arichardson.kde@gmail.com) Received: by mail-ed1-f67.google.com with SMTP id t16so3322510edw.7; Thu, 17 Sep 2020 10:22:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=oqmHcwFMfE5oJmjSM5qZV9QrkugUQ1fKiy/gBgEYeXQ=; b=UuQhzrdARKhynNImVwV/DxU6aX7OnB7JCQiV29rzrtsFQ46MDv23j6yG7Yg7ksYuT1 2KDD6gcjEzenscH3VN4GTde//wPEnFN/Mij0YY0uLMxbrGwPMJf0H8ior0scViBTncsM m1w2ji+F1AsPy6MIQnDKCFaAwXm8tfkod2XNMSMHJkp0josMhuJ0b78tTypZeEja4saP QxQwpT4sa+0SrlzqZr+v/MbCv1A8mxSdpN38zaMusK8NPdPT42APmsDRM69JuUJPXZfZ bF8Rhg5n7tuECsm2lWR0LuCot/Z5Sea+sgS+F5ktEUUVhJ9tfeVIIc2TqfWETXJR6yrm UqTQ== X-Gm-Message-State: AOAM530ZItu+9sRY2vN1EPR7TAsIObD0dWqIBFs/7ynr/NazDnw13hBK UNkMxzWZIUX+J9xK3mvxxAJuoRU+bOTMTT/Y X-Google-Smtp-Source: ABdhPJy9tR/OSh3STOC+SjJMmerNtn+hUxm2rEpE60DLxD133K/sB1DE3P6rGmojkJLMiFqoJ/q0VQ== X-Received: by 2002:a50:b946:: with SMTP id m64mr34941912ede.92.1600363371248; Thu, 17 Sep 2020 10:22:51 -0700 (PDT) Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com. [209.85.128.46]) by smtp.gmail.com with ESMTPSA id c11sm227485edu.44.2020.09.17.10.22.50 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 17 Sep 2020 10:22:51 -0700 (PDT) Received: by mail-wm1-f46.google.com with SMTP id l15so4889214wmh.1; Thu, 17 Sep 2020 10:22:50 -0700 (PDT) X-Received: by 2002:a1c:2501:: with SMTP id l1mr12075780wml.16.1600363370417; Thu, 17 Sep 2020 10:22:50 -0700 (PDT) MIME-Version: 1.0 References: <202009171705.08HH5CtE014644@gndrsh.dnsmgr.net> In-Reply-To: <202009171705.08HH5CtE014644@gndrsh.dnsmgr.net> From: Alexander Richardson Date: Thu, 17 Sep 2020 18:22:39 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r365836 - head/share/mk To: rgrimes@freebsd.org Cc: Warner Losh , src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4BskLh6ZQRz4KJX X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; TAGGED_FROM(0.00)[]; REPLY(-4.00)[] 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:22:53 -0000 On Thu, 17 Sep 2020 at 18:05, Rodney W. Grimes wrote: > > > 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. However, unless you have linker relaxations (e.g. RISC-V) the compiler has to emit the large size anyway since the linker won't replace a 32-bit immediate with an 8-bit one since that changes all later offsets. Alex