Say I want to (try to) read through and understand a fairly complex piece of code (for example the free software Coreboot firmware code, which can be found here). How can I figure out where the code starts? As in, what is the first line of code that will be executed when the program runs?
I have some basic familiarity with C and I know that C programs usually start with an
int main (void) function. So, should I just search through the source code files to find that declaration? Or, is there an easier way to figure this out? Perhaps some software development convention that I'm not aware of?
I'm a Mechanical Engineer by background. I have some familiarity with coding, but not how complex projects like this are structured.
This question has been flagged as a duplicate of this question:
I don't agree that it is a duplicate. That question is much more general, about general techniques one can use to familiarize oneself with a large, unknown codebase. My question is much more focused on simply 'How can I find the starting point for the code.' It doesn't look like any of the existing answers to that question directly address that.
Besides, that question was flagged for its poor quality, as being not good or on-topic for the site.