[SeaBIOS] Adding independent code to seabios

Владимир Салыкин neraverin at gmail.com
Wed Jan 12 08:44:17 CET 2011

First of all sorry for my bad English. I want to add some code to
seabios. I've add new .c file with one function. I want this code to
be run from Windows running on qemu-kvm.
This function have VISIBLE32FLAT and __attribute((used)) and noinline
prefix. I've add my .c file to FLAT32SRC list. But after compiling
this code is excluded from bios.bin (linker thinks that it will never
used and dismiss it). If I call this function in test mode in _start()
function, then after compilation this code is present in bios.bin. Is
there any way to add independent code to bios.bin without calling
functions in test mode?How to tell linker not to exclude this code?
The second question is how to find the location of this function in
bios.bin. As I understand it does not have the export table, how to
find the beginning of my function?

Thanks in advance.

More information about the SeaBIOS mailing list