4 ms·
This is for glibc. I think Musl C library has a different way of doing dynamic linking. Can the same thing be done with Musl libc?
by bediger4000 4y ago
This is for glibc. I think Musl C library has a different way of doing dynamic linking. Can the same thing be done with Musl libc?
- stabbles 4y agoIt works there too $ apk add gcc libc-dev $ gcc -shared -o hello -Wl,--entry,main hello.c -D 'PT_INTERP="/lib/ld-musl-x86_64.so.1"' $ gcc -o main main.c -L. -l:hello -Wl,-rpath,. $ ./main hello $ ./hello hello hello