Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: package: forcibly treat libc as a shared library #538

Merged
merged 2 commits into from
Jul 7, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion pkg/build/package.go
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,10 @@ func generateSharedObjectNameDeps(pc *PackageContext, generated *Dependencies) e
// An executable program should never have a SONAME, but apparently binaries built
// with some versions of jlink do. Thus, if an interpreter is set (meaning it is an
// executable program), we do not scan the object for SONAMEs.
if !pc.Options.NoProvides && interp == "" {
//
// Ugh: libc.so.6 has an PT_INTERP set on itself to make the `/lib/libc.so.6 --about`
// functionality work. So we always generate provides entries for libc.
if !pc.Options.NoProvides && (interp == "" || strings.HasPrefix(basename, "libc")) {
sonames, err := ef.DynString(elf.DT_SONAME)
// most likely SONAME is not set on this object
if err != nil {
Expand Down