fatal error if KDE compiles with hidden visibility but Q_DECL_EXPORT is defined to nothing

Thiago Macieira thiago at kde.org
Thu Jun 21 15:41:21 CEST 2007


Christian Ehrlicher said:
>> and while this works on Win32, it breaks on linux because Q_DECL_EXPORT
>> doesn't evaluate to default-visibility (don't know the gcc command for
>> that) but to nothing. At least on a "default-built" qt-copy.
>>
> It's not the fault of Q_DECL_EXPORT but Q_DECL_IMPORT which is defined to
> nothing on linux.

That's not a problem on ELF/x86, but I do wonder how it compiles at all
under 64-bit.

Symbols marked "hidden" tell the compiler it can generate shorter calls,
instead of emitting a relocation to a full 64-bit jump. On x86-64, that
would be a 32-bit RIP-relative call; on Itanium, it would probably be a
one of the weird lengths, like 21- or 25-bit jump.

(Itanium can encode short immediates in a single 41-bit instruction, but a
full 64-bit displacement requires three instructions, 128 bits)

-- 
  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358




More information about the Kde-buildsystem mailing list