c++ code in kernel .. linking problems (___gxx_personality_v

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
MuteX

c++ code in kernel .. linking problems (___gxx_personality_v

Post by MuteX »

Hi All,

I'm trying to do a kernel in c++, and to test the concept i wrote a simple class that would simply print something on screen. Note that the classes are to be used internally and i'll expose the interface in C style. heres what i'v been trying to test do.

extern "C"
{
  void kprintf( const char* p )
  {
      console cn.
      cn.write( p );
      // Or.
      console::write ( pr );
  }
};

but i get this ___gxx_personality_v0 undefined reference when linking code, what is this and how can i get rid of it ? it seems the compiler puts such a symbol in "eh_frame" section .. is there any way to suppress that thing ? or am i missing some concept here ??

thanks .
MuteX

RE:c++ code in kernel .. linking problems (___gxx_personalit

Post by MuteX »

i figured that out myself, i had to sepcify

-fno-exceptions

on the command line to suppress this behaviour. Just thought i should post an update for anyone who is also looking for this kind of problem ..
sharada

RE:c++ code in kernel .. linking problems (___gxx_personalit

Post by sharada »

thanx it helped me!!!
kamikazed

RE:c++ code in kernel .. linking problems (___gxx_personalit

Post by kamikazed »

Thanks, it helped me, too!
hartyl

RE:c++ code in kernel .. linking problems (___gxx_personalit

Post by hartyl »

hehe, helped me as well! (this is an evergreen :)
i think i'll look a further look at the additional commandline-parameters

greets, hartyl
Post Reply