L4Ka. Regression with 4.7 and 4.8 ?
Oleg Endo
oleg.endo@t-online.de
Sat Jun 22 18:11:00 GMT 2013
On Sat, 2013-06-22 at 19:54 +0200, BERTRAND Joël wrote:
> Oleg Endo a écrit :
> > On Sat, 2013-06-22 at 14:32 +0200, BERTRAND Joël wrote:
> >> Hello,
> >>
> >> I have bissected the code and found the faulty .o. I have attached
> >> assembly output. idt.gcc46.s is the good one. If L4 is linked with
> >> idt.gcc.47.s, it only reboots.
> >
> > The code of 4.6 and 4.7 seems to be pretty much the same, except for
> > differences in the register allocations.
> > (I removed all .cfi lines before doing a diff)
> >
> > However, maybe the following difference ...
> >
> > 4.6:
> > .section .ctors.10003,"aw",@progbits
> > .align 8
> > .quad _GLOBAL__sub_I.55532_idt
> > ...
> >
> > 4.7:
> > .section .init_array.55532,"aw"
> > .align 8
> > .quad _GLOBAL__sub_I.55532_idt
> >
> > (different sections being used)
> >
> > ... triggers another problem somewhere else? Maybe .init_array is not
> > handled by the startup code or something like that? I'm just
> > guessing...
>
> Maybe. But if I build all but idt.c with gcc 4.7 and only idt.c with
> gcc 4.6, I obtain a running kernel.
The code in idt.c compiled with 4.6 puts static initialization functions
into the .ctors section, while 4.7 puts them into the .init_array
section. Probably this happens only for this single file in the whole
kernel. My guess is that the .init_array section is not handled
properly by the startup code of the kernel. Or maybe it's even stripped
out completely (missing in the linker script). Either way, it seems
that static initialization for idt.c is not being done properly and thus
the code crashes.
Cheers,
Oleg
More information about the Gcc-help
mailing list