Binary

This is a question on generating a binary executable for a specific purpose.

I have a tool (pintool), that I am using to instrument the number of instructions in my executable. Now, the number of instructions totally depend on the binary we have.

I tried using it in two different machines and got two completely different number of instructions. The reason was that the gcc version was different in the two machine and hence, the library files linked to the executables had different number of instructions.

So, my question is how do I keep my binary to have minimum number of libraries linked statically and they all are loaded dynamically?

Can someone please give me some pointers in this?

Thanks in advance
You cannot use the GCC for that. The GCC is specifically designed to produce a different binary image each time you use it.
You have to separate the compile and link stages. So you can control the linker better to use as many dynamically loaded libraries as possible.
Topic archived. No new replies allowed.