Hello.
As far as I understood (by reading the AIX documentation) "-bE" tells ld which symbols to export. I know that GNU ld does not have such an option - it exports ALL global symbols found in the object files. As far as I know Sun's ld does this the same way.
(This may be a disadvantage because you often want some symbols not to be exported. I wrote a special program that solves this problem under Linux by post-processing the .so file generated.)
As far as I know something like "-bI" is not supported, either. If you use the "-lxxx" (lowercase L) option the linker will both search for a statical library (libxxx.a) and for a dynamical library (libxxx.so). It will import all symbols found in libxxx.so.
(There may be cases where this is also not desired - i.e. if two .so files contain functions with the same name.)
Martin
Hi Martin
Thanks for the mail. Very helpful. I have an application which checks for the symbol that are being linked with a list of symbols in an export file, this is being done on the IBM side. Since this does not happen on the SUN, I would like to force this check on the SUN side so that developers will get compile errors if their object is not included in the export file on the SUN. This is for portability. What is happening most of the time is that developers working on the sun, do not include the object names in the exp file and the compile goes thru fine. But when this software is compiled on the IBM, it barfs causing us to go in and put the required symbol names.
So what I am looking for is the same checks to be done on both SUN and IBM
Your help will be greatly appreciated.
Regards