Is there a way to check if a library has been built for little endian or big endian architecture without executing it’s code?
Let’s say, I have a library X, but, I don’t know if it has been built for little endian or big endian, is there any command or is there a way to find out through the build output if the library has been built for little endian or big endian? Or is it possible to place this information in the library?
if you are running linux/unix, the easiest way is using file command.
So the information is definitely built into the library header. You can check using readelf command.
In windows, I don’t know how to check, but should be there in the header of the dll.