This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Versioning problem with __register_frame
- From: Andreas Jaeger <aj at suse dot de>
- To: "Ulrich Weigand" <Ulrich dot Weigand at de dot ibm dot com>
- Cc: jakub at redhat dot com, schwab at suse dot de,"Martin Schwidefsky" <schwidefsky at de dot ibm dot com>,"Hartmut Penner" <HPENNER at de dot ibm dot com>, gcc-patches at gcc dot gnu dot org
- Date: Mon, 04 Feb 2002 20:53:30 +0100
- Subject: Re: Versioning problem with __register_frame
- References: <OFFEB08E29.688F2823-ONC1256B56.0065B186@de.ibm.com>
"Ulrich Weigand" <Ulrich.Weigand@de.ibm.com> writes:
> Andreas Jaeger wrote:
>
>>Jakub Jelinek <jakub@redhat.com> writes:
>>
>>> Though in this case it will cause only problems.
>>> GCC libgcc-glibc.ver uses:
>>>
>>> %inherit GCC_3.0 GLIBC_2.0
>>> GLIBC_2.0 {
>>> ...
>>> __register_frame_info
>>> ...
>>> }
>>>
>>> So, either gcc needs to be changed so that for selected targets it will use
>>> different symbol for these symbols instead of GLIBC_2.0, or glibc needs to
>>> export them as GLIBC_2.0 unconditionally.
>>
>>So, what should be done? Or what can be done easier? If we fix it in
>>GCC we should do it asap so that the fix will be in 3.1.
>
> IMO the correct way would be to fix gcc. Using GLIBC_2.0 on s390x is simply
> wrong, this version did never exist on the s390x architecture.
>
> Jakub, the following patch fixes the problem by using a different
> libgcc-glibc.ver on s390x. Unfortunately it doesn't seem possible to
> override the GLIBC_2.0 version once the default libgcc-glibc.ver file
> has been read, so I have to reset SHLIB_MAPFILES in s390/t-linux64
> instead of simply adding to it. Maybe you have a better idea how
> to do this?
The idea looks fine - but note that s390x might not be the only port
to use it. x86-64 comes to mind - but I have to check whether it's
really needed there. I would prefer to not have separate
libgcc-glibc.ver for each architecture and instead only add GLIBC_2.2
somewhere... Any ideas?
Andreas
>
> diff -c -r -N gcc-orig/gcc/config/s390/libgcc-glibc.ver gcc-head/gcc/config/s390/libgcc-glibc.ver
> *** gcc-orig/gcc/config/s390/libgcc-glibc.ver Thu Jan 1 01:00:00 1970
> --- gcc-head/gcc/config/s390/libgcc-glibc.ver Mon Feb 4 18:32:22 2002
> ***************
> *** 0 ****
> --- 1,21 ----
> + # In order to work around the very problems that force us to now generally
> + # create a libgcc.so, glibc reexported a number of routines from libgcc.a.
> + # By now choosing the same version tags for these specific routines, we
> + # maintain enough binary compatibility to allow future versions of glibc
> + # to defer implementation of these routines to libgcc.so via DT_AUXILIARY.
> +
> + # Note that we cannot use the default libgcc-glibc.ver file on s390x,
> + # because GLIBC_2.0 does not exist on this architecture, as the first
> + # ever glibc release on the platform was GLIBC_2.2.
> +
> + %inherit GCC_3.0 GLIBC_2.2
> + GLIBC_2.2 {
> + __register_frame
> + __register_frame_table
> + __deregister_frame
> + __register_frame_info
> + __deregister_frame_info
> + __frame_state_for
> + __register_frame_info_table
> + }
> +
> diff -c -r -N gcc-orig/gcc/config/s390/t-linux64 gcc-head/gcc/config/s390/t-linux64
> *** gcc-orig/gcc/config/s390/t-linux64 Thu Jan 1 01:00:00 1970
> --- gcc-head/gcc/config/s390/t-linux64 Mon Feb 4 18:31:19 2002
> ***************
> *** 0 ****
> --- 1,3 ----
> + # Override t-slibgcc-elf-ver to export some libgcc symbols with
> + # the symbol versions that glibc used.
> + SHLIB_MAPFILES = $(srcdir)/libgcc-std.ver $(srcdir)/config/s390/libgcc-glibc.ver
> diff -c -r -N gcc-orig/gcc/config.gcc gcc-head/gcc/config.gcc
> *** gcc-orig/gcc/config.gcc Mon Feb 4 19:31:48 2002
> --- gcc-head/gcc/config.gcc Mon Feb 4 18:23:44 2002
> ***************
> *** 2874,2880 ****
> tm_p_file=s390/s390-protos.h
> md_file=s390/s390.md
> out_file=s390/s390.c
> ! tmake_file="t-slibgcc-elf-ver t-linux s390/t-linux"
> extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o"
> if test x$enable_threads = xyes; then
> thread_file='posix'
> --- 2874,2880 ----
> tm_p_file=s390/s390-protos.h
> md_file=s390/s390.md
> out_file=s390/s390.c
> ! tmake_file="t-slibgcc-elf-ver t-linux s390/t-linux s390/t-linux64"
> extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o"
> if test x$enable_threads = xyes; then
> thread_file='posix'
>
>
> Mit freundlichen Gruessen / Best Regards
>
> Ulrich Weigand
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.inka.de
http://www.suse.de/~aj