logoalt Hacker News

craftkiller • today at 3:31 PM • 2 replies • view on HN

Neat project. One thing I don't see covered: is everything going to be statically linked like it is on Alpine Linux? Is statically linking libc advisable on a NetBSD kernel? I know (unlike Linux) the FreeBSD kernel ABI can change every major release, but I'm not familiar with NetBSD's approach.


Replies

Intralexical • today at 3:59 PM

Alpine Linux is not statically linked. It provides a musl environment which makes it easy to statically link your own builds, but software shipped as part of the distro is usually dynamically linked.

  $ docker run -it --rm alpine

  / # apk add cmd:ldd
  / # ldd $(which ash)
          /lib/ld-musl-x86_64.so.1 (0x7f4cb4d1d000)
          libc.musl-x86_64.so.1 => /lib/ld-musl-x86_64.so.1 (0x7f4cb4d1d000)

  / # apk add cmd:python3
  / # ldd $(which python3)
          /lib/ld-musl-x86_64.so.1 (0x7fd630cab000)
          libpython3.12.so.1.0 => /usr/lib/libpython3.12.so.1.0 (0x7fd63069a000)
          libc.musl-x86_64.so.1 => /lib/ld-musl-x86_64.so.1 (0x7fd630cab000)
➕ show 1 reply
rjsw • today at 3:43 PM

NetBSD retains the old ABI as well if anything changes to a syscall.