[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gm2] linking : `__gxx_personality_v0' question
From: |
Gaius Mulley |
Subject: |
Re: [Gm2] linking : `__gxx_personality_v0' question |
Date: |
Tue, 19 Apr 2011 10:46:49 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) |
Arnauld Michelizza <address@hidden> writes:
> Hi,
>
> I'd like to write a simple kernel for x86 on modula-2 (I already wrote
> one in C).
> I just had a try, but I currently have a linking problem :
>
> $ gm2 -c -m32 Kernel.mod
> $ ld -m elf_i386 --oformat binary -Ttext 1000 -e _M2_Kernel_init
> Kernel.o -o kernel
> Kernel.o:(.eh_frame+0x11): undefined reference to `__gxx_personality_v0'
>
> While looking in Kernel.o :
>
> $ nm Kernel.o
> 0000000000000000 b MyScreen
> 0000000000000002 t PutCharOnXY
> 0000000000000000 T _M2_Kernel_finish
> 0000000000000030 T _M2_Kernel_init
> U __gxx_personality_v0
>
> It seems that __gxx_personality_v0 is related with c++ but I can't
> figure what it does and if it's really necessary to use that function.
> Anyway, I'm not totaly sure I used 'ld' the right way.
>
> Any help ?
>
> Arnauld
Hi Arnauld,
you could try:
gm2 -c -m32 -fno-exceptions Kernel.mod
and then the link. C++ (libstdc++) is used to handle Modula-2
exceptions (which you probably don't want in your kernel). Some
embedded ports cannot use libstdc++ either so this option disables this
library.
regards,
Gaius
- [Gm2] linking : `__gxx_personality_v0' question, Arnauld Michelizza, 2011/04/19
- Re: [Gm2] linking : `__gxx_personality_v0' question,
Gaius Mulley <=
- Re: [Gm2] linking : `__gxx_personality_v0' question, Arnauld Michelizza, 2011/04/19
- Re: [Gm2] linking : `__gxx_personality_v0' question, Gaius Mulley, 2011/04/19
- Re: [Gm2] linking : `__gxx_personality_v0' question, john o goyo, 2011/04/19
- Re: [Gm2] linking : `__gxx_personality_v0' question, john o goyo, 2011/04/19
- Re: [Gm2] linking : `__gxx_personality_v0' question, Gaius Mulley, 2011/04/19
- Re: [Gm2] linking : `__gxx_personality_v0' question, john o goyo, 2011/04/19
- Message not available
- Re: [Gm2] linking : `__gxx_personality_v0' question, john o goyo, 2011/04/19
- Re: [Gm2] linking : `__gxx_personality_v0' question, Gaius Mulley, 2011/04/19
- Re: [Gm2] linking : `__gxx_personality_v0' question, john o goyo, 2011/04/19