nibblebits / PeachOS

Simple kernel designed for a online course
GNU General Public License v2.0
133 stars 55 forks source link

Incorrect variable type #3

Open dmatthe4952 opened 2 years ago

dmatthe4952 commented 2 years ago

In the lecture 94, you have elf32_off defined as a int32_t. The manual I am looking at describes it as an unsigned 4 byte integer. Wouldn't that be uint32_t?

nibblebits commented 2 years ago

Thanks very much for this, it will be useful for other students who come to this repository. Message for the students: This should not be a huge problem for our simple kernel because even with a signed integer we still have over 2 billion bytes to work with. However yes the ELF manual does state that it should be unsigned, feel free to change it if you feel the need too. I will be making a new video soon to fix some of the found issues in this repository.

Thanks again for spotting that.

nibblebits commented 2 years ago

This is the file: https://github.com/nibblebits/PeachOS/blob/master/src/loader/formats/elf.h Line: 65