> Vincent, can you run file and readelf -d on the sinit binary you > compiled using the gcc-musl wrapper? That will tell us if it worked. > > The output of readelf -d should look like this: > > 0x0000000000000001 (NEEDED) Shared library: [libc.so] > 0x000000000000001d (RUNPATH) Library runpath: > [/nix/store/16c974l1kqra3cr475gcgy2gsii45liq-musl-1.1.14/lib] > > and the output of file should look like this: > > ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically > linked, interpreter > /nix/store/16c974l1kqra3cr475gcgy2gsii45liq-musl-1.1.14/lib/libc.so, > not stripped
The default sinit build process uses -static, so I get: $ l /gnu/store/zfbhkbcfjpmnarsid9wl0q4ssswps96p-sinit-1.0/bin/sinit -r-xr-xr-x 2 root root 9.3K Jan 1 1970 /gnu/store/zfbhkbcfjpmnarsid9wl0q4ssswps96p-sinit-1.0/bin/sinit $ file /gnu/store/zfbhkbcfjpmnarsid9wl0q4ssswps96p-sinit-1.0/bin/sinit /gnu/store/zfbhkbcfjpmnarsid9wl0q4ssswps96p-sinit-1.0/bin/sinit: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, stripped $ readelf -d /gnu/store/zfbhkbcfjpmnarsid9wl0q4ssswps96p-sinit-1.0/bin/sinit There is no dynamic section in this file. And I think that shows it worked, just the static way... Do you prefer dynamically linked ? -- Vincent Legoll