Use `ld` from the base snap for library linting
Metadata
Current evaluation
No evaluation has been recorded for this issue yet.
Issue body
### What needs to get done
Instead of using `ldd` from the host, use `ld --list` from the base snap (`/snap/coreXX/current/lib64/ld-linux-x86-64.so.2 --list`).
[`pyelftools`](https://github.com/eliben/pyelftools) may have some helpful utilties
### Why it needs to get done
`snapcraft lint` has unknown symbol warnings for core24, because it tries to use a linker from the host (a 22.04 environment) with core24's glibc ([source](https://github.com/canonical/snapcraft/blob/05ef28087a0687a8c5a07e4f979c0a70e2fc3b49/snapcraft/elf/_elf_file.py#L450)).
See #4748 for more context
Evaluation history
No evaluation history available.