Re: effect of -fPIC on code speed

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

 



Jay K <jay.krell@xxxxxxxxxxx> writes:

> I understand, you can do the pointer equality checks in arbitrary code.
> So there is arbitrary breakage, given a certain uncommon construct.

Function pointer comparisons are part of the C standard and they are
used in real code.  E.g., when I got the pointer equality rules wrong
when working on GNU ld, I broke Tcl.

You can compile libstdc++ in a mode in which it only uses pointer
comparisons for typeinfo comparisons, but it's true that it defaults to
using strcmp.  The comment (libstdc++-v3/libsupc++/typeinfo) says it is
to handle dynamic objects dlopen'ed with RTLD_LOCAL, which is a case
where ELF breaks pointer equality.

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