I have read in the bytes of an Elf file and notices that the 2 bytes beginning at 0x10 equals to 0x03. This specifies that the file is a shared object according to Wikipedia.
I feel that it should be equal to 0x02 (Executable object) and cannot find any reference that would indicate why this would be.
Is there a reason that g++ chooses to mark it as a shared object? Running my custom program works fine but I would love to know more about it and alas, Google is not showing the goods.
All other flags look exactly how I would expect them to except for this one.
I compiled using the following:
g++ main.cpp -o main