Skip to content
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

Cannot build with ./compile_qemu_nyx.sh because of bad dependencies in libxdc #63

Open
GanbaruTobi opened this issue Apr 4, 2024 · 0 comments

Comments

@GanbaruTobi
Copy link

GanbaruTobi commented Apr 4, 2024

libxdc wants to link capstone_v4, but the path is unknown.
For ./compile_qemu_nyx.sh something like these changes in the Makefile for libxdc will work:

libxdc.so: $(OBJ)
	$(CC) $^ -o $@ -shared $(CFLAGS) $(LDFLAGS) -L../capstone_v4/ -l:libcapstone.so.4

libxdc.a: $(OBJ)
	$(AR) rcs $@ $^

ptdump: libxdc.so test/*.c test/*.h
	$(CC) test/ptdump.c test/page_cache.c test/helper.c -o build/$@ -Itest/ -I./ -Lbuild/ $(CFLAGS) $(LDFLAGS) -L. -lxdc -L../capstone_v4/ -l:libcapstone.so.4

ptdump_static: libxdc.a test/*.c test/*.h
	$(CC) test/ptdump.c test/page_cache.c test/helper.c -o build/$@ -Itest/ -I./ $(CFLAGS) $(LDFLAGS) -L. -l:libxdc.a -L../capstone_v4/ -l:libcapstone.a

tester_dyn: libxdc.so test/*.c test/*.h
	$(CC) test/tester.c test/page_cache.c test/helper.c -o $@ -Itest/ -I./ $(CFLAGS) $(LDFLAGS) -L. -lxdc -L../capstone_v4/ -l:libcapstone.so.4

tester_static: libxdc.a test/*.c test/*.h
	$(CC) test/tester.c test/page_cache.c test/helper.c -o $@ -Itest/ -I./ $(CFLAGS) $(LDFLAGS) -L. -l:libxdc.a -L../capstone_v4/ -l:libcapstone.a

But I don't know what a good solution would be to integrate the changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant