From nobody Tue Oct 04 16:33:11 2022 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Mhjtd34nQz4fChl; Tue, 4 Oct 2022 16:33:13 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Mhjtd2S7Kz46BK; Tue, 4 Oct 2022 16:33:13 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1664901193; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+Gs7c3slyym82Kqf7L4T8N5I5zeFFdFoCxbstZeo0Zo=; b=XXKHTfwIKg3mE8nmePS5jjXraUOGTFyuaIwm7tN+6OKBylUUPNiiSUnw6gnRpIc5VtgUPo jyYCLoZ34RElIasyW5XXK8Gz/ZJ7hLkSgnVwuDnTeRZfScJkQGE6PdYKQUIDcv8pGGHaIK mFLaxUzRACVprhWJTYtfP2HcOTSU1sjEfLDdsDV2b4omftePwogG6k46B/5E7N9hk+WW9M 2DJYh4RTg6QLylq1nPL04Qzdi8fIhNDbpmoRurFrBtHW2QEw+fBvNT0psPiQGv4///Oari CqvOXm7hv/MZ7cIWiDQa+X6l5uaAhIaQcJGbcB+yJBFfhRD2C6iGBFImKt3kQw== Received: from [IPV6:2601:648:8684:ad0:c138:fd94:ebf2:bb32] (unknown [IPv6:2601:648:8684:ad0:c138:fd94:ebf2:bb32]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Mhjtc5St5z1ND6; Tue, 4 Oct 2022 16:33:12 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: Date: Tue, 4 Oct 2022 09:33:11 -0700 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.13.1 Subject: Re: 5e4854cbf8d8 - main - rescue: Link libzutil after libzfs. Content-Language: en-US To: Ravi Pokala , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202210032311.293NBKEd065568@gitrepo.freebsd.org> <1BB1F50E-C679-4570-8C7C-582B8C83CAD6@panasas.com> From: John Baldwin In-Reply-To: <1BB1F50E-C679-4570-8C7C-582B8C83CAD6@panasas.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1664901193; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+Gs7c3slyym82Kqf7L4T8N5I5zeFFdFoCxbstZeo0Zo=; b=J2EEshmMbPk+73FwwLWOhBfKDaudP9wohziKYHI9uc18IbCA2rovLaFhuSXhuYaF1ppOvD 602nbZnDAAYC3TJ9Gf9cQtd2fvWHSX/fp8r0uG1XBuWjwbs2i169GRsGN/Vjv8kWm5EEHC urZageRfBPfyZPSL0+028YoEMKbaomaNqz8aRi2YhPrPxCjAKjoL9SRuTkU6aJNECeZkrQ /tQ8/gql/fZGAc5fK8rLJlkA4HrAzA4+1DLRFfAKvAjUckXYvoF+CAUv2C2z43DQss8PTA ptzoyZ9g/p5d6KzBWREOzFWVhUpzJjQXGVZLg2B+mJahXZ5RkelhSX1Kua+16A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1664901193; a=rsa-sha256; cv=none; b=KPif6Vt3hLQ2Qq/u3ewD3tYk53zPZtc1iKiSb3mZOc3aw8Ti1UrQu9Y9IjHtLoeYbYrMwx cm5EK5LkvbHPH70RXPvhB5lkr90+nU49J+xqCiEkX4hQFdC/QFQefQfzGCIqWCnJ7sMQKy NjkLY0jWWSra37Bt77pu4GZJnXb00vBU4FqWhKS190Bh824mHjz9R+xB87n/Ef7De8JDJu bqoVVA1FYHVUMLDKUi6uCaW2BWiSmkIfTLkJmX5Jt2MQBfK3xAdTYD5BIVgNbZAYflKahz rtJiaqrWOEzkjBdofJ+qVLg4Lp7S6OXLLA9BRF/PSvL5bqRF0Zs0XFriD3IkZQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N On 10/3/22 8:03 PM, Ravi Pokala wrote: > -----Original Message----- > From: on behalf of John Baldwin > Date: 2022-10-03, Monday at 16:11 > To: , , > Subject: git: 5e4854cbf8d8 - main - rescue: Link libzutil after libzfs. > > The branch main has been updated by jhb: > > URL: https://cgit.FreeBSD.org/src/commit/?id=5e4854cbf8d8a9b056472967d15e1021d36fcae1 > > commit 5e4854cbf8d8a9b056472967d15e1021d36fcae1 > Author: John Baldwin > AuthorDate: 2022-10-03 23:10:42 +0000 > Commit: John Baldwin > CommitDate: 2022-10-03 23:10:42 +0000 > > rescue: Link libzutil after libzfs. > > libzfs depends on symbols defined in libzutil. For static linking > ld.bfd is less forgiving than lld, so rescue was failing to link when > using ld.bfd due to unresolved symbols from libzutil used by libzfs. > > You're solving an issue of unresolved symbols by putting the library where they're defined *after* the library where they're used? > > -Ravi (rpokala@) Yes, that's normally how that works (you link libc last, not first). lld is just a bit different as it will look in earlier libraries to resolve symbols (backwards references) not just forward references. ld.bfd only does forward references by default. -- John Baldwin