Patches for egcs-971016 on AIX

Andrey Slepuhin pooh@msu.ru
Wed Oct 22 16:49:00 GMT 1997


David Edelsohn wrote:
>         The compiler does not create unnecessary globals; however, a
> programmer might create a global variable or function used throughout
> multiple files in a library for internal communication, but does not
> want that symbols exported possibly poluting a program's namespace or
> allowing a program to access "global" variables internal to a library.

Sorry, I never thought about such possibility. What about additional
linker flag to disable automatic exports? And finally, what about
__eh_* symbols? They are global in *every* object file. If I create
a shared object from several object files, from which one these symbols
will be exported? Moreover, I will receive warnings when linking *any*
program, because these symbols are exported in libstdc++. Who can
imagine the situation when these symbols are really need to be exported?
So, I think I should exclude them from export list until I see such
situation.

Andrey.



More information about the Gcc mailing list