This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]