Page 1 of 1

AOUT Kludge?

Posted: Sun Aug 08, 2004 4:41 am
by jinksys
This may be a noobish question but what exactly is this "aout kludge" thing I heard so much of ? ::)

I know what the aout format is, but I have no idea what a kludge is.

edit: KLUDGE: A derogatory term that refers to a poor design. Like hacks, kludges use nonstandard techniques. But, whereas a hack can connote a clever solution to a problem, a kludge always implies that the solution is inelegant.

alright...so a kludge is a inelegant hackjob, but the question still stands,
what is the aout kludge?

Re:AOUT Kludge?

Posted: Sun Aug 08, 2004 6:11 am
by Legend
When you want to load your kernel using a multiboot-compliant bootloader like GRUB and your kernel is in a.out format, you need to supply an a.out kludge in the multiboot header of your kernel. This allows grub to know where to load the kernel, too, without knowing the exact a.out format (as there seem to be a lot) and with binary files.

When really linking to a.out this solution is still inelegant, as the a.out format itself basically should contain this information.

For example when using the ELF format, GRUB does not need an a.out kludge.

Re:AOUT Kludge?

Posted: Sun Aug 08, 2004 10:29 am
by srg
You also use it for COFF and windows PE based kernels.

srg

Re:AOUT Kludge?

Posted: Sun Aug 08, 2004 10:46 am
by Candy
srg wrote: You also use it for COFF and windows PE based kernels.

srg
Not to confuse our careful readers, PE is derived from COFF. You can use the AOUT kludge to load any format the Multiboot-loader you use doesn't recognise, and should (imo) be used for all formats, to ensure it's loadable by all multiboot-loaders. It can thus also be used for OMF files (if you don't care to link through, be sure your linker patches up all the links, or do it while loading), binary files, DOS-style COM files, or even some very awkward format you define yourself.

Hoping to help and being a pain in the @$$ about details, Candy