-fwhole-program and __attribute__((externally_visible))
Joel Dice
dicej@mailsnare.net
Wed Dec 2 01:02:00 GMT 2009
Hi all,
I've been playing with -flto and -fwhole-program using an SVN snapshot of
GCC and I have a couple of questions.
I'm using __attribute__((externally_visible)) to mark the entry points in
my executable (which is also a shared object). However, said attribute is
not available with all versions of GCC. What's the best way to determine
whether it's available or not?
Also, I'm curious as to why above attribute is necessary at all. All my
code is built with -fvisibility=hidden, and the exported functions are
marked with either __declspec(dllexport) or
__attribute__((visibility("default"))), depending on the platform. It
seems redundant to specify an additional attribute that means essentially
the same thing.
Thanks.
More information about the Gcc-help
mailing list