kdave / btrfs-progs

Development of userspace BTRFS tools
GNU General Public License v2.0
550 stars 241 forks source link

btrfs-progs: crypto: fix readonly relocation of the jumptable #675

Closed kaniini closed 1 year ago

kaniini commented 1 year ago

Without this, the btrfs programs fail to link when build with -Wl,-z,relro, due to the jumptable containing relocations.

nekopsykose commented 1 year ago

i tested removing the GLIBC ifdefs from 992be8b50a65974e52a484911e72bc5a5e1b412c, and this now works fine on musl (which was using a -z relro toolchain all along) , so you could also lift those i think

kdave commented 1 year ago

Thanks for the fix. I've removed the glibc workaround as a separate patch as well, thanks for the suggestion.

kdave commented 1 year ago

The 32bit build on musl fails because the asm implementation is using 64bit instructions. The glibc 32bit works in OBS but would probably fail to run on a real 32bit machine.