I'm working on an assignment and one of the questions has me explain the differences between straces of the same program, one dynamically linked and the other statically linked. Here are the straces:
It looks like the main difference here is the read, write, open, close at the beginning of the dynamically linked program. I'm assuming that is where it's going on and fetching the relevant library code? I'm not really sure where to start in figuring out exactly the reason behind these differences.
The shared library file has to be processed (opened, mapped, read, unmapped, closed) whereas the static library doesn't need to do that seperately as the code is part of the main program.
It's possible that your trace is seeing those operations.