Merging identical functions in GCC

Michael Popov pmike2001@mail.ru
Fri Sep 15 11:16:00 GMT 2006


Hello!

There is very good blog post about the problem:
http://vladimir_prus.blogspot.com/2005/03/duplicate-function-bodies.html
> A couple of days ago I've learned that the Microsoft linker can merge
> functions with binary identical bodies. Looks rather good idea,
 > especially with templates, and it seems that gcc does not implement this.

Will GCC support this feature?
It might be very useful in some cases, reduce code size and locality.


Some info about possible problems can be found here:
http://blogs.msdn.com/oldnewthing/archive/2005/03/22/400373.aspx

So, due to incompatibilities with debugging and C/C++ standards
this feature should be optional and disabled by default.


Best regards,
Michael



More information about the Gcc mailing list