Page MenuHomeFreeBSD

rescue: Link libzutil after libzfs.
ClosedPublic

Authored by jhb on Sep 29 2022, 10:25 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Apr 17, 4:28 PM
Unknown Object (File)
Wed, Apr 17, 7:47 AM
Unknown Object (File)
Wed, Apr 17, 7:47 AM
Unknown Object (File)
Wed, Apr 17, 7:47 AM
Unknown Object (File)
Mon, Apr 15, 1:07 PM
Unknown Object (File)
Jan 12 2024, 2:27 PM
Unknown Object (File)
Dec 24 2023, 1:56 AM
Unknown Object (File)
Dec 24 2023, 1:56 AM
Subscribers

Details

Summary

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.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jhb requested review of this revision.Sep 29 2022, 10:25 PM

I would argue that this is a bug in ld.lld.

This revision is now accepted and ready to land.Sep 30 2022, 12:27 AM

There is a note about this in ld.lld's man page under IMPLEMENTATION NOTES. There is a --warn-backrefs option documented there that we may want to investigate.

This revision was automatically updated to reflect the committed changes.