Help us shape the future of Go! Take the 2026 Go Developer Survey

needread

command
v0.68.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 1, 2026 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Overview

Command needread prints the DT_NEEDED entries of every ELF under a tree, and refuses to report unless a symbol it was told to expect is actually there.

It exists because "this package links no openssl" and "this program cannot read a DT_NEEDED" print identically, and the second gets read as the first.

⛔ THAT IS NOT HYPOTHETICAL. On 2026-10-28 a sweep of a 189-project pantry with go-pkgx/bk's `bk unlinked` produced 140 findings, of which ten were C++ libraries reported as linking no C++ runtime. The finding was not surprising but IMPOSSIBLE, and that is the only reason anybody looked: the check had attributed `libstdc++.so.6` to whichever of two projects shipping a file of that name it walked last. A second reader, sharing no code with the first, is what settled it — and it was only worth trusting because its control passed.

needread -must libgcc_s.so.1 store/gnu.org/libiconv store/gnu.org/gcc

prints each ELF with its NEEDED list and then, having found the control, says so. If nothing under the roots needs that soname it exits non-zero and says the measurement proved nothing, rather than printing an absence that looks like a finding.

⛔ CHOOSE THE CONTROL SO IT CAN FAIL FOR THE RIGHT REASON. The first run of this against libiconv used `-must libstdc++.so.6` and failed — correctly: nothing in a three-package closure consumes it, so the control said nothing about the reader. Re-run with `libgcc_s.so.1`, which libstdc++ itself needs, it passed and the absence below it became evidence. A control naming something the tree has no reason to contain only measures the fixture.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL