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]

[PATCH] 3.2: Fixup symbol versioning mistake on powerpc-linux-gnu


Hi,

this turned out to be more difficult than I thought, but finally I had the 
right idea on how to tackle that.

The patch changes the symbol versions in the shared libgcc for these sysmbols:

	__divdi3	
	__udivdi3
	__moddi3
	__umoddi3

The change is to move the link-time reference from GLIBC_2.0 to GCC_3.0:

	3.0, 3.1:		run+linktime @@GLIBC_2.0, runtime @GCC_3.0
	3.2+:		run+linktime @@GCC_3.0, runtime @GLIBC_2.0

This is to finally break the interaction between gcc and glibc on these 
symbols.

Bootstrapped on i686-linux-gnu and powerpc-linux-gnu without regressions.

I will do a few more compatibility checks today+tomorrow, OK to commit to 
mainline and 3.2 branch after that?

BTW, I noticed that the symbols in libgcc.a are only hidden by mklibgcc if 
SHLIB_LINK is set, is this intentional? Doesn't that mean you have to build 
gcc and glibc 2 times in a cross-compile environment to get a correct glibc 
with no re-exported libgcc symbols?

Jakub, do you want to use this framework for any other platform in 3.2?

Franz.

2002-08-04  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
	               Jakub Jelinek  <jakub@redhat.com>

	* gcc/Makefile.in (LIBGCC2_SH_CFLAGS, TARGET_LIBGCC2_SH_CFLAGS,
	LIB2ADD_SH, LIB2_DIVMOD_ST_SH_FUNCS): Handle new variables.
	* gcc/mklibgcc.in: Handle LIB2ADD and LIB2_DIVMOD_ST_SH_FUNCS.
	* gcc/mkmap-symver.awk: Handle symbols with @ specially.
	* gcc/config/rs6000/t-ppccomm (TARGET_LIBGCC2_SH_CFLAGS): Include
	versioning header.
	(LIB2FUNCS_SHARED_EXTRA): Set to file with older versions function stubs.
	(LIB2_DIVMOD_ST_SH_FUNCS): Add symbols with multiple versions.
	(SHLIB_MAPFILES): Use new version script.
	* gcc/config/rs6000/divmod-symver.h: New file.
	* gcc/config/rs6000/divmod-ver.asm: New file.
	* gcc/config/rs6000/libgcc-glibc.ver: New file.


Attachment: gcc-libgcc-compat-ppc-1.patch
Description: Text document


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