Re: [Tinycc-devel] tcc as compiler for tccboot

2016-04-22 Thread Michael Matz
Hi, On Wed, 20 Apr 2016, Sergey Korshunoff wrote: > > Just checked. I used a hex editor to replace a 0x20 bytes in mem-2.o with > > 0x04. > > This helped. > > diff --git a/libtcc.c b/libtcc.c > index 5aebd32..a8e109c 100644 > --- a/libtcc.c > +++ b/libtcc.c > @@ -514,7 +514,11 @@ ST_FUNC

Re: [Tinycc-devel] tcc as compiler for tccboot

2016-04-22 Thread Sergey Korshunoff
> In any event, it is odd to me that any software compiled entirely from source > should care about this sort of alignment. It should leave such issues up to > the compiler, as an implementation detail, shouldn't it? In the source code we can ask about a section where to place result, an

Re: [Tinycc-devel] tcc as compiler for tccboot

2016-04-21 Thread David Mertens
Hello Sergey, On Thu, Apr 21, 2016 at 12:44 AM, Sergey Korshunoff wrote: > > That's a good bit of sleuthing. A couple of questions immediately come > to mind: > >Why does gcc and pcc take 4 as their alignment? Why do we take 32? > I'm not a guru. But tcc behaviour cost me

Re: [Tinycc-devel] tcc as compiler for tccboot

2016-04-20 Thread Sergey Korshunoff
> 0x1234-123 parsed by tcc as float number May be 0x0fe-123 (as macro expansion, I can't remember now) ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Re: [Tinycc-devel] tcc as compiler for tccboot

2016-04-20 Thread Sergey Korshunoff
> That's a good bit of sleuthing. A couple of questions immediately come to > mind: >Why does gcc and pcc take 4 as their alignment? Why do we take 32? I'm not a guru. But tcc behaviour cost me a day of the problem discovering >Does this have any performance impact? I don't think so.

Re: [Tinycc-devel] tcc as compiler for tccboot

2016-04-20 Thread David Mertens
Hello Sergey, That's a good bit of sleuthing. A couple of questions immediately come to mind: - Why does gcc and pcc take 4 as their alignment? Why do we take 32? - Does this have any performance impact? - Is there a reason you are implementing this with #ifdef? Might we use a

Re: [Tinycc-devel] tcc as compiler for tccboot

2016-04-20 Thread Sergey Korshunoff
> A problem may be in the section aligment: gcc sets this to 4 and tcc to 32. Just checked. I used a hex editor to replace a 0x20 bytes in mem-2.o with 0x04. This helped. ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org

Re: [Tinycc-devel] tcc as compiler for tccboot

2016-04-20 Thread Sergey Korshunoff
A problem may be in the section aligment: gcc sets this to 4 and tcc to 32. Where in the source this is fixed? ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel

[Tinycc-devel] tcc as compiler for tccboot

2016-04-20 Thread Sergey Korshunoff
Hi! I'm trying to use tcc as CC compiler for usual kernel compilation (2.4.37) i.e. cd linux make bzImage CC=tcc Kernel compiles fine, but hangs some time after start. After Investigating a problem, I got the following difference: a file mem-2.s (a part of the file drivers/char/mem.c)