From owner-freebsd-current@freebsd.org Mon May 14 23:55:43 2018 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C6AA4EA87A2 for ; Mon, 14 May 2018 23:55:43 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 63A5B75A5F for ; Mon, 14 May 2018 23:55:43 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: by mailman.ysv.freebsd.org (Postfix) id 20F8FEA87A1; Mon, 14 May 2018 23:55:43 +0000 (UTC) Delivered-To: current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0F5E0EA87A0 for ; Mon, 14 May 2018 23:55:43 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 90CAB75A5D; Mon, 14 May 2018 23:55:42 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from coleburn.home.andric.com (coleburn.home.andric.com [192.168.0.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 1001653468; Tue, 15 May 2018 01:46:19 +0200 (CEST) From: Dimitry Andric Message-Id: Content-Type: multipart/signed; boundary="Apple-Mail=_F918EBE5-EB57-42D3-B15A-CB527D8CD307"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 11.3 \(3445.6.18\)) Subject: Re: HEADS-UP: Linker issues building amd64 kernels with config & make Date: Tue, 15 May 2018 01:46:13 +0200 In-Reply-To: Cc: "Julian H. Stacey" , current To: Ed Maste References: <201805142205.w4EM5j5w010919@fire.js.berklix.net> X-Mailer: Apple Mail (2.3445.6.18) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.26 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, 14 May 2018 23:55:44 -0000 --Apple-Mail=_F918EBE5-EB57-42D3-B15A-CB527D8CD307 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 15 May 2018, at 00:58, Ed Maste wrote: >=20 > On 14 May 2018 at 18:05, Julian H. Stacey wrote: >>=20 >> I guess this explains : >> Date: Sun, 13 May 2018 20:26:38 +0200 >> Subject: cd /sys/amd64/compile/GENERIC;make cleandepend; make = cleandepend >> .svn_revision 333575 >> linking kernel.full >> iflib.o:(.rodata+0x178): undefined reference to `noop_attach' >> iflib.o:(.rodata+0x188): undefined reference to = `iflib_pseudo_detach' >=20 > No, that's something else; I haven't seen that problem before. >=20 > Note that we've been using lld as the default bootstrap linker (i.e., > the linker used to link the world and kernel via 'make buildworld' and > 'make buildkernel') since Jan 10 (r327783). >=20 >> PS Bloat factor > 20: 2M static V 40M dynamic, >=20 > Keep in mind that the in-tree ld.bfd was released over a decade ago, > and has been obsolete for years now; a dynamically-linked contemporary > ld.bfd 12MB. lld is much faster than any of them (more than 20x > compared to in-tree ld.bfd on some operations) and all of the target > architectures are supported by a single binary. Not just that: since lld can do link time optimization (LTO), it also contains large parts of LLVM, e.g. the backend of the compiler. We could maybe save some space by putting all the LLVM stuff into a separate dynamic library, and re-using that from both clang and lld, but such a dynamic library has its own issues. (Takes a long time and lots of memory to link, and probably takes quite some time to dynamically load at runtime too.) -Dimitry --Apple-Mail=_F918EBE5-EB57-42D3-B15A-CB527D8CD307 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.2 iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCWvofxQAKCRCwXqMKLiCW o6fLAKDaMI5uW/1iefhUIEFPqzbA3MOn8wCg9kmf7AUL9rOqE8S+OQsVOKT/ajI= =qP6/ -----END PGP SIGNATURE----- --Apple-Mail=_F918EBE5-EB57-42D3-B15A-CB527D8CD307--