* Is this a gcc-4.7 bug or not?
@ 2012-06-07 4:23 Kirby Zhou
0 siblings, 0 replies; only message in thread
From: Kirby Zhou @ 2012-06-07 4:23 UTC (permalink / raw)
To: gcc-help
Some symbols exported by gcc-4.4.6 would not be exported by gcc-4.7.0.
If the visibility of struct __cook is hidden, the function "myopen" keeps "hidden" too.
[root@djt-17-109-v06 tmp]# cat tvisi.cpp
extern "C" typedef struct __cook cook_t;
extern "C" cook_t* myopen();
struct __attribute__ ((visibility ("hidden"))) __cook {
virtual ~__cook() = 0;
};
//__attribute__ ((visibility ("default")))
cook_t* myopen()
{
return 0;
}
[root@djt-17-109-v06 tmp]# g++ tvisi.cpp -o libxx.so -shared -fPIC && nm -D libxx.so | fgrep myopen
00000000000005cc T myopen
[root@djt-17-109-v06 tmp]# # I can see the symbol myopen be exported by gcc-4.4.6
[root@djt-17-109-v06 tmp]# g++47 tvisi.cpp -o libxx.so -shared -fPIC && nm -D libxx.so | fgrep myopen
[root@djt-17-109-v06 tmp]# # I can not see the symbol myopen be exported by gcc-4.7.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-06-07 4:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-07 4:23 Is this a gcc-4.7 bug or not? Kirby Zhou
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).