What information is in the first 832 bytes of the .so file?

I have seen many similar things like this:

open("/lib64/libpthread.so.0", O_RDONLY) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\260W \0242\0\0\0"..., 832) = 832 

What is there at the beginning of 832 bytes?

+4
source share
1 answer

If the listing above was fixed when the program started, then it is likely that you see the runtime loader in action, since it brings in shared libraries and allows characters before the program starts.

Regarding the initial content that is read, each ELF file starts with an ELF that describes the layout and contents of the rest of the file --- see the " libelf by Example " tutorial for more information.

+2
source

All Articles