AOUT Kludge?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
jinksys

AOUT Kludge?

Post 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?
Legend

Re:AOUT Kludge?

Post 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.
srg

Re:AOUT Kludge?

Post by srg »

You also use it for COFF and windows PE based kernels.

srg
User avatar
Candy
Member
Member
Posts: 3882
Joined: Tue Oct 17, 2006 11:33 pm
Location: Eindhoven

Re:AOUT Kludge?

Post 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
Post Reply