-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unicorn ARM backend problems #382
Comments
i removed file you can recover the other missing files if you still cannot compile. thanks. |
Hooray, I've got it working on ARM! I added the missing file and the following line to
and that was enough. Thanks. |
Nice, so all samples/sample_xxx compiled and worked on ARM without any
issue?
|
We still have the original problem of not being able to link all architectures in at the same time. I worked around it by enabling just x86 and that works as expected. Plus all samples compile and execute fine as well. I'm pretty sure this should work for any of the remaining archs separately. |
can you paste the output error when compiling on ARM with default option? (just run |
Sure, it seems it manages to get to the linking stage nowadays: GEN ./libunicorn.so.0
/usr/bin/ld.gold.real: error: qemu/arm-softmmu/tcg/tcg.o: multiple definition of 'use_idiv_instructions'
/usr/bin/ld.gold.real: qemu/x86_64-softmmu/tcg/tcg.o: previous definition here
/usr/bin/ld.gold.real: error: qemu/arm-softmmu/tcg/tcg.o: multiple definition of 'tcg_target_deposit_valid'
/usr/bin/ld.gold.real: qemu/x86_64-softmmu/tcg/tcg.o: previous definition here
/usr/bin/ld.gold.real: error: qemu/m68k-softmmu/tcg/tcg.o: multiple definition of 'use_idiv_instructions'
/usr/bin/ld.gold.real: qemu/x86_64-softmmu/tcg/tcg.o: previous definition here
/usr/bin/ld.gold.real: error: qemu/m68k-softmmu/tcg/tcg.o: multiple definition of 'tcg_target_deposit_valid'
/usr/bin/ld.gold.real: qemu/x86_64-softmmu/tcg/tcg.o: previous definition here
/usr/bin/ld.gold.real: error: qemu/aarch64-softmmu/tcg/tcg.o: multiple definition of 'use_idiv_instructions'
/usr/bin/ld.gold.real: qemu/x86_64-softmmu/tcg/tcg.o: previous definition here
/usr/bin/ld.gold.real: error: qemu/aarch64-softmmu/tcg/tcg.o: multiple definition of 'tcg_target_deposit_valid'
/usr/bin/ld.gold.real: qemu/x86_64-softmmu/tcg/tcg.o: previous definition here
/usr/bin/ld.gold.real: error: qemu/mips-softmmu/tcg/tcg.o: multiple definition of 'use_idiv_instructions'
/usr/bin/ld.gold.real: qemu/x86_64-softmmu/tcg/tcg.o: previous definition here
/usr/bin/ld.gold.real: error: qemu/mips-softmmu/tcg/tcg.o: multiple definition of 'tcg_target_deposit_valid'
/usr/bin/ld.gold.real: qemu/x86_64-softmmu/tcg/tcg.o: previous definition here
/usr/bin/ld.gold.real: error: qemu/mipsel-softmmu/tcg/tcg.o: multiple definition of 'use_idiv_instructions'
/usr/bin/ld.gold.real: qemu/x86_64-softmmu/tcg/tcg.o: previous definition here
/usr/bin/ld.gold.real: error: qemu/mipsel-softmmu/tcg/tcg.o: multiple definition of 'tcg_target_deposit_valid'
/usr/bin/ld.gold.real: qemu/x86_64-softmmu/tcg/tcg.o: previous definition here
/usr/bin/ld.gold.real: error: qemu/mips64-softmmu/tcg/tcg.o: multiple definition of 'use_idiv_instructions'
/usr/bin/ld.gold.real: qemu/x86_64-softmmu/tcg/tcg.o: previous definition here
/usr/bin/ld.gold.real: error: qemu/mips64-softmmu/tcg/tcg.o: multiple definition of 'tcg_target_deposit_valid'
/usr/bin/ld.gold.real: qemu/x86_64-softmmu/tcg/tcg.o: previous definition here
/usr/bin/ld.gold.real: error: qemu/mips64el-softmmu/tcg/tcg.o: multiple definition of 'use_idiv_instructions'
/usr/bin/ld.gold.real: qemu/x86_64-softmmu/tcg/tcg.o: previous definition here
/usr/bin/ld.gold.real: error: qemu/mips64el-softmmu/tcg/tcg.o: multiple definition of 'tcg_target_deposit_valid'
/usr/bin/ld.gold.real: qemu/x86_64-softmmu/tcg/tcg.o: previous definition here
/usr/bin/ld.gold.real: error: qemu/sparc-softmmu/tcg/tcg.o: multiple definition of 'use_idiv_instructions'
/usr/bin/ld.gold.real: qemu/x86_64-softmmu/tcg/tcg.o: previous definition here
/usr/bin/ld.gold.real: error: qemu/sparc-softmmu/tcg/tcg.o: multiple definition of 'tcg_target_deposit_valid'
/usr/bin/ld.gold.real: qemu/x86_64-softmmu/tcg/tcg.o: previous definition here
/usr/bin/ld.gold.real: error: qemu/sparc64-softmmu/tcg/tcg.o: multiple definition of 'use_idiv_instructions'
/usr/bin/ld.gold.real: qemu/x86_64-softmmu/tcg/tcg.o: previous definition here
/usr/bin/ld.gold.real: error: qemu/sparc64-softmmu/tcg/tcg.o: multiple definition of 'tcg_target_deposit_valid'
/usr/bin/ld.gold.real: qemu/x86_64-softmmu/tcg/tcg.o: previous definition here |
can you pull the new branch "arm" (https://github.com/unicorn-engine/unicorn/tree/arm) and try to compile again on ARM to see if the problem is fixed? |
Yes, it does compile and link now, but doesn't work: LINK sample_arm
../libunicorn.so: error: undefined reference to 'use_idiv_instructions_mips'
../libunicorn.so: error: undefined reference to 'use_idiv_instructions_mipsel' |
can you pull from the "arm" branch now and try again? |
Now it's: LINK sample_arm
../libunicorn.so: error: undefined reference to 'use_idiv_instructions_rt_mips'
../libunicorn.so: error: undefined reference to 'use_idiv_instructions_rt_mipsel' |
can you try again now? |
That did it - all python tests pass and earlier I'd already built usercorn with it. Well done and thanks! |
Oh, one last thing - please have a look the samples' Makefile and the missing Cheers! |
missing "-lpthread"? why did you still compile and run the samples successfully? |
i merged the branch "arm" into "master", and deleted "arm". |
As I pointed out in the first comment, I had to pass |
see 69b784f. can you pull & try to compile again without your trick now? |
Indeed, the missing link has just got filled :) |
now if you can try to see if ARM64 backend works & report the result, that would be great! |
Can't help with that as I don't have the hardware. Hopefully someone on e.g. Tegra will hear your plea soon. |
i added ARM64 backend to the TODO list: https://github.com/unicorn-engine/unicorn/wiki/TODO |
I've just managed to build unicorn on ARM by using just a single architecture:
UNICORN_ARCHS="x86" make.sh
However, while building the samples we immediately get a hint something's wrong:
For some reason
LDFLAGS=-lpthread
needs to be exported manually which leaves:undefined reference to 'qemu_getauxval'
Naturally, the installed library doesn't work:
What gives?
The text was updated successfully, but these errors were encountered: