This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: L4Ka. Regression with 4.7 and 4.8 ?
- From: Oleg Endo <oleg dot endo at t-online dot de>
- To: BERTRAND Joël <joel dot bertrand at systella dot fr>
- Cc: gcc-help at gcc dot gnu dot org, freevms at systella dot fr, L4 Mailing list <l4ka at ira dot uni-karlsruhe dot de>
- Date: Sat, 22 Jun 2013 22:23:43 +0200
- Subject: Re: L4Ka. Regression with 4.7 and 4.8 ?
- References: <51C1AB3A dot 5080907 at systella dot fr> <2138987 dot 2tPF7NEjmS at localhost> <51C376A5 dot 4060107 at systella dot fr> <51C59940 dot 3020009 at systella dot fr> <1371906201 dot 3742 dot 53 dot camel at yam-132-YW-E178-FTW> <51C5E4CB dot 40205 at systella dot fr> <1371924700 dot 3742 dot 108 dot camel at yam-132-YW-E178-FTW> <51C5FD3C dot 3070609 at systella dot fr>
On Sat, 2013-06-22 at 21:38 +0200, BERTRAND JoÃl wrote:
> Oleg Endo a Ãcrit :
> > 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.
>
> I don't think that ctors are stripped by linker script. This script is
> built by makefile. Here is my script :
>
>
> OUTPUT_FORMAT("elf64-x86-64")
> OUTPUT_ARCH("i386:x86-64")
> BOOTMEM_SIZE = 1024K;
> ...
As I initially assumed, the .init_array section seems to be missing in
the linker script, so it gets stripped. The .init_array section has to
be handled for code generated by GCC 4.7. I would say this is an issue
of the L4 software, not GCC.
Cheers,
Oleg