[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Tinycc-devel] tcc as compiler for tccboot
From: |
Sergey Korshunoff |
Subject: |
[Tinycc-devel] tcc as compiler for tccboot |
Date: |
Wed, 20 Apr 2016 16:31:38 +0300 |
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)
.section .initcall.init
.long chr_dev_init
objdump -Dtsr mem-2.o (compiled by gcc)
mem-2.o: file format elf32-i386
SYMBOL TABLE:
00000000 l d .text<>00000000 .text
00000000 l d .data<>00000000 .data
00000000 l d .bss<->00000000 .bss
00000000 l d .initcall.init>00000000 .initcall.init
00000000 *UND*<>00000000 chr_dev_init
Disassembly of section .initcall.init:
00000000 <.initcall.init>:
0:<->00 00 <->add %al,(%eax)
<------><------><------>0: R_386_32<--->chr_dev_init
objdump -Dtsr mem-2.o (compiled by tcc)
mem-2.o: file format elf32-i386
SYMBOL TABLE:
00000000 l df *ABS*<>00000000 mem-2.s
00000000 *UND*<>00000000 chr_dev_init
Disassembly of section .initcall.init:
00000000 <.initcall.init>:
0:<->00 00 <->add %al,(%eax)
<------><------><------>0: R_386_32<--->chr_dev_init
As you can see, there is only one difference:
in mem-2.o compiled by gcc we see extra data in symbol table
00000000 l d .text<>00000000 .text
00000000 l d .data<>00000000 .data
00000000 l d .bss<->00000000 .bss
00000000 l d .initcall.init>00000000 .initcall.init
Nothing serious. But kernel hangs with mem-2.o compiled by tcc.
May be gnu ld needs that? Is it possible to modify tcc in the way like gcc?
- [Tinycc-devel] tcc as compiler for tccboot,
Sergey Korshunoff <=
- Re: [Tinycc-devel] tcc as compiler for tccboot, Sergey Korshunoff, 2016/04/20
- Re: [Tinycc-devel] tcc as compiler for tccboot, Sergey Korshunoff, 2016/04/20
- Re: [Tinycc-devel] tcc as compiler for tccboot, Sergey Korshunoff, 2016/04/20
- Re: [Tinycc-devel] tcc as compiler for tccboot, David Mertens, 2016/04/20
- Re: [Tinycc-devel] tcc as compiler for tccboot, Sergey Korshunoff, 2016/04/21
- Re: [Tinycc-devel] tcc as compiler for tccboot, Sergey Korshunoff, 2016/04/21
- Re: [Tinycc-devel] tcc as compiler for tccboot, David Mertens, 2016/04/21
- Re: [Tinycc-devel] tcc as compiler for tccboot, Sergey Korshunoff, 2016/04/22
- Re: [Tinycc-devel] tcc as compiler for tccboot, Michael Matz, 2016/04/22