

You don’t. In C everything gets referenced by a symbol during the link stage of compilation. Libraries ultimately get treated like your source code during compilation and all items land in a symbol table. Two items with the same name result in a link failure and compilation aborts. So a library and a program with main is no bueno.
When Linux loads an executable they basically look at the program’s symbol table and search for “main” then start executing at that point
Windows behaves mostly the same way, as does MacOS. Most RTOS’s have their own special way of doing things, bare metal you’re at the mercy of your CPU vendor. The C standard specifies that “main” is the special symbol we all just happen to use
That’s always the hard part of these “government fraud” narratives. It’s the insidious shit, the ineptitude, incompetence. Not something you can walk into the FDA and find a filing cabinet labeled “deliberate and known waste contracts”.
I work in aerospace and the worst engineers I’ve had the displeasure of working with were on cost+ contracts (the money keeps rolling in until the job is “done”).
The only real way to track down abuses like that is to stick an oversight committee on each and every contract, watch them like a hawk. But who watches the watchers? You run the risk at every stage, eventually you either need to trust or gamble