Tentative fix for libstdc++ failures on target overwritting libfunc names

Hans-Peter Nilsson hans-peter.nilsson@axis.com
Wed Sep 5 00:28:00 GMT 2007

> Date: Wed, 5 Sep 2007 01:05:04 +0200
> From: Jan Hubicka <jh@suse.cz>

> the optabs patch introduced failures on some targets overwritting default libfuncs
> in combination with PCH.  THe problem is that optabs hashtable uses optab pointer
> to identify the table, but the pointer is not stable across PCH, since it resist in
> malloc pool and some OSes do randomizing of userspace addresses.
> This patch should solve it, I've bootstrapped it on i686-linux and waiting for
> confirmation that it indeed fix the problem before comitting.
> 	* optabs.c (libfunc_entry): Change optab to integer.
> 	(hash_libfunc, convert_optab_libfunc, optab_libfunc,
> 	set_optab_libfunc, set_conv_libfunc): Use optable indexes instead
> 	of pointers for hashing.

Tested against r128103 (with/without this patch), it fixed the
problems for cris-elf (with no regressions compared to 128059).
Thanks for the quick fix!

brgds, H-P

More information about the Gcc-patches mailing list