[arm-gnu] passing variables to main()
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[arm-gnu] passing variables to main()



Hi,

I need to pass values to main() when I invoke it from my _start
assembly function. I can set the values I want to pass to main in the
registers r1, r2, r3 etc. But I cannot create a main() with that takes
custom parameters:

The compiler does not like:
int main(unsigned long long val1, unsigned long long val2, ...)

It requires the default main that takes argv, argc:
int main(int argc, char *argv)

Any suggestions on a better way to pass the values in?

JJ