[Patch,fortran] PR 27740 Symbol versioning for libgfortran

Janne Blomqvist Janne.Blomqvist@tkk.fi
Sun Nov 5 16:38:00 GMT 2006

Thomas Koenig wrote:
> Hello all,
> just two questions (which I hope can be answered by a quick pointer
> to relevant documentation):
> If this patch is applied, and I change the interface to a library
> function
> - What do I need to do?

I put some notes on http://gcc.gnu.org/wiki/SymbolVersioning

> - How can I make sure I don't forget to do whatever needs doing?

Well, I don't have any foolproof rules of thumb.

But if you, say, forget to add a new symbol to the map file, test cases 
that use said functionality won't link since by default all symbols are 

If you change an interface, you need to figure out how to keep the old 
interface around in the library. Either by using different symbol names, 
or by using the asm trickery explained in the wiki page.

>   Is there some automated test?

Not that I know of. The following can be done, but I don't know if it's 
possible/reasonable to bend dejagnu to do it.

If you change an interface (compatible or incompatible):

* Old code should continue to work with the new library.

* New code should refuse to run with the old library (without symbol 
versioning, the program fails at runtime when trying to access the new 
symbol for the first time, with versioning the check happens at startup).

Janne Blomqvist

More information about the Gcc-patches mailing list