[LLVMdev] -fvisibility=hidden, and typeinfo, and type-erasure

Rafael Avila de Espindola rafael.espindola at gmail.com
Wed Jun 4 16:43:35 PDT 2014



Sent from my iPhone

> On Jun 4, 2014, at 19:08, Joerg Sonnenberger <joerg at britannica.bec.de> wrote:
> 
>> On Wed, Jun 04, 2014 at 06:32:35PM -0400, Rafael EspĂ­ndola wrote:
>> I think the difference is actually in the c++ library. It looks like
>> libstdc++ changed to always use strcmp of the typeinfo names:
>> 
>> https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=149964
>> 
>> Should we do the same with libc++?
> 
> No. It pessimizes correctly behaving code to work around code that
> violates the ELF ABI. Consider an application that loads plugins with
> RTLD_LOCAL. Two plugins implement a (hidden) type called "Plugin". The
> GCC change now makes this completely separate types identical for all
> RTTI purposes. That makes no sense at all.
> 

That is an interesting argument, in particular because RTLD_LOCAL seems to be the reason why libstdc++ switched :-)


> Joerg
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev




More information about the llvm-dev mailing list