Skip to content

Commit

Permalink
In Alpine Linux, ld-musl-x86_64.so.1 links to libc.musl-x86_64.so.1
Browse files Browse the repository at this point in the history
  • Loading branch information
probonopd committed Nov 3, 2024
1 parent 247d2a5 commit 6bb9713
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/appimagetool/appdirtool.go
Original file line number Diff line number Diff line change
Expand Up @@ -779,11 +779,11 @@ func patchRpathsInElf(appdir helpers.AppDir, libraryLocationsInAppDir []string,
return
}

// If the file starts with ld-, we don't want to patch it
// If the file starts with ld- or libc., we don't patch the rpath
// NOTE: In Alpine Linux, ld-musl-x86_64.so.1 links to libc.musl-x86_64.so.1
basePath := filepath.Base(path)
log.Println("Checking whether", basePath, "starts with ld-")
if strings.HasPrefix(basePath, "ld-") {
log.Println("Not patching rpath because file starts with ld-")
if strings.HasPrefix(basePath, "ld-") || strings.HasPrefix(basePath, "libc.") {
log.Println("Not patching rpath because file starts with ld- or libc.")
} else {
// Call patchelf to set the rpath
if helpers.Exists(path) == true {
Expand Down

0 comments on commit 6bb9713

Please sign in to comment.