Static and dynamic linking

I am trying to understand what ELF looks like for a statically and dynamically linked program.

I understand that this is how static communication works: enter image description here

In my case, I have two files: foo.cand bar.c. I also have their object files; foo.oand bar.o. With the command, objdumpI can see the movement in each file.

How do I statically link foo.oand bar.o?

How do I dynamically bind foo.oand bar.o?

How can I see the difference in the output files?

+4
source share
1 answer

. , -static . , " " " ", , , , ( ).

, , , , , , , .

, ( ) . . , POSIX - .

+3

Source: https://habr.com/ru/post/1621625/


All Articles