The three ways to build a binary image Link it all into a big object file This is what we were doing at the beginning It allows for a platform-independent bigobj.lds intermediate script But it shows its limits when the code base increases I had to abandon this to implement BUG() Build it all and create a library file (.a) This is the current approach We build-test all of the code Well, excluding alternatives for other architectures Object files that are not picked are just ignored If a weak symbol exists, no strong symbol is looked for This is useful in a multi-application environment In our code base, we build several .bin files Only build what you need to run You lack build-test for all code, but you save compiler time Useful in big projects that create a single binary Examples: Linux, u-boot, barebox, buildroot