unikernelLinux / ukl

Unikernel Linux
GNU Lesser General Public License v2.1
175 stars 14 forks source link

Error - Function does not exist when trying to create Unikernel #32

Open ItzPires opened 6 months ago

ItzPires commented 6 months ago

Hello! I want to create a Unikernel to run a programme, I tried Hello Word and it worked, but when I tried cyclictest, no, it gives an error. I was following the line of what is written "README" on GitHub, it turns out that when I try to compile, when executing make boot, an error occurs:

ld: fs/binfmt_elf.o: in function `load_elf_binary':
/home/samuel/Desktop/Unikernels/ukl/linux/fs/binfmt_elf.c:1271: undefined reference to `ukl__start'
ld: fs/compat_binfmt_elf.o: in function `load_elf_binary':
/home/samuel/Desktop/Unikernels/ukl/linux/fs/binfmt_elf.c:1271: undefined reference to `ukl__start'

I made a little python to scan all the files and look for "ukl__start" and it turns out that it only found one file, the file that is in the error log. There is no link. Can you tell me anything about this? Or if I'm doing something wrong?

Thank you!

rwmjones commented 5 months ago

On Thu, Mar 28, 2024 at 09:47:47AM -0700, Samuel Pires wrote:

I made a little python to scan all the files and look for "ukl__start" and it turns out that it only found one file, the file that is in the error log. There is no link.

Sorry I missed this from before. UKL prefixes all symbols with ukl_ using a linker script, so the actual symbol is _start. That symbol is the standard entry point for programs, generated by the C compiler and/or crt0.