Location of constructor and destructor stabs

Charles M. Hannum root@ihack.net
Tue Nov 24 11:06:00 GMT 1998


I'm not sure whether this is a bug or not...

I noticed an odd difference between how GCC 2.7 and egcs output linker
set symbols for global constructors and destructors.  This is only
tested on i386--netbsd, but presumably affects other a.out platforms
as well.

In GCC 2.7, the set symbol is always output just after the end of the
function.  egcs has the same behaviour with optimize<3, but with
optimize>=3 it outputs the set symbol before the function definition.

I noticed this because our version of gas handled forward references
in set symbols rather poorly.  I've fixed the gas bug, but I thought
I'd mention it here in case the egcs behaviour is considered broken.




More information about the Gcc-bugs mailing list