PeachOS icon indicating copy to clipboard operation
PeachOS copied to clipboard

Incorrect variable type

Open dmatthe4952 opened this issue 3 years ago • 2 comments

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?

dmatthe4952 avatar Feb 17 '22 19:02 dmatthe4952

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 avatar Feb 18 '22 03:02 nibblebits

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

nibblebits avatar Feb 18 '22 03:02 nibblebits