> I tried to compile a simple program written in C with -fno-stack-protector
> option and i have some troubles...
> this is my simple file main.c:
> int main()
> int i;
> short int *screen = (short int *) 0xB8000;
> char msg="Hello World";
> for(i=0; msg[i] != '\0'; *(screen++) = 0x1F00 | msg[i], ++i);
> return 0;
> and these are my commands:
> gcc -c main.c -o main.o -fno-stack-protector
> ld main.o -e main -Ttext 0x1000 -o main
> objcopy -R .comment -R .note -S -O binary main main.bin
> I have gcc #version# default in OpenBSD 4.3
> After compiled i got a very big main.bin about 10MByte... and this is very
> I don't know how to solve this problem.
> -- Alex --
The programs you ran did everything you asked without error. Your
main.bin is probably more like 960MB, since the many sections are
still located at 0x3c000000.