diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-03-12 23:29:43 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-03-12 23:29:43 +0900 |
| commit | d22145a3926de9710d5bd76ddfde093baca0b51d (patch) | |
| tree | b2dba710921e4803983401ced51549400039ba07 /ldd | |
| parent | 29c3f8becb875de308be9238f5ca0ba9f35eb7bd (diff) | |
ldd: handle musl static behaviour
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'ldd')
| -rw-r--r-- | ldd/exec.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ldd/exec.go b/ldd/exec.go index 3eb94931..5c51c6a2 100644 --- a/ldd/exec.go +++ b/ldd/exec.go @@ -14,6 +14,7 @@ import ( const lddTimeout = 2 * time.Second var ( + msgStatic = []byte("Not a valid dynamic program") msgStaticGlibc = []byte("not a dynamic executable") ) @@ -46,7 +47,8 @@ func Exec(ctx context.Context, p string) ([]*Entry, error) { } if err := h.Wait(); err != nil { m := stderr.Bytes() - if bytes.Contains(m, msgStaticGlibc) { + if bytes.Contains(m, append([]byte(p+": "), msgStatic...)) || + bytes.Contains(m, msgStaticGlibc) { return nil, nil } |
