I want the GCC to exclude the startup code it link automatically with building process
what should i do?
So that i have my Own Startup assembly code defining labels (_start, _exit,..etc)
I want the GCC to exclude the startup code it link automatically with building process
what should i do?
So that i have my Own Startup assembly code defining labels (_start, _exit,..etc)
Copyright © 2021 Jogjafile Inc.
GCC provides the
-nostartfiles,-nodefaultlibsand-nostdliboptions. See documentation.Alternatively, you can call linker (
ld) directly: it doesn't add anything by default, all objects (including the linker script) has to be specified manually. For an example of theldinvocation, rungccwith-voption: it would print full command lines of all other tools (including linker) it invokes.