From owner-freebsd-hackers@FreeBSD.ORG Sat Jul 3 10:10:48 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3D3CF1065672 for ; Sat, 3 Jul 2010 10:10:48 +0000 (UTC) (envelope-from joerg@britannica.bec.de) Received: from www.sonnenberger.org (www.sonnenberger.org [92.79.50.50]) by mx1.freebsd.org (Postfix) with ESMTP id F36FF8FC1B for ; Sat, 3 Jul 2010 10:10:47 +0000 (UTC) Received: from britannica.bec.de (www.sonnenberger.org [192.168.1.10]) by www.sonnenberger.org (Postfix) with ESMTP id 71B2366787 for ; Sat, 3 Jul 2010 12:10:17 +0200 (CEST) Received: by britannica.bec.de (Postfix, from userid 1000) id 82CEB15096; Sat, 3 Jul 2010 12:08:11 +0200 (CEST) Date: Sat, 3 Jul 2010 12:08:11 +0200 From: Joerg Sonnenberger To: freebsd-hackers@freebsd.org Message-ID: <20100703100811.GA1605@britannica.bec.de> Mail-Followup-To: freebsd-hackers@freebsd.org References: <4C2E7BCD.4020609@delphij.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4C2E7BCD.4020609@delphij.net> User-Agent: Mutt/1.5.20 (2009-06-14) Subject: Re: Using lex in a shared library X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jul 2010 10:10:48 -0000 On Fri, Jul 02, 2010 at 04:52:45PM -0700, Xin LI wrote: > I think that amd64 requires a static library be compiled with -fPIC if > it's being linked into shared object. This should not be done for > normal static libraries, though, as this could give some performance > penalty when it's not needed (i.e. a static binary). More precisely, AMD64 disallows absolute references in the text segment. The performance penalty for PIC on AMD64 is minimal as it can do RIP-relative addressing. Joerg