FloofLeBo <bluswedshooz@xxxxxxxx> writes: > PaweÅ Sikora-2 wrote: >> >> On Tuesday 12 of October 2010 12:24:33 FloofLeBo wrote: >> >>> - How can I tell gcc (used with "-shared") to not expose the >>> externals >>> libraries's symbols, since they were compiled without -fvisibility=hidden >>> ? >> >> you can instruct linker to expose/hide symbols (via global/local section) >> in version script. see the 'info ld', section '3.9 VERSION Command' for >> ex. >> >> BR, >> Pawel. >> >> > > I tried this command below: > > /usr/bin/gcc -melf_i386 -shared -Wl,-soname,libMySdk.so.1 -o libMySdk.so > $(OBJS) -Wl,--exclude-libs,ALL $(LIBS) $(SUBLIBS) > > where: > - $(OBJS) contains my SDK's objects files (*.o) > - $(LIBS) contains -L and -l statements > - $(SUBLIBS) contains the path to the home-made sub-libraries .a files > > But this did not do the trick, and the symbols from $(LIBS) still get > exported in the .so shared object. > > What am I missing ? You are missing a version script. Ian