xrw67 / elfloader

load so file into current memory space and run function
MIT License
80 stars 28 forks source link

Problem with __fxstat #2

Closed mosebit closed 1 year ago

mosebit commented 1 year ago

I can't build solution:

gcc -Wall -g -o elfloader elf_loader.h elf_loader.c main.c wheelc/list.c -ldl -lm -lpthread elf_loader.c: In function ‘run_elf_module’: elf_loader.c:1106:33: error: ‘__fxstat’ undeclared (first use in this function); did you mean ‘fstat’? 1106 | functions[N_FXSTAT] = fxstat; | ^~~~ | fstat elf_loader.c:1106:33: note: each undeclared identifier is reported only once for each function it appears in make: *** [Makefile:2: all] Error 1

Thank you for any help!

mosebit commented 1 year ago

I didn't understand why this happens, but on Ubuntu 16.04.7 LTS, the project is going without problems, and on Ubuntu 22.04.2 LTS, the __fxstat function causes problems. I hope I helped someone!