kdeinit compiled with gcc 4.0.1 & visibility busted at runtime

Thiago Macieira thiago at kde.org
Mon Jul 18 12:35:27 BST 2005


Dirk Mueller wrote:
>On Monday 18 July 2005 13:13, Thiago Macieira wrote:
>> The KDE_EXPORT attribute takes effect even on the declaration.
>
>No.

$ cat test.cpp
extern "C" void func();
void func()
{
}
$ g++ -o test.o -fvisibility=hidden -c test.cpp
$ readelf -a test.o | grep func
     7: 00000000     5 FUNC    GLOBAL HIDDEN    1 func

$ cat test.cpp
extern "C" void func() __attribute__((visibility("default")));
void func()
{
}
$ g++ -o test.o -fvisibility=hidden -c test.cpp
$ readelf -a test.o | grep func
     7: 00000000     5 FUNC    GLOBAL DEFAULT    1 func

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

3. Ac seo woruld wearð geborod, swá se Scieppend cwæð "Gewurde Unix" and 
wundor fremede and him "Unix" genemned, þæt is se rihtendgesamnung.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20050718/5cbf783a/attachment.sig>


More information about the kde-core-devel mailing list