jmpews / Dobby

a lightweight, multi-platform, multi-architecture hook framework.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

release file `arm64/libdobby.so` has an incorrect arch caused by mistake in cmake file

DiamondHunters opened this issue · comments

I got an error "/usr/bin/ld: skipping incompatible /home/rock/src/libdobby.a when searching for -ldobby"
Then,I found that linux/arm64/libdobby.so is an x86-64 file.

rock@rock-5b:~/src$ file `find linux/ |grep dobby.so`
linux/x86_64/libdobby.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, not stripped
linux/arm64/libdobby.so:  ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, not stripped
linux/arm/libdobby.so:    ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, not stripped
linux/x86/libdobby.so:    ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, not stripped

rock@rock-5b:~/src$ md5sum `find linux/ |grep dobby.so`
dee9c0578d2385b5e8ab7c4f996426ce  linux/x86_64/libdobby.so
dee9c0578d2385b5e8ab7c4f996426ce  linux/arm64/libdobby.so
18da12a607c414dd41454d4a49d6e499  linux/arm/libdobby.so
5200600198d8c06c54682e803e24e511  linux/x86/libdobby.so

After a period of investigation, I found that it was caused by a small issue in https://github.com/jmpews/Dobby/blob/b0176de574104726bb68dff3b77ee666300fc338/cmake/compiler_and_linker.cmake.