There are two options in GCC, which is no start files and no stdlib, so no start files.
If you are, uh, providing your own startup code, you can use no start files.
And if you do not want to use any functionality of, uh C library, you can say no stdlib.
So it will not include C library.
So for example, uh, I have this code where I have added my own start function.
If I compile this userspace dot c and say userspace okay.
And because I have underscore start already defined, it will say multiple definition of underscore
start.
One is already defined in CRT 1.0.
And it is not finding main function because uh c library is calling main, it is failing.
I can see what is happening using f and v.
So in this you can see it is uh using LC where it is linking C library.
It is linking CRT and CRT and and gcc underscore s.
So a lot of things are happening here.
We can see at I all those which we did manually right CRT one.
So if I say no, start files and I'll say V now, it will not fail because it has not included LC.
If you see LC is not included.
LC is included but C library will not.
C library is included because we have not set no Stdlib but it has not included the startup codes CRT,
all those C runtime things.
And I will not add V.
And if I run this thing it executed my code.
Uh, this hello world.
My function got executed underscore start got executed.
First it called my function where it executed hello world.
So we have a C code where main function is not even present.
Right.
Because it is a C library.
It was calling main start was calling C library main and then C library was calling main.
And we have overridden using no start files.
If I say no start files and say no stdlib, it will give me a problem saying I'm using printf which
is internally puts.
I'm using exit.
Uh, which is also in the define in the C library.
So that's the reason it is failing.
So no stdlib if you are not using any functionality of uh, this one, uh C library, then you can use
no street lib.
But if you are using you have your own startup code, you can use underscore start.
And if you have your own you have to implement underscore start and specify no start files.