Re: dlopen() and placing exception body in .cpp file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Right... So then I imagine even the 'fix' where I'm compiling
exception destructor into a separate .so file is still subject to
breakage and std::exception catching works because every C++ program
actually links against libstdc++ and not just dlopens it, yes?

Dimitri.


On Mon, Aug 30, 2010 at 4:51 PM, Ian Lance Taylor <iant@xxxxxxxxxx> wrote:
> Dimitri Tcaciuc <dtcaciuc@xxxxxxxxx> writes:
>
>> Now, according to `dlopen` manual, I have to load with RTLD_GLOBAL for
>> RTTI to function properly.
>
> Yes.  Anything else is unsupported.  Even if we explain how it all works
> today, it may change tomorrow.
>
> Basically, it works by doing pointer comparisons on the RTTI
> information.  That works reliably when using RTLD_GLOBAL.  When using
> RTLD_LOCAL, whether it works depends on exactly where the code creating
> the object runs, because where that code runs determines which pointer
> it will get when it refers to the symbol containing the type
> information.
>
> Ian
>



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux