Hi,

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);

  for(;;);
  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
strange

I don't know how to solve this problem.

Regards

-- Alex --

Reply via email to