I am trying to write a simple C program without including standard libraries and trying to compile and run with gcc. but I was getting segmentation fault( core dumped )
main.c:
int main(){}
commands executed:
- gcc main.c -c -ffreestanding
- gcc main.o -e main -nostdlib
- ./a.out
output:
Segmentation fault (core dumped)
any help would be greatly appreciated.