From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20977 invoked by alias); 28 Jan 2011 14:07:46 -0000 Received: (qmail 20966 invoked by uid 22791); 28 Jan 2011 14:07:45 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-qw0-f41.google.com (HELO mail-qw0-f41.google.com) (209.85.216.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 28 Jan 2011 14:07:40 +0000 Received: by qwa26 with SMTP id 26so3225190qwa.0 for ; Fri, 28 Jan 2011 06:07:38 -0800 (PST) MIME-Version: 1.0 Received: by 10.229.189.6 with SMTP id dc6mr2719412qcb.175.1296223658716; Fri, 28 Jan 2011 06:07:38 -0800 (PST) Received: by 10.220.184.2 with HTTP; Fri, 28 Jan 2011 06:07:38 -0800 (PST) In-Reply-To: <4D42D7F5020000780002F2D7@vpn.id2.novell.com> References: <4D42D7F5020000780002F2D7@vpn.id2.novell.com> Date: Fri, 28 Jan 2011 14:07:00 -0000 Message-ID: Subject: Re: discarding rules for duplicate ELF comdat groups From: "H.J. Lu" To: Jan Beulich Cc: binutils@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2011-01/txt/msg00371.txt.bz2 On Fri, Jan 28, 2011 at 5:51 AM, Jan Beulich wrote: > It seems like currently the rule simply is to pick the first instance the > linker gets to see. Wouldn't it make sense to honor the group > signature's attributed (namely its binding), and prefer keeping an > instance with a global group signature over a weak or local one? > That would allow the programmer some control over which > instance to keep: My main motivation is to find a way to discard > the various weak fallback functions Linux has to cover cases where > e.g. some architectures implement certain functionality, while > others that don't can all use a generic implementation. > > I cannot see other mechanisms that would allow ld to discard > sections (not to speak of individual functions within sections). > Microsoft linker has some user controls over which comdat group instance to keep. Will its scheme work for you? -- H.J.