: , ld -r ld -Ur:
"man ld" Linux:
-r
--relocatable
Generate relocatable output---i.e., generate an output file that can
in turn serve as input to ld. This is often called partial linking.
As a side effect, in environments that support standard Unix magic
numbers, this option also sets the output file’s magic number to
"OMAGIC".
If this option is not specified, an absolute file is produced.
When linking C++ programs, this option will not resolve references to
constructors; to do that, use -Ur.
gcc:
gcc -Wl,-r foo.o bar.o -o foobar.o -nostdlib
, , : ( main.c), .
OTOH, , , , , , , window2.c .