Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 May 2010 22:15:02 +0300
From:      Kostik Belousov <kostikbel@gmail.com>
To:        d@delphij.net
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org, Rob Farmer <rfarmer@predatorlabs.net>, Xin LI <delphij@freebsd.org>, svn-src-head@freebsd.org, Garrett Cooper <yanefbsd@gmail.com>
Subject:   Re: svn commit: r208545 - in head/release: amd64 i386 ia64 pc98 powerpc sparc64 sun4v
Message-ID:  <20100526191502.GG83316@deviant.kiev.zoral.com.ua>
In-Reply-To: <4BFD6F80.8030700@delphij.net>
References:  <201005251748.o4PHmI5T093246@svn.freebsd.org> <AANLkTilcASoInnpr5OL5usR7exerst2lTq7Wi_ypD_Tw@mail.gmail.com> <AANLkTimC39JXRyAAQnXI5qjHnIhLwczCPn22r8XmnhBu@mail.gmail.com> <4BFD6F80.8030700@delphij.net>

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

--Ra+QPBLzfvE2u76S
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, May 26, 2010 at 11:59:12AM -0700, Xin LI wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>=20
> On 2010/05/26 11:47, Garrett Cooper wrote:
> > On Wed, May 26, 2010 at 11:28 AM, Rob Farmer <rfarmer@predatorlabs.net>=
 wrote:
> >> On Tue, May 25, 2010 at 10:48 AM, Xin LI <delphij@freebsd.org> wrote:
> >>> Author: delphij
> >>> Date: Tue May 25 17:48:17 2010
> >>> New Revision: 208545
> >>> URL: http://svn.freebsd.org/changeset/base/208545
> >>>
> >>> Log:
> >>>  libarchive now needs libcrypto and liblzma.
> >>>
> >>> Modified:
> >>>  head/release/amd64/boot_crunch.conf
> >>>  head/release/i386/boot_crunch.conf
> >>>  head/release/ia64/boot_crunch.conf
> >>>  head/release/pc98/boot_crunch.conf
> >>>  head/release/powerpc/boot_crunch.conf
> >>>  head/release/sparc64/boot_crunch.conf
> >>>  head/release/sun4v/boot_crunch.conf
> >>>
> >>> Modified: head/release/amd64/boot_crunch.conf
> >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D
> >>> --- head/release/amd64/boot_crunch.conf Tue May 25 17:43:23 2010     =
   (r208544)
> >>> +++ head/release/amd64/boot_crunch.conf Tue May 25 17:48:17 2010     =
   (r208545)
> >>> @@ -39,6 +39,6 @@ progs ppp
> >>>  progs sysinstall
> >>>  progs usbconfig
> >>>
> >>> -libs -ll -ledit -lutil -lmd -lcrypt -lftpio -lz -lnetgraph
> >>> +libs -ll -ledit -lutil -lmd -lcrypt -lcrypto -lftpio -lz -lnetgraph
> >>>  libs -ldialog -lncurses -ldisk -lcam -lsbuf -lufs -ldevinfo
> >>> -libs -lbsdxml -larchive -lbz2 -lusb -ljail
> >>> +libs -lbsdxml -larchive -lbz2 -llzma -lusb -ljail
> >>>
> >>
> >> Does the order of the libs entries matter? Because I just tried on
> >> i386 after this commit and I still get errors related to the sha1,
> >> md5, etc. functions but it worked fine with -llzma -lcrypto at the end
> >> of the last line.
> >=20
> >     In theory it shouldn't because the linker should be smart enough
> > to evaluate the dependencies and link everything properly, but our
> > copy of binutils isn't intelligent enough to determine the appropriate
> > order from what I've seen.
>=20
> Bad last minute change from me, I overlooked this :-/
>=20
> Will a newer GNU ld solve this issue?

The behaviour is the standard for any unix linker I ever saw.
Static libraries participate in symbol resolution only at the point
they appear on the command line. Linker makes as many passes over
the single library as needed to not have any unresolved symbols that
can be resolved from the archive, then moves to the next.

There are facilities that allow to change the behaviour, either by
grouping the libraries, see --start-group switch, or by repeating
the library several times at the proper place in the command line.

Comments about "linker not being smart enough" are nonsense.

--Ra+QPBLzfvE2u76S
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (FreeBSD)

iEYEARECAAYFAkv9czYACgkQC3+MBN1Mb4jLewCg9mZYzA8zka9rsbRtRZLRHYyx
ZogAoKD4XJiojcgJ6BEj5f/w82w0XfhB
=YwEN
-----END PGP SIGNATURE-----

--Ra+QPBLzfvE2u76S--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100526191502.GG83316>