From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31892 invoked by alias); 27 Jan 2002 14:26:01 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 31848 invoked by uid 71); 27 Jan 2002 14:26:00 -0000 Resent-Date: 27 Jan 2002 14:26:00 -0000 Resent-Message-ID: <20020127142600.31847.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-To: nobody@gcc.gnu.org Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org, ro@TechFak.Uni-Bielefeld.DE Resent-Reply-To: gcc-gnats@gcc.gnu.org, kreckel@ginac.de Received:(qmail 31772 invoked by uid 61); 27 Jan 2002 14:25:35 -0000 Message-Id:<20020127142535.31771.qmail@sources.redhat.com> Date: Sun, 27 Jan 2002 06:26:00 -0000 From: kreckel@ginac.de Reply-To: kreckel@ginac.de To: gcc-gnats@gcc.gnu.org Cc: ro@TechFak.Uni-Bielefeld.DE X-Send-Pr-Version:gnatsweb-2.9.3 (1.1.1.1.2.31) X-GNATS-Notify:ro@TechFak.Uni-Bielefeld.DE Subject: target/5505: Doubts about a patch for OSF X-SW-Source: 2002-01/txt/msg00910.txt.bz2 List-Id: >Number: 5505 >Category: target >Synopsis: Doubts about a patch for OSF >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Sun Jan 27 06:26:00 PST 2002 >Closed-Date: >Last-Modified: >Originator: Richard B. Kreckel >Release: gcc-3.0.1, gcc-3.0.2, gcc-3.0.3 >Organization: >Environment: alphaev5-dec-osf5.1 >Description: This patch: > Mon Jul 16 19:57:19 2001 Rainer Orth > > * config/alpha/osf.h (ASM_OUTPUT_WEAK_ALIAS, ASM_WEAKEN_LABEL, > HANDLE_SYSV_PRAGMA): Define. > * mips-tfile.c (add_ext_symbol): Pass complete symbol ptr, inline > previous args. > (copy_object): Caller changed. > > testsuite: > * g++.old-deja/g++.pt/static3.C: Removed alpha*-*-osf* XFAIL. > g++.old-deja/g++.pt/static6.C: Likewise. > * lib/target-supports.exp (check_weak_available): alpha*-*-osf* > supports weak symbols. [...] seems to break the CLN library [0] on `alphaev5-dec-osf5.1'. The patch went into GCC 3.0.1 and is still there in GCC 3.0.3. I have reverted it from an otherwise vanilla GCC 3.0.1, 3.0.2 and 3.0.3, bootstrapped that and everything works fine again. The symptoms during compilation are: With a vanilla g++ I frequently get obscure warnings like this one: as1: Warning: /tmp/ccL7IbTO.s, line 6: macro instruction used $at whereas with the patch reverted I don't see any of these. These are still mere warnings, though... When creating the static library with the vanilla compiler I find that it is 8% larger than with the patch reverted and I also get tons of warnings of this kind: ar: Warning: ignoring second definition of _ZN3cln8NDS_to_IEPKmm defined in archive Having a look at the .o files where that symbol occurs reveals this difference: vanilla: nm cl_I_from_UDS.o Name Value Type Size [...] _ZN3cln15cl_class_bignumE | 0000000000000000 | U | 0000000000000000 _ZN3cln8NDS_to_IEPKmm | 0000000000000144 | T | 0000000000000008 [...] reverted: nm cl_I_from_UDS.o Name Value Type Size [...] _ZN3cln15cl_class_bignumE | 0000000000000000 | U | 0000000000000000 _ZN3cln8NDS_to_IEPKmm | 0000000000000144 | t | 0000000000000008 _ZN3cln8NDS_to_IEPKmm | 0000000000000000 | N | 0000000000000000 [...] The offending text symbol `_ZN3cln8NDS_to_IEPKmm' demangles to `cln::NDS_to_I(unsigned long const*, unsigned long)'. Should it not be a weak symbol, as is in the reverted case, since it is inlined? Is it okay to mark it .globl and .weakext? Enabling the weak #pragma with this patch (which isn't used in the library) shouldn't change this, should it? When linking any executable against the library I get zillions of warnings "weak symbol multiply defined", which may just be a problem of the linker. But then again: why are there duplicates if above we were told that the second definition is ignored? Most worrying: all executables still build but simply segfault immediately after calling into the library. Could somebody with better knowledge of this stuff please review the patch and comment on what may be going on there? Unfortunately, I am unable to get gdb to run on this system, otherwise I would have debugged further. I would even do so if somebody tells me where to start but right now I'm completely stuck. Regards -richy. [0] >How-To-Repeat: If someone wants to give it a sad try, I recommend to configure CLN as simple as possible, i.e.: $ export CPPFLAGS="-DNO_ASM -DNO_PROVIDE_REQUIRE" $ ./configure --disable-shared --without-gmp >Fix: Remove the patch mentioned above. >Release-Note: >Audit-Trail: >Unformatted: