From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26422 invoked by alias); 30 Aug 2002 15:27:45 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 26413 invoked from network); 30 Aug 2002 15:27:44 -0000 Received: from unknown (HELO igw3.watson.ibm.com) (198.81.209.18) by sources.redhat.com with SMTP; 30 Aug 2002 15:27:44 -0000 Received: from sp1n293en1.watson.ibm.com (sp1n293en1.watson.ibm.com [9.2.112.57]) by igw3.watson.ibm.com (8.11.4/8.11.4) with ESMTP id g7UFRPF08978; Fri, 30 Aug 2002 11:27:25 -0400 Received: from makai.watson.ibm.com (makai.watson.ibm.com [9.2.216.144]) by sp1n293en1.watson.ibm.com (8.11.4/8.11.4) with ESMTP id g7UFRPV123870; Fri, 30 Aug 2002 11:27:25 -0400 Received: from watson.ibm.com (localhost [127.0.0.1]) by makai.watson.ibm.com (AIX4.3/8.9.3/8.9.3/01-10-2000) with ESMTP id LAA26424; Fri, 30 Aug 2002 11:27:25 -0400 Message-Id: <200208301527.LAA26424@makai.watson.ibm.com> To: Alan Modra cc: Richard Henderson , Franz Sirl , Geoff Keating , gcc-patches@gcc.gnu.org Subject: Re: [RFC] PowerPC select_section / unique_section In-Reply-To: Message from Alan Modra of "Fri, 30 Aug 2002 23:00:23 +0930." <20020830230023.A18764@bubble.sa.bigpond.net.au> Date: Fri, 30 Aug 2002 08:42:00 -0000 From: David Edelsohn X-SW-Source: 2002-08/txt/msg01772.txt.bz2 >>>>> Alan Modra writes: Alan> Uh, oh. If I understand binds_local_p and mark_constant_function Alan> correctly, setting flag_pic is actually a bug-fix when compiling Alan> powerpc64-linux shared libs. We have the standard ELF binding of Alan> global syms. That is, global functions may be overridden by functions Alan> in another shared library or by the main application. Alan> So powerpc64-linux-gcc should allow -fpic/PIC to twiddle flag_pic for Alan> binds_local_p, and users should set -fPIC when compiling shared libs Alan> as is common on other ELF targets. We could use another flag, because Alan> like that annoying rs6000.c warning says "all code is position Alan> independent" on ppc64, but that would make powerpc64-linux just that Alan> more odd. Lots of packages set -fPIC to mean "compile me code for a Alan> shared library". This is what the patch that I applied to both gcc-3.2 and the trunk already does, without utilizing the generic infrastructure. The PowerPC port currently does not use the targetm.binds_local_p. We can discuss evolving to the generic infrastructure for GCC 3.4. David