-fvisibility=protected doesn't work? a...@xlin2:~$ cat 1.c void F1() { } void* F2() { return F1; }
j...@xlin2:~$ $HOME/bin/gcc 1.c -fPIC -shared -fvisibility=protected /usr/bin/ld: /tmp/cc0d6EQ3.o: relocation R_386_GOTOFF against protected function `F1' can not be used when making a shared object /usr/bin/ld: final link failed: Bad value collect2: ld returned 1 exit status j...@xlin2:~$ $HOME/bin/gcc -v Using built-in specs. COLLECT_GCC=/home/jay/bin/gcc COLLECT_LTO_WRAPPER=/home/jay/libexec/gcc/i686-pc-linux-gnu/4.5.0/lto-wrapper Target: i686-pc-linux-gnu Configured with: /src/gcc-4.5.0/configure -verbose -prefix=/home/jay -disable-bootstrap -disable-multilibs Thread model: posix gcc version 4.5.0 (GCC) -- Summary: -fvisibility=protected doesn't work? Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: jay dot krell at cornell dot edu GCC build triplet: i686-pc-linux-gnu GCC host triplet: i686-pc-linux-gnu GCC target triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44166