Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 May 2018 01:46:13 +0200
From:      Dimitry Andric <dim@FreeBSD.org>
To:        Ed Maste <emaste@freebsd.org>
Cc:        "Julian H. Stacey" <jhs@berklix.com>, current <current@freebsd.org>
Subject:   Re: HEADS-UP: Linker issues building amd64 kernels with config & make
Message-ID:  <ADA4F2D6-87DC-431C-8BDD-494FCCBB701B@FreeBSD.org>
In-Reply-To: <CAPyFy2Ae0hXGZJTiiz8Q6NAWd1-7_j2UHFsm=20zJ3WJKL9fng@mail.gmail.com>
References:  <CAPyFy2CyLChddhe7ONpTiJHA3HBrXJ_DXFCbkPyYNA7AxnzeUA@mail.gmail.com> <201805142205.w4EM5j5w010919@fire.js.berklix.net> <CAPyFy2Ae0hXGZJTiiz8Q6NAWd1-7_j2UHFsm=20zJ3WJKL9fng@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--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 <emaste@freebsd.org> wrote:
>=20
> On 14 May 2018 at 18:05, Julian H. Stacey <jhs@berklix.com> 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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ADA4F2D6-87DC-431C-8BDD-494FCCBB701B>