[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [FYI] Cleanup of linux pass_all
From: |
Alexandre Oliva |
Subject: |
Re: [FYI] Cleanup of linux pass_all |
Date: |
08 Sep 2004 18:58:00 -0300 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 |
This patch should be reverted. It's wrong.
Not all platforms can use pass_all. x86_64, for example, can't. You
even installed yourself the patch that ensured we wouldn't run the
test for non-pic in shared libs on s390x and x86_64. These two
platforms must absolutely not use pass_all.
As for the other platforms, I believe several of the ones that were
explicitly listed as supporting pass_all were incorrectly added.
The idea of pass_all has little to do with the OS. Although some OSs
actually rule out non-PIC in shared libs; this is not the case of
GNU/Linux. pass_all also has to do with whether *all* relocations
that can be generated for non-PIC can be either resolved at link time
or be turned into a dynamic relocation at the time a shared library is
created. R_X86_64_32, for example, when referencing a symbol that
doesn't bind locally, can't be turned into a dynamic relocation, and
that's on purpose.
pass_all might even work for some select cases, but if you compile
something that exercises the problem cases, it will fail.
If it fails with a link error, great. In some unfortunate cases, it
silently applies a relocation incorrectly, or generates a dynamic
relocation that will never resolve properly. We don't want to do
that.
Please, oh, please revert this patch and add a big comment with select
portions of what I wrote above (it must be the 10th time I try to
explain why these changes are wrong, but people seem to forget).
On Aug 12, 2004, "Peter O'Gorman" <address@hidden> wrote:
> 2004-08-12 Peter O'Gorman <address@hidden>
> * libtool.m4 [GNU/linux] (AC_DEPLIBS_CHECK_METHOD): Cleanup,
> thanks to Daniel Reed.
> Index: libtool.m4
> ===================================================================
> RCS file: /cvsroot/libtool/libtool/Attic/libtool.m4,v
> retrieving revision 1.314.2.46
> diff -u -3 -p -u -r1.314.2.46 libtool.m4
> --- libtool.m4 4 Aug 2004 14:12:05 -0000 1.314.2.46
> +++ libtool.m4 12 Aug 2004 04:02:30 -0000
> @@ -2208,15 +2208,6 @@ irix5* | irix6* | nonstopux*)
> # This must be Linux ELF.
> linux*)
> - case $host_cpu in
> - alpha*|hppa*|i*86|ia64*|m68*|mips*|powerpc*|sparc*|s390*|sh*)
> - lt_cv_deplibs_check_method=pass_all ;;
> - *)
> - # glibc up to 2.1.1 does not perform some relocations on ARM
> - # this will be overridden with pass_all, but let us keep it just in case
> - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB
> (shared object|dynamic lib )' ;;
> - esac
> - lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
> lt_cv_deplibs_check_method=pass_all
> ;;
--
Alexandre Oliva http://www.ic.unicamp.br/~oliva/
Red Hat Compiler Engineer address@hidden, gcc.gnu.org}
Free Software Evangelist address@hidden, gnu.org}
- Re: [FYI] Cleanup of linux pass_all,
Alexandre Oliva <=