This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Tentative fix for libstdc++ failures on target overwritting libfunc names
- From: Hans-Peter Nilsson <hans-peter dot nilsson at axis dot com>
- To: jh at suse dot cz
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 5 Sep 2007 02:28:19 +0200
- Subject: 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