Hello tinycc-fans,

I must add 2 custom sections to a program called myinit and mynoinit.

When I write a litte program to test that:
int myvar __attribute__ ((aligned(8), section(".myinit")));
void main()
{
  myvar=10;
  printf("%u",myvar);
}
I get a exe file (windows) but it won't run. I always get a runtime error when 
the program reaches the assignment.
When I use cygwin's "nm" tool on the object file, I see that variable myvar is 
at address 00000000 and location R... that's wrong.
What must I do to make this work?
I can compile tcc on my machine and add sections in tcc itself with 
new_section. This didn't work yet, too.

Thank you very much for your help in advance!
Simon Lehmayr
_______________________________________________
Tinycc-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to