Multiboot entry point
Hi!
I have a one question. GRUB requires have a kernel as an executable file (at least for ELF). This is not very good from user point. For example user can try to load such kernel at operating system and get something like "Segmentation fault".
I think that having kernel as a non-executable file (for example ET_REL for ELF) is better. However we need another "entry" point (special symbol). It is possible to have something like "multiboot_start". ...And doesn't have "_start" or "start" symbols in kernel at all.
Of course for backward compatibility GRUB can provide both variants (ET_EXEC with "_start" and ET_REL with "multiboot_start").
What do you think about it?
---------------------------------
Start your day with Yahoo! - make it your home page
Quoted 4 lines · Ruslan Nikolaev
I have a one question. GRUB requires have a kernel as an executable file (at least for ELF). This is not very good from user point. For example user can try to load such kernel at operating system and get something like "Segmentation fault".
I don't understand what is wrong with this. It is normal to get an error when the user executes a binary file which is not supposed to run on an alien environment.
Quoted 4 lines
I think that having kernel as a non-executable file (for example
ET_RELfor ELF) is better. However we need another "entry" point (special symbol). It is possible to have something like "multiboot_start". ...And doesn't have "_start" or "start" symbols in kernel at all.
I don't agree. From the view of boot loaders, a kernel is truly an executable. So it is natural to use ET_EXEC. Applying ET_REL is very strange, because a kernel is not a relocatable object (who relocates the kernel?).
Okuji
[QUESTION] Multiboot again
Yes, in general I agree with you. I think that prevents loading kernel will be better... but it's not a very principal question.
I HAVE ANOTHER QUESTION:
Kernel usual running in negative virtual address space. For example GRUB Legacy masks entry_point and all memory addresses of program segments with 0xFFFFFF when loading FreeBSD ELF. In contrast for multiboot ELF it loads directly.
I have a question: how can I run kernel in negative address space and use multiboot ELF. May be it is a very stupid question... but I really needs to know about it :)
"Yoshinori K. Okuji" <[email protected]> wrote:
Quoted 4 lines · Ruslan Nikolaev
I have a one question. GRUB requires have a kernel as an executable file (at least for ELF). This is not very good from user point. For example user can try to load such kernel at operating system and get something like "Segmentation fault".
I don't understand what is wrong with this. It is normal to get an error when the user executes a binary file which is not supposed to run on an alien environment.
Quoted 4 lines
I think that having kernel as a non-executable file (for example
ET_RELfor ELF) is better. However we need another "entry" point (special symbol). It is possible to have something like "multiboot_start". ...And doesn't have "_start" or "start" symbols in kernel at all.
I don't agree. From the view of boot loaders, a kernel is truly an executable. So it is natural to use ET_EXEC. Applying ET_REL is very strange, because a kernel is not a relocatable object (who relocates the kernel?).
Okuji
_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel
---------------------------------
Start your day with Yahoo! - make it your home page
Re: [QUESTION] Multiboot again
Quoted 4 lines · Ruslan Nikolaev
Kernel usual running in negative virtual address space. For example GRUB Legacy masks
entry_pointand all memory addresses of program segments with0xFFFFFFwhen loading FreeBSD ELF. In contrast for multiboot ELF it loads directly.
I am afraid that you are a bit confused. The mask 0xFFFFF for FreeBSD is just a convention in the boot protocol of FreeBSD. Honestly, I have no idea why it is necessary, but this does have any relation with the address space.
Quoted 3 lines
I have a question: how can I run kernel in negative address space and use multiboot ELF. May be it is a very stupid question... but I really needs to know about it :)
I don't see what you mean by "negative address". Addresses are always counted from 0...
Okuji