How to 'link' object file to executable/compiled binary?
问题 Problem I wish to inject an object file into an existing binary. As a concrete example, consider a source Hello.c : #include <stdlib.h> int main(void) { return EXIT_SUCCESS; } It can be compiled to an executable named Hello through gcc -std=gnu99 -Wall Hello.c -o Hello . Furthermore, now consider Embed.c : func1(void) { } An object file Embed.o can be created from this through gcc -c Embed.c . My question is how to generically insert Embed.o into Hello in such a way that the necessary