0

What is inside vesamenu.c32?

I need NOT know the PURPOSE of this file, I wish to know what it is.

Are there machine instructions inside or what? If yes, then what are they doing?

Dims
  • 3,255

1 Answers1

1

file says

/usr/lib/syslinux/modules/bios/vesamenu.c32: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, stripped

so it's a 32-bit binary for Intel CPUs. It's built from the files in com32/menu; the code allows a menu to be defined and displayed.

Stephen Kitt
  • 434,908
  • Does this code contain network (like TFTP) reading instructions or just functions to operate video buffer? Can I see it's entry points or something? – Dims Oct 25 '16 at 07:01
  • You're a C programmer, you should be able to figure it out easily enough ;-). – Stephen Kitt Oct 25 '16 at 08:03
  • Yes, I can see something, thanks for providing link to source code, but I don't understand the final file structure. Can I just load it into memory and pass control to some starting point? Or I just get some functions which I can call? Is this the same as "kernel"? – Dims Oct 25 '16 at 10:06
  • You can't quite run it directly, but control starts at main() in mainmenu.c in the standard way for C programs. From SYSLINUX it is loaded like a kernel (from run_default.c), and the process from there to main() is handled by the crt0 code. – Stephen Kitt Oct 25 '16 at 12:12
  • Why doesn't file command report "LSB shared object" for kernel image then? (it reports DBF file for me, probably by mistake)? Looks like kernel is raw code? Or loader can determine the type of imge dynamically? – Dims Oct 25 '16 at 12:24
  • Nowadays the kernel is an EFI-compatible PE binary which also happens to start with a valid boot sector. The SYSLINUX loader handles various types of images; you should really try to read the code yourself (starting from run_default.c if you're interested in the loader), it's quite straightforward. What are you actually trying to figure out? – Stephen Kitt Oct 25 '16 at 15:27
  • I would like to fill my knowledge gap to be able to compose various boot menus etc – Dims Oct 25 '16 at 17:08