From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6256 invoked by alias); 4 Mar 2011 17:35:25 -0000 Received: (qmail 6236 invoked by uid 22791); 4 Mar 2011 17:35:24 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_40,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-bw0-f41.google.com (HELO mail-bw0-f41.google.com) (209.85.214.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 04 Mar 2011 17:35:15 +0000 Received: by bwz17 with SMTP id 17so2608544bwz.0 for ; Fri, 04 Mar 2011 09:35:12 -0800 (PST) MIME-Version: 1.0 Received: by 10.204.228.130 with SMTP id je2mr806476bkb.166.1299260112425; Fri, 04 Mar 2011 09:35:12 -0800 (PST) Received: by 10.204.7.3 with HTTP; Fri, 4 Mar 2011 09:35:12 -0800 (PST) In-Reply-To: References: Date: Fri, 04 Mar 2011 17:35:00 -0000 Message-ID: Subject: Re: Support for automatic linking via pragma From: Olaf van der Spek To: Kai Tietz Cc: binutils@sourceware.org Content-Type: text/plain; charset=UTF-8 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-03/txt/msg00066.txt.bz2 On Fri, Mar 4, 2011 at 6:31 PM, Kai Tietz wrote: > I didn't found time to work on that in more detail for PE-COFF and > indeed is for it the dependency-tree for objects/libraries the > challenging part. > As for doing this on each used object base, means we have on link-time > a changing import dependency tree, as each object actual used could > generate new one. This easily can lead to cycles and is IMHO too > costy. > So my research had shown that it would be more efficent (and not that > complex), to pre-scan those directives before the actual link-phase > and build up the object/library link dependency-tree once. > The gcc pragma implementation would be straight-forward and obvious. I didn't consider this issue yet. I remember in the distant past I had some issues with lib ordering, but in the recent past I didn't. Did GCC avoid this issue or was I just lucky? If it did avoid it, I assume that code can be reused. -- Olaf