rui314 / mold

Mold: A Modern Linker 🦠
MIT License
13.69k stars 448 forks source link

/usr/lib/mold/mold-wrapper.so: unsupported relocation type 1026 #1271

Closed DaKnig closed 1 month ago

DaKnig commented 1 month ago

trying to link my app with mold, using mold -run cargo build --target=aarch64-alpine-linux-musl . code can be found on https://github.com/DaKnig/DewDuct . mold version 2.31.0

rui314 commented 1 month ago

I believe you downloaded the mold binary distribution from our release page. Unfortunately, they are built for glibc-based systems and may not work with musl libc. You may want to rebuild mold yourself.

DaKnig commented 1 month ago

I used mold from alpine repos, in an alpine chroot, using pmbootstrap.

rui314 commented 1 month ago

OK, then please report it to Alpine. The problem is LD_PRELOAD=/usr/lib/mold/mold-wrapper.so doesn't work. I believe mold itself was not even run when the error message is displayed, as it seems that's a loader's error message. They probably need to rebuild mold-wrapper.so in an appropriate environment.